Re: [PATCH 4/4] firmware: imx: add driver for NXP EdgeLock Enclave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pankaj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on e8f897f4afef0031fe618a8e94127a0934896aba]

url:    https://github.com/intel-lab-lkp/linux/commits/Pankaj-Gupta/Documentation-firmware-add-imx-se-to-other_interfaces/20240510-213210
base:   e8f897f4afef0031fe618a8e94127a0934896aba
patch link:    https://lore.kernel.org/r/20240510-imx-se-if-v1-4-27c5a674916d%40nxp.com
patch subject: [PATCH 4/4] firmware: imx: add driver for NXP EdgeLock Enclave
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20240511/202405111457.slkK7qEv-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project b910bebc300dafb30569cecc3017b446ea8eafa0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240511/202405111457.slkK7qEv-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405111457.slkK7qEv-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/firmware/imx/ele_common.c:27:6: warning: variable 'err' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
      27 |         if (!wait_for_completion_timeout(&priv->done, wait)) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/firmware/imx/ele_common.c:36:9: note: uninitialized use occurs here
      36 |         return err;
         |                ^~~
   drivers/firmware/imx/ele_common.c:27:2: note: remove the 'if' if its condition is always true
      27 |         if (!wait_for_completion_timeout(&priv->done, wait)) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/firmware/imx/ele_common.c:24:9: note: initialize the variable 'err' to silence this warning
      24 |         int err;
         |                ^
         |                 = 0
   1 warning generated.
--
   In file included from drivers/firmware/imx/ele_base_msg.c:8:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2188:
   include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     508 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     509 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     515 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     516 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     527 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     528 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     536 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     537 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/firmware/imx/ele_base_msg.c:23:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
      23 |         if (!priv || !s_info)
         |             ^~~~~~~~~~~~~~~~
   drivers/firmware/imx/ele_base_msg.c:114:9: note: uninitialized use occurs here
     114 |         return ret;
         |                ^~~
   drivers/firmware/imx/ele_base_msg.c:23:2: note: remove the 'if' if its condition is always false
      23 |         if (!priv || !s_info)
         |         ^~~~~~~~~~~~~~~~~~~~~
      24 |                 goto exit;
         |                 ~~~~~~~~~
>> drivers/firmware/imx/ele_base_msg.c:23:6: warning: variable 'ret' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
      23 |         if (!priv || !s_info)
         |             ^~~~~
   drivers/firmware/imx/ele_base_msg.c:114:9: note: uninitialized use occurs here
     114 |         return ret;
         |                ^~~
   drivers/firmware/imx/ele_base_msg.c:23:6: note: remove the '||' if its condition is always false
      23 |         if (!priv || !s_info)
         |             ^~~~~~~~
   drivers/firmware/imx/ele_base_msg.c:21:9: note: initialize the variable 'ret' to silence this warning
      21 |         int ret;
         |                ^
         |                 = 0
>> drivers/firmware/imx/ele_base_msg.c:23:6: warning: variable 'get_info_addr' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
      23 |         if (!priv || !s_info)
         |             ^~~~~~~~~~~~~~~~
   drivers/firmware/imx/ele_base_msg.c:103:6: note: uninitialized use occurs here
     103 |         if (get_info_addr) {
         |             ^~~~~~~~~~~~~
   drivers/firmware/imx/ele_base_msg.c:23:2: note: remove the 'if' if its condition is always false
      23 |         if (!priv || !s_info)
         |         ^~~~~~~~~~~~~~~~~~~~~
      24 |                 goto exit;
         |                 ~~~~~~~~~
>> drivers/firmware/imx/ele_base_msg.c:23:6: warning: variable 'get_info_addr' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
      23 |         if (!priv || !s_info)
         |             ^~~~~
   drivers/firmware/imx/ele_base_msg.c:103:6: note: uninitialized use occurs here
     103 |         if (get_info_addr) {
         |             ^~~~~~~~~~~~~
   drivers/firmware/imx/ele_base_msg.c:23:6: note: remove the '||' if its condition is always false
      23 |         if (!priv || !s_info)
         |             ^~~~~~~~
   drivers/firmware/imx/ele_base_msg.c:18:27: note: initialize the variable 'get_info_addr' to silence this warning
      18 |         phys_addr_t get_info_addr;
         |                                  ^
         |                                   = 0
   9 warnings generated.


vim +27 drivers/firmware/imx/ele_common.c

    20	
    21	int imx_ele_msg_rcv(struct se_if_priv *priv)
    22	{
    23		u32 wait;
    24		int err;
    25	
    26		wait = msecs_to_jiffies(1000);
  > 27		if (!wait_for_completion_timeout(&priv->done, wait)) {
    28			dev_err(priv->dev,
    29					"Error: wait_for_completion timed out.\n");
    30			err = -ETIMEDOUT;
    31		}
    32	
    33		mutex_unlock(&priv->se_if_cmd_lock);
    34		priv->no_dev_ctx_used = false;
    35	
    36		return err;
    37	}
    38	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux