fix warning and compiletime error in neighbour.c
PATCH 1/1 fix warning and compiletime error in neighbour.c
Hi Marcelo,
This patch fixes the following:
gcc -D__KERNEL__ -I/home/mb/kernel/linux-2.4.28-rc1-bk4/include \
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing \
-fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 \
-march=i586 -nostdinc -iwithprefix include \
-DKBUILD_BASENAME=neighbour -c -o neighbour.o neighbour.c neighbour.c: In function `neigh_seq_stop':
neighbour.c:1805: warning: unused variable `tbl' neighbour.c: At top level:
neighbour.c:1901: THIS_MODULE' undeclared here (not in a function) neighbour.c:1901: initializer element is not constant neighbour.c:1901: (near initialization for neigh_stat_seq_fops.owner')
Sorry for the attachment. My mailer is currently broken and corrupts diffs.
net/core/neighbour.c renamed from net/core/neighbour.c.orig +2 -4
@@ -31,6 +31,7 @@#include <net/sock.h> #include <linux/rtnetlink.h> #include <linux/random.h> +#include <linux/module.h> #define NEIGH_DEBUG 1
@@ -1801,10 +1802,7 @@void neigh_seq_stop (struct seq_file *seq,void *v) { -struct neigh_seq_state *state = seq->private; -struct neigh_table *tbl = state->tbl; - -read_unlock_bh (&tbl->lock); +read_unlock_bh (&seq->private->tbl->lock); }/* statistics via seq_file */