Skip to content

Commit

Permalink
[NET]: Protect neigh_stat_seq_fops by CONFIG_PROC_FS
Browse files Browse the repository at this point in the history
From: Amos Waterland <apw@us.ibm.com>

If CONFIG_PROC_FS is not selected, the compiler emits this warning:

 net/core/neighbour.c:64: warning: `neigh_stat_seq_fops' defined but not used

Which is correct, because neigh_stat_seq_fops is in fact only
initialized and used by code that is protected by CONFIG_PROC_FS.  So
this patch fixes that up.

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amos Waterland authored and David S. Miller committed Sep 24, 2005
1 parent d67b24c commit 45fc3b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);

static struct neigh_table *neigh_tables;
#ifdef CONFIG_PROC_FS
static struct file_operations neigh_stat_seq_fops;
#endif

/*
Neighbour hash table buckets are protected with rwlock tbl->lock.
Expand Down

0 comments on commit 45fc3b1

Please sign in to comment.