summaryrefslogtreecommitdiffstats
path: root/net/tls
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-11-14 08:39:46 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-15 21:12:28 +0100
commitd6649d788e1a40b9bf2064bee4d7960fe85bd81e (patch)
treed093b40473488d86bd9ef135ce252b4db572816a /net/tls
parentMerge branch 's390-next' (diff)
downloadlinux-d6649d788e1a40b9bf2064bee4d7960fe85bd81e.tar.xz
linux-d6649d788e1a40b9bf2064bee4d7960fe85bd81e.zip
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>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tls/tls_proc.c b/net/tls/tls_proc.c
index 83d9c80a684e..3a5dd1e07233 100644
--- a/net/tls/tls_proc.c
+++ b/net/tls/tls_proc.c
@@ -6,6 +6,7 @@
#include <net/snmp.h>
#include <net/tls.h>
+#ifdef CONFIG_PROC_FS
static const struct snmp_mib tls_mib_list[] = {
SNMP_MIB_ITEM("TlsCurrTxSw", LINUX_MIB_TLSCURRTXSW),
SNMP_MIB_ITEM("TlsCurrRxSw", LINUX_MIB_TLSCURRRXSW),
@@ -32,6 +33,7 @@ static int tls_statistics_seq_show(struct seq_file *seq, void *v)
return 0;
}
+#endif
int __net_init tls_proc_init(struct net *net)
{