mac80211: add declarations for wake/stop_queue_by_reason()
PATCH 1/1 mac80211: add declarations for wake/stop_queue_by_reason()
Fixes sparse warnings:
net/mac80211/util.c:355:6: warning: symbol
'ieee80211_wake_queue_by_reason' was not declared. Should it be static?net/mac80211/util.c:385:6: warning: symbol
'ieee80211_stop_queue_by_reason' was not declared. Should it be static?
Thanks to Johannes Berg for reporting this.
---
net/mac80211/ieee80211_i.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
net/mac80211/ieee80211_i.h +4 -0
@@ -991,6 +991,10 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local,struct ieee80211_sub_if_data *sdata, int powersave); +void ieee80211_wake_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason); +void ieee80211_stop_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason);void ieee80211_wake_queues_by_reason (struct ieee80211_hw *hw,enum queue_stop_reason reason); void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
Quoted 6 lines · Kalle Valo
Fixes sparse warnings:
net/mac80211/util.c:355:6: warning: symbol
'ieee80211_wake_queue_by_reason' was not declared. Should it be static?net/mac80211/util.c:385:6: warning: symbol
'ieee80211_stop_queue_by_reason' was not declared. Should it be static?
...
net/mac80211/ieee80211_i.h void ieee80211_send_nullfunc(struct ieee80211_local *local, · line 997
Quoted 4 lines
net/mac80211/ieee80211_i.h +4
-0+void ieee80211_wake_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason); +void ieee80211_stop_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason);
What's the point in declaring functions that are not used elsewhere? Why not make them static as sparse suggests? And if those function are going to be used by other modules, maybe they should be exported?
Signature · 2 lines
Regards, Pavel Roskin
Quoted 10 lines · Pavel Roskin
Quoted 6 lines · Kalle Valo
Fixes sparse warnings:
net/mac80211/util.c:355:6: warning: symbol
'ieee80211_wake_queue_by_reason' was not declared. Should it be static?net/mac80211/util.c:385:6: warning: symbol
'ieee80211_stop_queue_by_reason' was not declared. Should it be static?...
Quoted 7 lines
net/mac80211/ieee80211_i.h void ieee80211_send_nullfunc(struct ieee80211_local *local, · line 997
Quoted 4 lines
net/mac80211/ieee80211_i.h +4
-0+void ieee80211_wake_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason); +void ieee80211_stop_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason);What's the point in declaring functions that are not used elsewhere? Why not make them static as sparse suggests?
I was thinking that maybe in the the future the are other users in mac80211, but your comment made me rethink this and I agree with you, they should be static.
Please forget this patch, I'll send a new one.
Quoted 2 lines
And if those function are going to be used by other modules, maybe they should be exported?
This is a mac80211 internal interface, not to be used by the drivers. So it should not be exported.
Signature · 1 line
Kalle Valo
PATCH v2 1/1 mac80211: make wake/stop_queue_by_reason() functions static
Fixes sparse warnings:
net/mac80211/util.c:355:6: warning: symbol
'ieee80211_wake_queue_by_reason' was not declared. Should it be static?net/mac80211/util.c:385:6: warning: symbol
'ieee80211_stop_queue_by_reason' was not declared. Should it be static?
Thanks to Johannes Berg for reporting this.
---
net/mac80211/util.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
net/mac80211/util.c +4 -4
@@ -352,8 +352,8 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue, } } -void ieee80211_wake_queue_by_reason (struct ieee80211_hw *hw,int queue, -enum queue_stop_reason reason) +static void ieee80211_wake_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason) {struct ieee80211_local *local =hw_to_local (hw);unsigned long flags;
@@ -382,8 +382,8 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,netif_stop_subqueue (local->mdev, queue); } -void ieee80211_stop_queue_by_reason (struct ieee80211_hw *hw,int queue, -enum queue_stop_reason reason) +static void ieee80211_stop_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason) {struct ieee80211_local *local =hw_to_local (hw);unsigned long flags;
Re: [PATCH v2] mac80211: make wake/stop_queue_by_reason() functions static
Quoted 10 lines · Kalle Valo
Fixes sparse warnings:
net/mac80211/util.c:355:6: warning: symbol
'ieee80211_wake_queue_by_reason' was not declared. Should it be static?net/mac80211/util.c:385:6: warning: symbol
'ieee80211_stop_queue_by_reason' was not declared. Should it be static?Thanks to Johannes Berg for reporting this.
Signed-off-by Kalle Valo <[email protected]>
Your discussion was a little quirky though; they weren't exported to drivers by listing them in ieee80211_i.h, and we might well want to use them in other parts of mac80211 later (and will just make them non-static at that point)
Quoted 37 lines
---
net/mac80211/util.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)net/mac80211/util.c +4
-5@@ -352,8 +352,8 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue, } } -void ieee80211_wake_queue_by_reason (struct ieee80211_hw *hw,int queue, -enum queue_stop_reason reason) +static void ieee80211_wake_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason) {struct ieee80211_local *local =hw_to_local (hw);unsigned long flags;@@ -382,8 +382,8 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,netif_stop_subqueue (local->mdev, queue); } -void ieee80211_stop_queue_by_reason (struct ieee80211_hw *hw,int queue, -enum queue_stop_reason reason) +static void ieee80211_stop_queue_by_reason (struct ieee80211_hw *hw,int queue, +enum queue_stop_reason reason) {struct ieee80211_local *local =hw_to_local (hw);unsigned long flags; --To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html