Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: mac80211: remove unused variables in minstrel_ht_alloc_sta

Remove the unused variable max_rates and related code. Also remove the
variable mi and pass type to kzalloc_obj instead.

Signed-off-by: Jiajia Liu <liujiajia@kylinos.cn>
Link: https://patch.msgid.link/20260407063205.68471-1-liujiajia@kylinos.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Jiajia Liu and committed by
Johannes Berg
c4ed2c3f 368f5098

+1 -14
+1 -14
net/mac80211/rc80211_minstrel_ht.c
··· 1849 1849 static void * 1850 1850 minstrel_ht_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp) 1851 1851 { 1852 - struct ieee80211_supported_band *sband; 1853 - struct minstrel_ht_sta *mi; 1854 - struct minstrel_priv *mp = priv; 1855 - struct ieee80211_hw *hw = mp->hw; 1856 - int max_rates = 0; 1857 - int i; 1858 - 1859 - for (i = 0; i < NUM_NL80211_BANDS; i++) { 1860 - sband = hw->wiphy->bands[i]; 1861 - if (sband && sband->n_bitrates > max_rates) 1862 - max_rates = sband->n_bitrates; 1863 - } 1864 - 1865 - return kzalloc_obj(*mi, gfp); 1852 + return kzalloc_obj(struct minstrel_ht_sta, gfp); 1866 1853 } 1867 1854 1868 1855 static void