linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [wireless-drivers-next:master 19/40] drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c:892:6: warning: variable 'place' is used uninitialized whenever 'if' condition is false
@ 2021-08-22  0:36 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-22  0:36 UTC (permalink / raw)
  To: Colin Ian King; +Cc: clang-built-linux, kbuild-all, Kalle Valo, linux-wireless

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
head:   0dc62413c882d765db7a3ff4d507e8c0a804ba68
commit: 369956ae5720ba1b415b37ba23cea5ede2942398 [19/40] rtlwifi: rtl8192de: Remove redundant variable initializations
config: i386-randconfig-a015-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
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/kvalo/wireless-drivers-next.git/commit/?id=369956ae5720ba1b415b37ba23cea5ede2942398
        git remote add wireless-drivers-next https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git
        git fetch --no-tags wireless-drivers-next master
        git checkout 369956ae5720ba1b415b37ba23cea5ede2942398
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 

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/net/wireless/realtek/rtlwifi/rtl8192de/phy.c:892:6: warning: variable 'place' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (chnl > 14) {
               ^~~~~~~~~
   drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c:900:9: note: uninitialized use occurs here
           return place;
                  ^~~~~
   drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c:892:2: note: remove the 'if' if its condition is always true
           if (chnl > 14) {
           ^~~~~~~~~~~~~~~
   drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c:890:10: note: initialize the variable 'place' to silence this warning
           u8 place;
                   ^
                    = '\0'
   1 warning generated.


vim +892 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c

7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  887  
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  888  static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl)
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  889  {
369956ae5720ba drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c Colin Ian King 2021-08-03  890  	u8 place;
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  891  
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10 @892  	if (chnl > 14) {
bb6fa826ba308e drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c Larry Finger   2016-02-11  893  		for (place = 14; place < sizeof(channel5g); place++) {
bb6fa826ba308e drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c Larry Finger   2016-02-11  894  			if (channel5g[place] == chnl) {
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  895  				place++;
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  896  				break;
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  897  			}
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  898  		}
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  899  	}
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  900  	return place;
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  901  }
7274a8c229805d drivers/net/wireless/rtlwifi/rtl8192de/phy.c         Chaoming Li    2011-06-10  902  

:::::: The code at line 892 was first introduced by commit
:::::: 7274a8c229805d5ab1228a2d7d8ed304fcfa2bc6 rtlwifi: rtl8192de: Merge phy routines

:::::: TO: Chaoming Li <chaoming_li@realsil.com.cn>
:::::: CC: John W. Linville <linville@tuxdriver.com>

---
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: 34290 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-22  0:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-22  0:36 [wireless-drivers-next:master 19/40] drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c:892:6: warning: variable 'place' is used uninitialized whenever 'if' condition is false 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).