From: kernel test robot <lkp@intel.com>
To: Ryder Lee <ryder.lee@mediatek.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Felix Fietkau <nbd@nbd.name>
Subject: drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16
Date: Thu, 12 Nov 2020 15:20:54 +0800 [thread overview]
Message-ID: <202011121550.EcLqDiYM-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3927 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d5e28bff7ad55aea081c1af516cc1c94a5eca7d
commit: 00b2e16e006390069480e90478aa8b6e924996d7 mt76: mt7915: add TxBF capabilities
date: 6 months ago
config: x86_64-randconfig-s022-20201112 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-106-gd020cf33-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=00b2e16e006390069480e90478aa8b6e924996d7
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 00b2e16e006390069480e90478aa8b6e924996d7
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16
vim +339 drivers/net/wireless/mediatek/mt76/mt7915/init.c
296
297 elem->phy_cap_info[3] &= ~IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER;
298 elem->phy_cap_info[4] &= ~IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER;
299
300 c = IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK |
301 IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_MASK;
302 elem->phy_cap_info[5] &= ~c;
303
304 c = IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB |
305 IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB;
306 elem->phy_cap_info[6] &= ~c;
307
308 elem->phy_cap_info[7] &= ~IEEE80211_HE_PHY_CAP7_MAX_NC_MASK;
309
310 c = IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US |
311 IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
312 IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO;
313 elem->phy_cap_info[2] |= c;
314
315 c = IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE |
316 IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 |
317 IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4;
318 elem->phy_cap_info[4] |= c;
319
320 /* do not support NG16 due to spec D4.0 changes subcarrier idx */
321 c = IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU |
322 IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU;
323
324 if (vif == NL80211_IFTYPE_STATION)
325 c |= IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO;
326
327 elem->phy_cap_info[6] |= c;
328
329 if (nss < 2)
330 return;
331
332 if (vif != NL80211_IFTYPE_AP)
333 return;
334
335 elem->phy_cap_info[3] |= IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER;
336 elem->phy_cap_info[4] |= IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER;
337
338 /* num_snd_dim */
> 339 c = (nss - 1) | (max_t(int, mcs->tx_mcs_160, 1) << 3);
340 elem->phy_cap_info[5] |= c;
341
342 c = IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB |
343 IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB;
344 elem->phy_cap_info[6] |= c;
345
346 /* the maximum cap is 4 x 3, (Nr, Nc) = (3, 2) */
347 elem->phy_cap_info[7] |= min_t(int, nss - 1, 2) << 3;
348 }
349
---
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: 30919 bytes --]
next reply other threads:[~2020-11-12 7:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 7:20 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-12 10:29 drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16 kernel test robot
2020-08-07 5:12 kernel test robot
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=202011121550.EcLqDiYM-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
/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