mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
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>
This commit is contained in:
parent
a98cdaf73e
commit
d6649d788e
1 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include <net/snmp.h>
|
#include <net/snmp.h>
|
||||||
#include <net/tls.h>
|
#include <net/tls.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_PROC_FS
|
||||||
static const struct snmp_mib tls_mib_list[] = {
|
static const struct snmp_mib tls_mib_list[] = {
|
||||||
SNMP_MIB_ITEM("TlsCurrTxSw", LINUX_MIB_TLSCURRTXSW),
|
SNMP_MIB_ITEM("TlsCurrTxSw", LINUX_MIB_TLSCURRTXSW),
|
||||||
SNMP_MIB_ITEM("TlsCurrRxSw", LINUX_MIB_TLSCURRRXSW),
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int __net_init tls_proc_init(struct net *net)
|
int __net_init tls_proc_init(struct net *net)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue