mac80211: fix remaining sparse warnings
Johannes Berg
maintainerPATCH 1/1 mac80211: fix remaining sparse warnings
This patch fixes the sparse warnings that remain after Michael Wu's patches as well as those I might have introduced myself during the debugfs restructuring...
Signed-off-by Johannes Berg <[email protected]>
--- net/mac80211/debugfs_netdev.c | 4 ++-- net/mac80211/ieee80211.c | 2 +- net/mac80211/ieee80211_ioctl.c | 2 +- net/mac80211/sta_info.c | 21 +++++++++++++++------ 4 files changed, 19 insertions(+), 10 deletions(-)
net/mac80211/debugfs_netdev.c +2 -2
@@ -244,7 +244,7 @@ static void add_monitor_files(struct ieeDEBUGFS_ADD (mode, monitor); } -void add_files (struct ieee80211_sub_if_data *sdata) +static void add_files (struct ieee80211_sub_if_data *sdata) {if (!sdata->debugfsdir)return ;
@@ -337,7 +337,7 @@ static void del_monitor_files(struct ieeDEBUGFS_DEL (mode, monitor); } -void del_files (struct ieee80211_sub_if_data *sdata,int type) +static void del_files (struct ieee80211_sub_if_data *sdata,int type) {if (!sdata->debugfsdir)return ;
net/mac80211/ieee80211.c +1 -1
@@ -97,7 +97,7 @@ struct ieee80211_key *ieee80211_key_alloreturn key; } -void ieee80211_key_release (struct kref *kref) +static void ieee80211_key_release (struct kref *kref) {struct ieee80211_key *key;
net/mac80211/sta_info.c +15 -6
@@ -102,7 +102,7 @@ int sta_info_min_txrate_get(struct ieee8 } -void sta_info_release (struct kref *kref) +static void sta_info_release (struct kref *kref) { struct sta_info *sta = container_of(kref, struct sta_info, kref);struct ieee80211_local *local = sta->local;
@@ -210,14 +210,11 @@ static void finish_sta_info_free(structsta_info_put (sta); } -void sta_info_free (struct sta_info *sta,int locked) +static void sta_info_remove (struct sta_info *sta) { -struct sk_buff *skb;struct ieee80211_local *local = sta->local;struct ieee80211_sub_if_data *sdata; -if (!locked) -spin_lock_bh (&local->sta_lock);sta_info_hash_del (local, sta);list_del (&sta->list); sdata =IEEE80211_DEV_TO_SUB_IF (sta->dev);
@@ -228,8 +225,20 @@ void sta_info_free(struct sta_info *sta, } local->num_sta--;sta_info_remove_aid_ptr (sta); -if (!locked) +} + +void sta_info_free (struct sta_info *sta,int locked) +{ +struct sk_buff *skb; +struct ieee80211_local *local = sta->local; + +if (!locked) { +spin_lock_bh (&local->sta_lock); +sta_info_remove (sta);spin_unlock_bh (&local->sta_lock); + }else { +sta_info_remove (sta); + }if (local->ops->sta_table_notification) local->ops->sta_table_notification (local_to_hw (local), local->num_sta);
net/mac80211/ieee80211_ioctl.c +1 -1
@@ -518,7 +518,7 @@ int ieee80211_set_hw_encryption(struct nstatic int ieee80211_set_encryption (struct net_device *dev,u8 *sta_addr, -int idx,int alg,int set_tx_key,int *err, +int idx,int alg,int set_tx_key,u32 *err,const u8 *_key,size_t key_len) {struct ieee80211_local *local =wdev_priv (dev->ieee80211_ptr);
Jiri Benc
AppliedQuoted 3 lines · Johannes Berg
This patch fixes the sparse warnings that remain after Michael Wu's patches as well as those I might have introduced myself during the debugfs restructuring...
Applied to my tree, thanks!
Jiri
Signature · 2 lines
Jiri Benc SUSE Labs