All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] connector: fix defined but not used warning
@ 2018-07-07 15:27 Randy Dunlap
  2018-07-08  2:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-07-07 15:27 UTC (permalink / raw)
  To: netdev, David Miller, Evgeniy Polyakov

From: Randy Dunlap <rdunlap@infradead.org>

Fix a build warning in connector.c when CONFIG_PROC_FS is not enabled
by marking the unused function as __maybe_unused.

../drivers/connector/connector.c:242:12: warning: 'cn_proc_show' defined but not used [-Wunused-function]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: netdev@vger.kernel.org
---
 drivers/connector/connector.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-next-20180706.orig/drivers/connector/connector.c
+++ linux-next-20180706/drivers/connector/connector.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/list.h>
@@ -239,7 +240,7 @@ void cn_del_callback(struct cb_id *id)
 }
 EXPORT_SYMBOL_GPL(cn_del_callback);
 
-static int cn_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused cn_proc_show(struct seq_file *m, void *v)
 {
 	struct cn_queue_dev *dev = cdev.cbdev;
 	struct cn_callback_entry *cbq;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] connector: fix defined but not used warning
  2018-07-07 15:27 [PATCH] connector: fix defined but not used warning Randy Dunlap
@ 2018-07-08  2:01 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-08  2:01 UTC (permalink / raw)
  To: rdunlap; +Cc: netdev, zbr

From: Randy Dunlap <rdunlap@infradead.org>
Date: Sat, 7 Jul 2018 08:27:53 -0700

> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix a build warning in connector.c when CONFIG_PROC_FS is not enabled
> by marking the unused function as __maybe_unused.
> 
> ../drivers/connector/connector.c:242:12: warning: 'cn_proc_show' defined but not used [-Wunused-function]
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-08  2:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-07 15:27 [PATCH] connector: fix defined but not used warning Randy Dunlap
2018-07-08  2:01 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.