All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 9048/11956] drivers/net/wireless/ath/wcn36xx/main.c:772:58: sparse: sparse: incorrect type in assignment (different base types)
@ 2020-09-29 17:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-29 17:06 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5137 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   49e7e3e905e437a02782019570f70997e2da9101
commit: 87d3f1f34157a22be9c9c621bcad9e8a00ec4b3c [9048/11956] wcn36xx: Add VHT rates to wcn36xx_update_allowed_rates()
config: sparc-randconfig-s032-20200929 (attached as .config)
compiler: sparc64-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.2-201-g24bdaac6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=87d3f1f34157a22be9c9c621bcad9e8a00ec4b3c
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 87d3f1f34157a22be9c9c621bcad9e8a00ec4b3c
        # 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=sparc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

	echo
	echo "sparse warnings: (new ones prefixed by >>)"
	echo
>> drivers/net/wireless/ath/wcn36xx/main.c:772:58: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] vht_rx_mcs_map @@     got restricted __le16 [usertype] rx_mcs_map @@
>> drivers/net/wireless/ath/wcn36xx/main.c:772:58: sparse:     expected unsigned short [usertype] vht_rx_mcs_map
>> drivers/net/wireless/ath/wcn36xx/main.c:772:58: sparse:     got restricted __le16 [usertype] rx_mcs_map
>> drivers/net/wireless/ath/wcn36xx/main.c:774:58: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] vht_tx_mcs_map @@     got restricted __le16 [usertype] tx_mcs_map @@
>> drivers/net/wireless/ath/wcn36xx/main.c:774:58: sparse:     expected unsigned short [usertype] vht_tx_mcs_map
>> drivers/net/wireless/ath/wcn36xx/main.c:774:58: sparse:     got restricted __le16 [usertype] tx_mcs_map

vim +772 drivers/net/wireless/ath/wcn36xx/main.c

   729	
   730	static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta,
   731						 enum nl80211_band band)
   732	{
   733		int i, size;
   734		u16 *rates_table;
   735		struct wcn36xx_sta *sta_priv = wcn36xx_sta_to_priv(sta);
   736		u32 rates = sta->supp_rates[band];
   737	
   738		memset(&sta_priv->supported_rates, 0,
   739			sizeof(sta_priv->supported_rates));
   740		sta_priv->supported_rates.op_rate_mode = STA_11n;
   741	
   742		size = ARRAY_SIZE(sta_priv->supported_rates.dsss_rates);
   743		rates_table = sta_priv->supported_rates.dsss_rates;
   744		if (band == NL80211_BAND_2GHZ) {
   745			for (i = 0; i < size; i++) {
   746				if (rates & 0x01) {
   747					rates_table[i] = wcn_2ghz_rates[i].hw_value;
   748					rates = rates >> 1;
   749				}
   750			}
   751		}
   752	
   753		size = ARRAY_SIZE(sta_priv->supported_rates.ofdm_rates);
   754		rates_table = sta_priv->supported_rates.ofdm_rates;
   755		for (i = 0; i < size; i++) {
   756			if (rates & 0x01) {
   757				rates_table[i] = wcn_5ghz_rates[i].hw_value;
   758				rates = rates >> 1;
   759			}
   760		}
   761	
   762		if (sta->ht_cap.ht_supported) {
   763			BUILD_BUG_ON(sizeof(sta->ht_cap.mcs.rx_mask) >
   764				sizeof(sta_priv->supported_rates.supported_mcs_set));
   765			memcpy(sta_priv->supported_rates.supported_mcs_set,
   766			       sta->ht_cap.mcs.rx_mask,
   767			       sizeof(sta->ht_cap.mcs.rx_mask));
   768		}
   769	
   770		if (sta->vht_cap.vht_supported) {
   771			sta_priv->supported_rates.op_rate_mode = STA_11ac;
 > 772			sta_priv->supported_rates.vht_rx_mcs_map =
   773					sta->vht_cap.vht_mcs.rx_mcs_map;
 > 774			sta_priv->supported_rates.vht_tx_mcs_map =
   775					sta->vht_cap.vht_mcs.tx_mcs_map;
   776		}
   777	}
   778	void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates)
   779	{
   780		u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES] = {
   781			HW_RATE_INDEX_6MBPS,
   782			HW_RATE_INDEX_9MBPS,
   783			HW_RATE_INDEX_12MBPS,
   784			HW_RATE_INDEX_18MBPS,
   785			HW_RATE_INDEX_24MBPS,
   786			HW_RATE_INDEX_36MBPS,
   787			HW_RATE_INDEX_48MBPS,
   788			HW_RATE_INDEX_54MBPS
   789		};
   790		u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES] = {
   791			HW_RATE_INDEX_1MBPS,
   792			HW_RATE_INDEX_2MBPS,
   793			HW_RATE_INDEX_5_5MBPS,
   794			HW_RATE_INDEX_11MBPS
   795		};
   796	
   797		rates->op_rate_mode = STA_11n;
   798		memcpy(rates->dsss_rates, dsss_rates,
   799			sizeof(*dsss_rates) * WCN36XX_HAL_NUM_DSSS_RATES);
   800		memcpy(rates->ofdm_rates, ofdm_rates,
   801			sizeof(*ofdm_rates) * WCN36XX_HAL_NUM_OFDM_RATES);
   802		rates->supported_mcs_set[0] = 0xFF;
   803	}
   804	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31402 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-29 17:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-29 17:06 [linux-next:master 9048/11956] drivers/net/wireless/ath/wcn36xx/main.c:772:58: sparse: sparse: incorrect type in assignment (different base types) kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.