diff mbox

net/wireless/atmel: fix defined but not used warning

Message ID d6ed90e1-c41e-d5b6-c892-ea5e1e6ad7e6@infradead.org (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Randy Dunlap July 7, 2018, 3:33 p.m. UTC
From: Randy Dunlap <rdunlap@infradead.org>

Fix a build warning in drivers/net/wireless/atmel/ when CONFIG_PROC_FS
is not enabled by marking the unused function as __maybe_unused.

../drivers/net/wireless/atmel/atmel.c:1402:12: warning: 'atmel_proc_show' defined but not used [-Wunused-function]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Simon Kelley <simon@thekelleys.org.uk>
Cc: linux-wireless@vger.kernel.org
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
---
 drivers/net/wireless/atmel/atmel.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kalle Valo July 31, 2018, 7:05 a.m. UTC | #1
Randy Dunlap <rdunlap@infradead.org> wrote:

> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix a build warning in drivers/net/wireless/atmel/ when CONFIG_PROC_FS
> is not enabled by marking the unused function as __maybe_unused.
> 
> ../drivers/net/wireless/atmel/atmel.c:1402:12: warning: 'atmel_proc_show' defined but not used [-Wunused-function]
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Simon Kelley <simon@thekelleys.org.uk>
> Cc: linux-wireless@vger.kernel.org
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: netdev@vger.kernel.org

I'll drop this as I take Yue's version instead.

Patch set to Changes Requested.
diff mbox

Patch

--- linux-next-20180706.orig/drivers/net/wireless/atmel/atmel.c
+++ linux-next-20180706/drivers/net/wireless/atmel/atmel.c
@@ -39,6 +39,7 @@ 
 
 ******************************************************************************/
 
+#include <linux/compiler.h>
 #include <linux/interrupt.h>
 
 #include <linux/kernel.h>
@@ -1399,7 +1400,7 @@  static int atmel_validate_channel(struct
 	return 0;
 }
 
-static int atmel_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused atmel_proc_show(struct seq_file *m, void *v)
 {
 	struct atmel_private *priv = m->private;
 	int i;