* [PATCH] mac80211: add declarations for wake/stop_queue_by_reason()
@ 2008-12-28 18:54 Kalle Valo
2008-12-28 21:36 ` Pavel Roskin
0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2008-12-28 18:54 UTC (permalink / raw)
To: linux-wireless
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 <kalle.valo@iki.fi>
---
net/mac80211/ieee80211_i.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 117718b..b6b40ec 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -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,
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: add declarations for wake/stop_queue_by_reason()
2008-12-28 18:54 [PATCH] mac80211: add declarations for wake/stop_queue_by_reason() Kalle Valo
@ 2008-12-28 21:36 ` Pavel Roskin
2008-12-29 6:03 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Roskin @ 2008-12-28 21:36 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
On Sun, 2008-12-28 at 20:54 +0200, Kalle Valo wrote:
> 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?
...
> +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?
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: add declarations for wake/stop_queue_by_reason()
2008-12-28 21:36 ` Pavel Roskin
@ 2008-12-29 6:03 ` Kalle Valo
2008-12-29 8:02 ` [PATCH v2] mac80211: make wake/stop_queue_by_reason() functions static Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2008-12-29 6:03 UTC (permalink / raw)
To: Pavel Roskin; +Cc: linux-wireless
Pavel Roskin <proski@gnu.org> writes:
> On Sun, 2008-12-28 at 20:54 +0200, Kalle Valo wrote:
>> 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?
>
> ...
>
>> +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.
> 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.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] mac80211: make wake/stop_queue_by_reason() functions static
2008-12-29 6:03 ` Kalle Valo
@ 2008-12-29 8:02 ` Kalle Valo
2008-12-29 10:51 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2008-12-29 8:02 UTC (permalink / raw)
To: linux-wireless
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 <kalle.valo@iki.fi>
---
net/mac80211/util.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index fb89e1d..5cd4303 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -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;
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] mac80211: make wake/stop_queue_by_reason() functions static
2008-12-29 8:02 ` [PATCH v2] mac80211: make wake/stop_queue_by_reason() functions static Kalle Valo
@ 2008-12-29 10:51 ` Johannes Berg
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2008-12-29 10:51 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]
On Mon, 2008-12-29 at 10:02 +0200, Kalle Valo wrote:
> 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 <kalle.valo@iki.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
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)
> ---
>
> net/mac80211/util.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index fb89e1d..5cd4303 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-29 10:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-28 18:54 [PATCH] mac80211: add declarations for wake/stop_queue_by_reason() Kalle Valo
2008-12-28 21:36 ` Pavel Roskin
2008-12-29 6:03 ` Kalle Valo
2008-12-29 8:02 ` [PATCH v2] mac80211: make wake/stop_queue_by_reason() functions static Kalle Valo
2008-12-29 10:51 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).