lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202010121809.HZDajJY8-lkp@intel.com>
Date:   Mon, 12 Oct 2020 18:29:14 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ryder Lee <ryder.lee@...iatek.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Felix Fietkau <nbd@....name>
Subject: drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse:
 sparse: cast from restricted __le16

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bbf5c979011a099af5dc76498918ed7df445635b
commit: 00b2e16e006390069480e90478aa8b6e924996d7 mt76: mt7915: add TxBF capabilities
date:   5 months ago
config: parisc-randconfig-s032-20201012 (attached as .config)
compiler: hppa-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-rc1-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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.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

Download attachment ".config.gz" of type "application/gzip" (29639 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ