From: kernel test robot <lkp@intel.com>
To: Colin Ian King <colin.king@canonical.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
Kalle Valo <kvalo@codeaurora.org>,
linux-wireless@vger.kernel.org
Subject: [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
Date: Sun, 22 Aug 2021 08:36:07 +0800 [thread overview]
Message-ID: <202108220858.ck0R2EoA-lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2021-08-22 0:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202108220858.ck0R2EoA-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=colin.king@canonical.com \
--cc=kbuild-all@lists.01.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).