Search Linux Wireless

[PATCH V2] p54: Fix compile warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---

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);
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux