Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Randy Dunlap and committed by
David S. Miller
d2af686c 005c1c0e

+2 -1
+2 -1
drivers/connector/connector.c
··· 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 */ 21 21 22 + #include <linux/compiler.h> 22 23 #include <linux/kernel.h> 23 24 #include <linux/module.h> 24 25 #include <linux/list.h> ··· 240 239 } 241 240 EXPORT_SYMBOL_GPL(cn_del_callback); 242 241 243 - static int cn_proc_show(struct seq_file *m, void *v) 242 + static int __maybe_unused cn_proc_show(struct seq_file *m, void *v) 244 243 { 245 244 struct cn_queue_dev *dev = cdev.cbdev; 246 245 struct cn_callback_entry *cbq;