* [PATCH V2] p54: Fix compile warning
@ 2011-02-15 15:37 Larry Finger
2011-02-15 15:48 ` Christian Lamparter
0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2011-02-15 15:37 UTC (permalink / raw)
To: John W Linville, chunkeey; +Cc: linux-wireless
If any of the p54-based drivers are built with CONFIG_P54_LEDS not
defined, the following warning is generated:
CC [M] drivers/net/wireless/p54/main.o
drivers/net/wireless/p54/main.c: In function ‘p54_register_common’:
drivers/net/wireless/p54/main.c:614:21: warning: unused variable ‘priv’
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
V2 - use __maybe_unused instead of conditional compilation
---
Index: wireless-testing/drivers/net/wireless/p54/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/p54/main.c
+++ wireless-testing/drivers/net/wireless/p54/main.c
@@ -611,7 +611,7 @@ EXPORT_SYMBOL_GPL(p54_init_common);
int p54_register_common(struct ieee80211_hw *dev, struct device *pdev)
{
- struct p54_common *priv = dev->priv;
+ struct p54_common __maybe_unused *priv = dev->priv;
int err;
err = ieee80211_register_hw(dev);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH V2] p54: Fix compile warning
2011-02-15 15:37 [PATCH V2] p54: Fix compile warning Larry Finger
@ 2011-02-15 15:48 ` Christian Lamparter
0 siblings, 0 replies; 2+ messages in thread
From: Christian Lamparter @ 2011-02-15 15:48 UTC (permalink / raw)
To: Larry Finger, linux-wireless; +Cc: John W Linville
On Tuesday 15 February 2011 16:37:06 Larry Finger wrote:
> If any of the p54-based drivers are built with CONFIG_P54_LEDS not
> defined, the following warning is generated:
>
> CC [M] drivers/net/wireless/p54/main.o
> drivers/net/wireless/p54/main.c: In function ‘p54_register_common’:
> drivers/net/wireless/p54/main.c:614:21: warning: unused variable ‘priv’
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> V2 - use __maybe_unused instead of conditional compilation
well, there is a third option [use the priv in the dev_info)
However, this approach is fine too.
Regards,
Chr
BTW, John... What's your ?WG511? doing?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-15 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-15 15:37 [PATCH V2] p54: Fix compile warning Larry Finger
2011-02-15 15:48 ` Christian Lamparter
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).