mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/net/wireless/mediatek/mt76/mt7925/main.c:1239:25: sparse: sparse: incorrect type in initializer (different base types)
@ 2026-12-06 11:27 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-12-06 11:27 UTC (permalink / raw)
  To: Sean Wang; +Cc: oe-kbuild-all, linux-kernel, Felix Fietkau

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   007722b8211f7b34fdf21b1e6a9c32497633ea29
commit: 6ace866cf6d2c5db3bcc8a0d55dcb2d705f2e7f8 wifi: mt76: mt7925: switch link STA allocation to RCU lifetime
date:   9 months ago
config: i386-randconfig-2302-20261203 (https://download.01.org/0day-ci/archive/20261204/20261204130749.JOu7teWf-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204130749.JOu7teWf-lkp@intel.com/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
| Fixes: 6ace866cf6d2 ("wifi: mt76: mt7925: switch link STA allocation to RCU lifetime")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261204130749.JOu7teWf-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/wireless/mediatek/mt76/mt7925/main.c:1239:25: sparse: sparse: incorrect type in initializer (different base types) @@     expected void *__tmp @@     got struct mt792x_link_sta * @@
   drivers/net/wireless/mediatek/mt76/mt7925/main.c:1239:25: sparse:     expected void *__tmp
   drivers/net/wireless/mediatek/mt76/mt7925/main.c:1239:25: sparse:     got struct mt792x_link_sta *
   drivers/net/wireless/mediatek/mt76/mt7925/main.c:1008:33: sparse: sparse: Initializer entry defined twice
   drivers/net/wireless/mediatek/mt76/mt7925/main.c:1008:33: sparse:   also defined here

vim +1239 drivers/net/wireless/mediatek/mt76/mt7925/main.c

  1194	
  1195	static int
  1196	mt7925_mac_sta_remove_links(struct mt792x_dev *dev, struct ieee80211_vif *vif,
  1197				    struct ieee80211_sta *sta, unsigned long old_links)
  1198	{
  1199		struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
  1200		struct mt76_dev *mdev = &dev->mt76;
  1201		unsigned int link_id;
  1202	
  1203		/* clean up bss before starec */
  1204		for_each_set_bit(link_id, &old_links, IEEE80211_MLD_MAX_NUM_LINKS) {
  1205			struct ieee80211_link_sta *link_sta;
  1206			struct ieee80211_bss_conf *link_conf;
  1207			struct mt792x_bss_conf *mconf;
  1208			struct mt792x_link_sta *mlink;
  1209	
  1210			if (vif->type == NL80211_IFTYPE_AP)
  1211				break;
  1212	
  1213			link_sta = mt792x_sta_to_link_sta(vif, sta, link_id);
  1214			if (!link_sta)
  1215				continue;
  1216	
  1217			mlink = mt792x_sta_to_link(msta, link_id);
  1218			if (!mlink)
  1219				continue;
  1220	
  1221			link_conf = mt792x_vif_to_bss_conf(vif, link_id);
  1222			if (!link_conf)
  1223				continue;
  1224	
  1225			mconf = mt792x_link_conf_to_mconf(link_conf);
  1226	
  1227			mt7925_mcu_add_bss_info(&dev->phy, mconf->mt76.ctx, link_conf,
  1228						link_sta, false);
  1229		}
  1230	
  1231		for_each_set_bit(link_id, &old_links, IEEE80211_MLD_MAX_NUM_LINKS) {
  1232			struct ieee80211_link_sta *link_sta;
  1233			struct mt792x_link_sta *mlink;
  1234	
  1235			link_sta = mt792x_sta_to_link_sta(vif, sta, link_id);
  1236			if (!link_sta)
  1237				continue;
  1238	
> 1239			mlink = rcu_replace_pointer(msta->link[link_id], NULL,
  1240						    lockdep_is_held(&mdev->mutex));
  1241			if (!mlink)
  1242				continue;
  1243	
  1244			msta->valid_links &= ~BIT(link_id);
  1245			mlink->sta = NULL;
  1246			mlink->pri_link = NULL;
  1247	
  1248			mt7925_mac_link_sta_remove(&dev->mt76, vif, link_sta, mlink);
  1249	
  1250			if (mlink != &msta->deflink)
  1251				kfree_rcu(mlink, rcu_head);
  1252	
  1253			if (msta->deflink_id == link_id)
  1254				msta->deflink_id = IEEE80211_LINK_UNSPECIFIED;
  1255		}
  1256	
  1257		return 0;
  1258	}
  1259	

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

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

only message in thread, other threads:[~2026-12-06 11:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-06 11:27 drivers/net/wireless/mediatek/mt76/mt7925/main.c:1239:25: sparse: sparse: incorrect type in initializer (different base types) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®