[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202406260755.fqLnsFhr-lkp@intel.com>
Date: Wed, 26 Jun 2024 08:19:02 +0800
From: kernel test robot <lkp@...el.com>
To: David Lin <yu-hao.lin@....com>, linux-wireless@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, briannorris@...omium.org,
kvalo@...nel.org, francesco@...cini.it, tsung-hsien.hsieh@....com,
David Lin <yu-hao.lin@....com>
Subject: Re: [PATCH 42/43] wifi: nxpwifi: add Makefile and Kconfig files for
nxpwifi compilation
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 238d636723a30311e20fde0a361662e829fe488b]
url: https://github.com/intel-lab-lkp/linux/commits/David-Lin/wifi-nxpwifi-add-11ac-c/20240625-161306
base: 238d636723a30311e20fde0a361662e829fe488b
patch link: https://lore.kernel.org/r/20240621075208.513497-43-yu-hao.lin%40nxp.com
patch subject: [PATCH 42/43] wifi: nxpwifi: add Makefile and Kconfig files for nxpwifi compilation
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240626/202406260755.fqLnsFhr-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240626/202406260755.fqLnsFhr-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406260755.fqLnsFhr-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/nxp/nxpwifi/11h.c:208:7: warning: variable 'chan2_offset' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
208 | case NL80211_CHAN_WIDTH_80P80:
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:214:16: note: uninitialized use occurs here
214 | *band_cfg = ((chan2_offset << BAND_CFG_CHAN2_SHIFT_BIT) &
| ^~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:209:7: warning: variable 'chan2_offset' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
209 | case NL80211_CHAN_WIDTH_160:
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:214:16: note: uninitialized use occurs here
214 | *band_cfg = ((chan2_offset << BAND_CFG_CHAN2_SHIFT_BIT) &
| ^~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:192:7: warning: variable 'chan2_offset' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
192 | case NL80211_CHAN_WIDTH_20_NOHT:
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:214:16: note: uninitialized use occurs here
214 | *band_cfg = ((chan2_offset << BAND_CFG_CHAN2_SHIFT_BIT) &
| ^~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:193:7: warning: variable 'chan2_offset' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
193 | case NL80211_CHAN_WIDTH_20:
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:214:16: note: uninitialized use occurs here
214 | *band_cfg = ((chan2_offset << BAND_CFG_CHAN2_SHIFT_BIT) &
| ^~~~~~~~~~~~
>> drivers/net/wireless/nxp/nxpwifi/11h.c:210:2: warning: variable 'chan2_offset' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
210 | default:
| ^~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:214:16: note: uninitialized use occurs here
214 | *band_cfg = ((chan2_offset << BAND_CFG_CHAN2_SHIFT_BIT) &
| ^~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:178:40: note: initialize the variable 'chan2_offset' to silence this warning
178 | u8 chan_band, chan_width, chan2_offset;
| ^
| = '\0'
>> drivers/net/wireless/nxp/nxpwifi/11h.c:208:7: warning: variable 'chan_width' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
208 | case NL80211_CHAN_WIDTH_80P80:
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:216:9: note: uninitialized use occurs here
216 | ((chan_width << BAND_CFG_CHAN_WIDTH_SHIFT_BIT) &
| ^~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:209:7: warning: variable 'chan_width' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
209 | case NL80211_CHAN_WIDTH_160:
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:216:9: note: uninitialized use occurs here
216 | ((chan_width << BAND_CFG_CHAN_WIDTH_SHIFT_BIT) &
| ^~~~~~~~~~
>> drivers/net/wireless/nxp/nxpwifi/11h.c:210:2: warning: variable 'chan_width' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
210 | default:
| ^~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:216:9: note: uninitialized use occurs here
216 | ((chan_width << BAND_CFG_CHAN_WIDTH_SHIFT_BIT) &
| ^~~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:178:26: note: initialize the variable 'chan_width' to silence this warning
178 | u8 chan_band, chan_width, chan2_offset;
| ^
| = '\0'
>> drivers/net/wireless/nxp/nxpwifi/11h.c:187:2: warning: variable 'chan_band' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
187 | default:
| ^~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:218:9: note: uninitialized use occurs here
218 | ((chan_band << BAND_CFG_CHAN_BAND_SHIFT_BIT) &
| ^~~~~~~~~
drivers/net/wireless/nxp/nxpwifi/11h.c:178:14: note: initialize the variable 'chan_band' to silence this warning
178 | u8 chan_band, chan_width, chan2_offset;
| ^
| = '\0'
9 warnings generated.
vim +/chan2_offset +208 drivers/net/wireless/nxp/nxpwifi/11h.c
647388e635d138 David Lin 2024-06-21 174
647388e635d138 David Lin 2024-06-21 175 static void nxpwifi_convert_chan_to_band_cfg(u8 *band_cfg,
647388e635d138 David Lin 2024-06-21 176 struct cfg80211_chan_def *chan_def)
647388e635d138 David Lin 2024-06-21 177 {
647388e635d138 David Lin 2024-06-21 178 u8 chan_band, chan_width, chan2_offset;
647388e635d138 David Lin 2024-06-21 179
647388e635d138 David Lin 2024-06-21 180 switch (chan_def->chan->band) {
647388e635d138 David Lin 2024-06-21 181 case NL80211_BAND_2GHZ:
647388e635d138 David Lin 2024-06-21 182 chan_band = BAND_2GHZ;
647388e635d138 David Lin 2024-06-21 183 break;
647388e635d138 David Lin 2024-06-21 184 case NL80211_BAND_5GHZ:
647388e635d138 David Lin 2024-06-21 185 chan_band = BAND_5GHZ;
647388e635d138 David Lin 2024-06-21 186 break;
647388e635d138 David Lin 2024-06-21 @187 default:
647388e635d138 David Lin 2024-06-21 188 break;
647388e635d138 David Lin 2024-06-21 189 }
647388e635d138 David Lin 2024-06-21 190
647388e635d138 David Lin 2024-06-21 191 switch (chan_def->width) {
647388e635d138 David Lin 2024-06-21 192 case NL80211_CHAN_WIDTH_20_NOHT:
647388e635d138 David Lin 2024-06-21 193 case NL80211_CHAN_WIDTH_20:
647388e635d138 David Lin 2024-06-21 194 chan_width = CHAN_BW_20MHZ;
647388e635d138 David Lin 2024-06-21 195 break;
647388e635d138 David Lin 2024-06-21 196 case NL80211_CHAN_WIDTH_40:
647388e635d138 David Lin 2024-06-21 197 chan_width = CHAN_BW_40MHZ;
647388e635d138 David Lin 2024-06-21 198 if (chan_def->center_freq1 > chan_def->chan->center_freq)
647388e635d138 David Lin 2024-06-21 199 chan2_offset = SEC_CHAN_ABOVE;
647388e635d138 David Lin 2024-06-21 200 else
647388e635d138 David Lin 2024-06-21 201 chan2_offset = SEC_CHAN_BELOW;
647388e635d138 David Lin 2024-06-21 202 break;
647388e635d138 David Lin 2024-06-21 203 case NL80211_CHAN_WIDTH_80:
647388e635d138 David Lin 2024-06-21 204 chan2_offset =
647388e635d138 David Lin 2024-06-21 205 nxpwifi_get_channel_2_offset(chan_def->chan->hw_value);
647388e635d138 David Lin 2024-06-21 206 chan_width = CHAN_BW_80MHZ;
647388e635d138 David Lin 2024-06-21 207 break;
647388e635d138 David Lin 2024-06-21 @208 case NL80211_CHAN_WIDTH_80P80:
647388e635d138 David Lin 2024-06-21 209 case NL80211_CHAN_WIDTH_160:
647388e635d138 David Lin 2024-06-21 @210 default:
647388e635d138 David Lin 2024-06-21 211 break;
647388e635d138 David Lin 2024-06-21 212 }
647388e635d138 David Lin 2024-06-21 213
647388e635d138 David Lin 2024-06-21 @214 *band_cfg = ((chan2_offset << BAND_CFG_CHAN2_SHIFT_BIT) &
647388e635d138 David Lin 2024-06-21 215 BAND_CFG_CHAN2_OFFSET_MASK) |
647388e635d138 David Lin 2024-06-21 @216 ((chan_width << BAND_CFG_CHAN_WIDTH_SHIFT_BIT) &
647388e635d138 David Lin 2024-06-21 217 BAND_CFG_CHAN_WIDTH_MASK) |
647388e635d138 David Lin 2024-06-21 218 ((chan_band << BAND_CFG_CHAN_BAND_SHIFT_BIT) &
647388e635d138 David Lin 2024-06-21 219 BAND_CFG_CHAN_BAND_MASK);
647388e635d138 David Lin 2024-06-21 220 }
647388e635d138 David Lin 2024-06-21 221
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists