[android-common:android-mainline-riscv64 0/2] drivers/android/wonder/mac80211.c:1008:44: sparse: sparse: incorrect type in assignment (different base types)

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://android.googlesource.com/kernel/common android-mainline-riscv64
head:   7100382cb0b69db6c24a055ca4df75c9cc45fe50
commit: 8a7c7d3954c2839bb2f6ebe475648ec14b8a2c9f [0/2] ANDROID: Add Wonder driver to GKI
config: x86_64-randconfig-123-20260718 (https://download.01.org/0day-ci/archive/20260718/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260718/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
>> drivers/android/wonder/mac80211.c:1008:44: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] cap_info @@     got unsigned short [usertype] cap @@
   drivers/android/wonder/mac80211.c:1008:44: sparse:     expected restricted __le16 [usertype] cap_info
   drivers/android/wonder/mac80211.c:1008:44: sparse:     got unsigned short [usertype] cap
>> drivers/android/wonder/mac80211.c:1015:49: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] vht_cap_info @@     got unsigned int [usertype] cap @@
   drivers/android/wonder/mac80211.c:1015:49: sparse:     expected restricted __le32 [usertype] vht_cap_info
   drivers/android/wonder/mac80211.c:1015:49: sparse:     got unsigned int [usertype] cap

vim +1008 drivers/android/wonder/mac80211.c

   986	
   987	static int wonder_update_station_state(struct ieee80211_hw *hw,
   988				struct ieee80211_link_sta *link_sta,
   989				enum wondertap_station_action action)
   990	{
   991		struct wonder_sta_update_work *swork;
   992		struct ieee80211_sta *sta = link_sta->sta;
   993		struct wonder_data *wonder = hw->priv;
   994		struct wondertap_station_info *sta_info;
   995	
   996		swork = kzalloc_obj(*swork, GFP_ATOMIC);
   997		if (!swork)
   998			return -ENOMEM;
   999	
  1000		INIT_WORK(&swork->work, wonder_sta_update_worker);
  1001		swork->wonder = wonder;
  1002		swork->action = action;
  1003		sta_info = &swork->sta_info;
  1004		sta_info->aid = sta->aid;
  1005		memcpy(sta_info->mac, sta->addr, ETH_ALEN);
  1006	
  1007		if (link_sta->ht_cap.ht_supported) {
> 1008			sta_info->ht_capa.cap_info = link_sta->ht_cap.cap;
  1009			sta_info->ht_capa.ampdu_params_info = 0x1f;
  1010			sta_info->ht_capa.mcs = link_sta->ht_cap.mcs;
  1011			sta_info->capability_mask |= BIT(WONDERTAP_STATION_CAP_HT);
  1012		}
  1013	
  1014		if (link_sta->vht_cap.vht_supported) {
> 1015			sta_info->vht_capa.vht_cap_info = link_sta->vht_cap.cap;
  1016			sta_info->vht_capa.supp_mcs = link_sta->vht_cap.vht_mcs;
  1017			sta_info->capability_mask |= BIT(WONDERTAP_STATION_CAP_VHT);
  1018		}
  1019	
  1020		if (link_sta->he_cap.has_he) {
  1021			sta_info->he_capa = link_sta->he_cap.he_cap_elem;
  1022			sta_info->he_capa_len = sizeof(link_sta->he_cap.he_cap_elem);
  1023			sta_info->capability_mask |= BIT(WONDERTAP_STATION_CAP_HE);
  1024		}
  1025	
  1026		queue_work(wonder->workqueue, &swork->work);
  1027		return 0;
  1028	}
  1029	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.