* [PATCH 2.4] fix warning and compiletime error in neighbour.c
@ 2004-11-07 13:46 Michael Buesch
0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2004-11-07 13:46 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linux kernel mailing list
[-- Attachment #1: Type: text/plain, Size: 746 bytes --]
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.
[-- Attachment #2: net-neighbour-fix.diff --]
[-- Type: text/x-diff, Size: 579 bytes --]
--- linux-2.4.28-rc1-bk4/net/core/neighbour.c.orig Sun Nov 7 15:09:36 2004
+++ linux-2.4.28-rc1-bk4/net/core/neighbour.c Sun Nov 7 15:16:10 2004
@@ -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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-11-07 16:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-07 13:46 [PATCH 2.4] fix warning and compiletime error in neighbour.c Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox