linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/i2c/busses/i2c-mlxcpld.c:271:10: warning: 'val' is used uninitialized in this function
@ 2021-06-14 17:53 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-06-14 17:53 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: kbuild-all, linux-kernel, Wolfram Sang

[-- Attachment #1: Type: text/plain, Size: 4015 bytes --]

Hi Krzysztof,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   009c9aa5be652675a06d5211e1640e02bbb1c33d
commit: 4a2d5f663dab6614772d8e28ca190b127ba46d9d i2c: Enable compile testing for more drivers
date:   1 year, 5 months ago
config: parisc-randconfig-r023-20210615 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4a2d5f663dab6614772d8e28ca190b127ba46d9d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 4a2d5f663dab6614772d8e28ca190b127ba46d9d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/parisc/include/asm/io.h:6,
                    from include/linux/io.h:13,
                    from drivers/i2c/busses/i2c-mlxcpld.c:37:
   include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
   arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
      96 |   pte_t old_pte;     \
         |         ^~~~~~~
   arch/parisc/include/asm/pgtable.h:322:34: note: in expansion of macro 'set_pte_at'
     322 | #define pte_clear(mm, addr, xp)  set_pte_at(mm, addr, xp, __pte(0))
         |                                  ^~~~~~~~~~
   include/asm-generic/pgtable.h:201:2: note: in expansion of macro 'pte_clear'
     201 |  pte_clear(mm, address, ptep);
         |  ^~~~~~~~~
   include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
   arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
      96 |   pte_t old_pte;     \
         |         ^~~~~~~
   include/asm-generic/pgtable.h:640:2: note: in expansion of macro 'set_pte_at'
     640 |  set_pte_at(vma->vm_mm, addr, ptep, pte);
         |  ^~~~~~~~~~
   drivers/i2c/busses/i2c-mlxcpld.c: In function 'mlxcpld_i2c_check_busy':
>> drivers/i2c/busses/i2c-mlxcpld.c:271:10: warning: 'val' is used uninitialized in this function [-Wuninitialized]
     271 |  if (val & MLXCPLD_LPCI2C_TRANS_END)
         |          ^


vim +/val +271 drivers/i2c/busses/i2c-mlxcpld.c

6bec23bff91491 Vadim Pasternak 2016-11-20  263  
6bec23bff91491 Vadim Pasternak 2016-11-20  264  /* Make sure the CPLD is ready to start transmitting. */
6bec23bff91491 Vadim Pasternak 2016-11-20  265  static int mlxcpld_i2c_check_busy(struct mlxcpld_i2c_priv *priv)
6bec23bff91491 Vadim Pasternak 2016-11-20  266  {
6bec23bff91491 Vadim Pasternak 2016-11-20  267  	u8 val;
6bec23bff91491 Vadim Pasternak 2016-11-20  268  
6bec23bff91491 Vadim Pasternak 2016-11-20  269  	mlxcpld_i2c_read_comm(priv, MLXCPLD_LPCI2C_STATUS_REG, &val, 1);
6bec23bff91491 Vadim Pasternak 2016-11-20  270  
6bec23bff91491 Vadim Pasternak 2016-11-20 @271  	if (val & MLXCPLD_LPCI2C_TRANS_END)
6bec23bff91491 Vadim Pasternak 2016-11-20  272  		return 0;
6bec23bff91491 Vadim Pasternak 2016-11-20  273  
6bec23bff91491 Vadim Pasternak 2016-11-20  274  	return -EIO;
6bec23bff91491 Vadim Pasternak 2016-11-20  275  }
6bec23bff91491 Vadim Pasternak 2016-11-20  276  

:::::: The code at line 271 was first introduced by commit
:::::: 6bec23bff914915822f2c34d0555902fb2b9be1f i2c: mlxcpld: add master driver for mellanox systems

:::::: TO: Vadim Pasternak <vadimp@mellanox.com>
:::::: CC: Wolfram Sang <wsa@the-dreams.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34441 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/i2c/busses/i2c-mlxcpld.c:271:10: warning: 'val' is used uninitialized in this function
@ 2020-11-09 22:11 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-11-09 22:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: kbuild-all, linux-kernel, Wolfram Sang

[-- Attachment #1: Type: text/plain, Size: 2876 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3552c3709c0e78144c11748718180441ac647ece
commit: 4a2d5f663dab6614772d8e28ca190b127ba46d9d i2c: Enable compile testing for more drivers
date:   10 months ago
config: sh-randconfig-s032-20201109 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-76-gf680124b-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4a2d5f663dab6614772d8e28ca190b127ba46d9d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 4a2d5f663dab6614772d8e28ca190b127ba46d9d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/i2c/busses/i2c-mlxcpld.c: In function 'mlxcpld_i2c_check_busy':
>> drivers/i2c/busses/i2c-mlxcpld.c:271:10: warning: 'val' is used uninitialized in this function [-Wuninitialized]
     271 |  if (val & MLXCPLD_LPCI2C_TRANS_END)
         |          ^

vim +/val +271 drivers/i2c/busses/i2c-mlxcpld.c

6bec23bff914915 Vadim Pasternak 2016-11-20  263  
6bec23bff914915 Vadim Pasternak 2016-11-20  264  /* Make sure the CPLD is ready to start transmitting. */
6bec23bff914915 Vadim Pasternak 2016-11-20  265  static int mlxcpld_i2c_check_busy(struct mlxcpld_i2c_priv *priv)
6bec23bff914915 Vadim Pasternak 2016-11-20  266  {
6bec23bff914915 Vadim Pasternak 2016-11-20  267  	u8 val;
6bec23bff914915 Vadim Pasternak 2016-11-20  268  
6bec23bff914915 Vadim Pasternak 2016-11-20  269  	mlxcpld_i2c_read_comm(priv, MLXCPLD_LPCI2C_STATUS_REG, &val, 1);
6bec23bff914915 Vadim Pasternak 2016-11-20  270  
6bec23bff914915 Vadim Pasternak 2016-11-20 @271  	if (val & MLXCPLD_LPCI2C_TRANS_END)
6bec23bff914915 Vadim Pasternak 2016-11-20  272  		return 0;
6bec23bff914915 Vadim Pasternak 2016-11-20  273  
6bec23bff914915 Vadim Pasternak 2016-11-20  274  	return -EIO;
6bec23bff914915 Vadim Pasternak 2016-11-20  275  }
6bec23bff914915 Vadim Pasternak 2016-11-20  276  

:::::: The code at line 271 was first introduced by commit
:::::: 6bec23bff914915822f2c34d0555902fb2b9be1f i2c: mlxcpld: add master driver for mellanox systems

:::::: TO: Vadim Pasternak <vadimp@mellanox.com>
:::::: CC: Wolfram Sang <wsa@the-dreams.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29359 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-14 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 17:53 drivers/i2c/busses/i2c-mlxcpld.c:271:10: warning: 'val' is used uninitialized in this function kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-11-09 22:11 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).