summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2018-07-07 08:27:53 -0700
committerDavid S. Miller <davem@davemloft.net>2018-07-08 11:00:50 +0900
commitd2af686c2df82659673c2a795c06dcd37730a3b9 (patch)
treeb3aca0185bac6c87c18f452365f83cdcee55fa14 /drivers
parent005c1c0eac82d76214581e9698ee183c2df9f3c6 (diff)
connector: fix defined but not used warning
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 Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/connector/connector.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index e718b8c69a56..eeb7d31cbda5 100644
--- a/drivers/connector/connector.c
+++ b/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;