Netdev List
 help / color / mirror / Atom feed
* [PATCH] connector: hide unused procfs helpers
@ 2018-07-13  7:11 YueHaibing
  2018-07-13  9:31 ` YueHaibing
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-07-13  7:11 UTC (permalink / raw)
  To: zbr; +Cc: linux-kernel, netdev, YueHaibing

When CONFIG_PROC_FS isn't set, gcc warning this:

drivers/connector/connector.c:242:12: warning: ‘cn_proc_show’ defined but not used [-Wunused-function]
 static int cn_proc_show(struct seq_file *m, void *v)
            ^
fix this by adding #ifdef around it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/connector/connector.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index e718b8c..e2636d4 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -239,6 +239,7 @@ void cn_del_callback(struct cb_id *id)
 }
 EXPORT_SYMBOL_GPL(cn_del_callback);
 
+#ifdef CONFIG_PROC_FS
 static int cn_proc_show(struct seq_file *m, void *v)
 {
 	struct cn_queue_dev *dev = cdev.cbdev;
@@ -259,6 +260,7 @@ static int cn_proc_show(struct seq_file *m, void *v)
 
 	return 0;
 }
+#endif
 
 static struct cn_dev cdev = {
 	.input   = cn_rx_skb,
-- 
2.7.0

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

end of thread, other threads:[~2018-07-13  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-13  7:11 [PATCH] connector: hide unused procfs helpers YueHaibing
2018-07-13  9:31 ` YueHaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox