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: <202301090752.zC8mkd4p-lkp@intel.com>
Date:   Mon, 9 Jan 2023 07:47:12 +0800
From:   kernel test robot <lkp@...el.com>
To:     Shayne Chen <shayne.chen@...iatek.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Felix Fietkau <nbd@....name>,
        Ryder Lee <ryder.lee@...iatek.com>,
        Peter Chiu <chui-hao.chiu@...iatek.com>,
        Bo Jiao <Bo.Jiao@...iatek.com>,
        Howard Hsu <howard-yh.hsu@...iatek.com>,
        MeiChia Chiu <meichia.chiu@...iatek.com>,
        StanleyYP Wang <StanleyYP.Wang@...iatek.com>,
        Money Wang <Money.Wang@...iatek.com>,
        Evelyn Tsai <evelyn.tsai@...iatek.com>
Subject: drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:902:43: sparse:
 sparse: incorrect type in assignment (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1fe4fd6f5cad346e598593af36caeadc4f5d4fa9
commit: 98686cd21624c75a043e96812beadddf4f6f48e5 wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices
date:   5 weeks ago
config: sparc64-randconfig-s041-20230109
compiler: sparc64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=98686cd21624c75a043e96812beadddf4f6f48e5
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 98686cd21624c75a043e96812beadddf4f6f48e5
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash drivers/net/wireless/mediatek/mt76/mt7996/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:902:43: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned char @@     got restricted __le16 [usertype] @@
   drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:902:43: sparse:     expected unsigned char
   drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:902:43: sparse:     got restricted __le16 [usertype]
   drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:903:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned char @@     got restricted __le16 [usertype] @@
   drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:903:35: sparse:     expected unsigned char
   drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:903:35: sparse:     got restricted __le16 [usertype]

vim +902 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c

   884	
   885	static void
   886	mt7996_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
   887	{
   888		struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
   889		struct ieee80211_he_mcs_nss_supp mcs_map;
   890		struct sta_rec_he_v2 *he;
   891		struct tlv *tlv;
   892		int i = 0;
   893	
   894		if (!sta->deflink.he_cap.has_he)
   895			return;
   896	
   897		tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE_V2, sizeof(*he));
   898	
   899		he = (struct sta_rec_he_v2 *)tlv;
   900		for (i = 0; i < 11; i++) {
   901			if (i < 6)
 > 902				he->he_mac_cap[i] = cpu_to_le16(elem->mac_cap_info[i]);
   903			he->he_phy_cap[i] = cpu_to_le16(elem->phy_cap_info[i]);
   904		}
   905	
   906		mcs_map = sta->deflink.he_cap.he_mcs_nss_supp;
   907		switch (sta->deflink.bandwidth) {
   908		case IEEE80211_STA_RX_BW_160:
   909			if (elem->phy_cap_info[0] &
   910			    IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
   911				mt7996_mcu_set_sta_he_mcs(sta,
   912							  &he->max_nss_mcs[CMD_HE_MCS_BW8080],
   913							  le16_to_cpu(mcs_map.rx_mcs_80p80));
   914	
   915			mt7996_mcu_set_sta_he_mcs(sta,
   916						  &he->max_nss_mcs[CMD_HE_MCS_BW160],
   917						  le16_to_cpu(mcs_map.rx_mcs_160));
   918			fallthrough;
   919		default:
   920			mt7996_mcu_set_sta_he_mcs(sta,
   921						  &he->max_nss_mcs[CMD_HE_MCS_BW80],
   922						  le16_to_cpu(mcs_map.rx_mcs_80));
   923			break;
   924		}
   925	
   926		he->pkt_ext = 2;
   927	}
   928	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

View attachment "config" of type "text/plain" (190185 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ