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

net/tls: Fix unused function warning

If PROC_FS is not set, gcc warning this:

net/tls/tls_proc.c:23:12: warning:
'tls_statistics_seq_show' defined but not used [-Wunused-function]

Use #ifdef to guard this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

YueHaibing and committed by
David S. Miller
d6649d78 a98cdaf7

+2
+2
net/tls/tls_proc.c
··· 6 6 #include <net/snmp.h> 7 7 #include <net/tls.h> 8 8 9 + #ifdef CONFIG_PROC_FS 9 10 static const struct snmp_mib tls_mib_list[] = { 10 11 SNMP_MIB_ITEM("TlsCurrTxSw", LINUX_MIB_TLSCURRTXSW), 11 12 SNMP_MIB_ITEM("TlsCurrRxSw", LINUX_MIB_TLSCURRRXSW), ··· 33 32 34 33 return 0; 35 34 } 35 + #endif 36 36 37 37 int __net_init tls_proc_init(struct net *net) 38 38 {