All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 8406/9563] drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:585 mt7925_mcu_uni_tx_ba() warn: unsigned 'ret' is never less than zero.
@ 2025-01-20  7:57 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-20  7:57 UTC (permalink / raw)
  To: Ming Yen Hsieh; +Cc: oe-kbuild-all, Felix Fietkau, Sean Wang

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0907e7fb35756464aa34c35d6abb02998418164b
commit: eb2a9a12c6092a26f632468d6610497d4f0e40da [8406/9563] wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO
config: m68k-randconfig-r072-20250120 (https://download.01.org/0day-ci/archive/20250120/202501201525.If1lFErE-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.2.0

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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501201525.If1lFErE-lkp@intel.com/

New smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:585 mt7925_mcu_uni_tx_ba() warn: unsigned 'ret' is never less than zero.
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:589 mt7925_mcu_uni_tx_ba() error: uninitialized symbol 'ret'.
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:612 mt7925_mcu_uni_rx_ba() warn: unsigned 'ret' is never less than zero.
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:616 mt7925_mcu_uni_rx_ba() error: uninitialized symbol 'ret'.

Old smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:1193 mt7925_mcu_set_mlo_roc() warn: variable dereferenced before check 'mconf' (see line 1160)

vim +/ret +585 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c

   560	
   561	/** starec & wtbl **/
   562	int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
   563				 struct ieee80211_vif *vif,
   564				 struct ieee80211_ampdu_params *params,
   565				 bool enable)
   566	{
   567		struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
   568		struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
   569		struct mt792x_link_sta *mlink;
   570		struct mt792x_bss_conf *mconf;
   571		unsigned long usable_links = ieee80211_vif_usable_links(vif);
   572		struct mt76_wcid *wcid;
   573		u8 link_id, ret;
   574	
   575		for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) {
   576			mconf = mt792x_vif_to_link(mvif, link_id);
   577			mlink = mt792x_sta_to_link(msta, link_id);
   578			wcid = &mlink->wcid;
   579	
   580			if (enable && !params->amsdu)
   581				mlink->wcid.amsdu = false;
   582	
   583			ret = mt7925_mcu_sta_ba(&dev->mt76, &mconf->mt76, wcid, params,
   584						enable, true);
 > 585			if (ret < 0)
   586				break;
   587		}
   588	
 > 589		return ret;
   590	}
   591	
   592	int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
   593				 struct ieee80211_vif *vif,
   594				 struct ieee80211_ampdu_params *params,
   595				 bool enable)
   596	{
   597		struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
   598		struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
   599		struct mt792x_link_sta *mlink;
   600		struct mt792x_bss_conf *mconf;
   601		unsigned long usable_links = ieee80211_vif_usable_links(vif);
   602		struct mt76_wcid *wcid;
   603		u8 link_id, ret;
   604	
   605		for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) {
   606			mconf = mt792x_vif_to_link(mvif, link_id);
   607			mlink = mt792x_sta_to_link(msta, link_id);
   608			wcid = &mlink->wcid;
   609	
   610			ret = mt7925_mcu_sta_ba(&dev->mt76, &mconf->mt76, wcid, params,
   611						enable, false);
 > 612			if (ret < 0)
   613				break;
   614		}
   615	
 > 616		return ret;
   617	}
   618	

-- 
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:[~2025-01-20  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-20  7:57 [linux-next:master 8406/9563] drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:585 mt7925_mcu_uni_tx_ba() warn: unsigned 'ret' is never less than zero 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.