Re: [PATCH] 9p: fix debug compilation error

From: Eric Van Hensbergen
Date: Mon Jul 16 2007 - 17:02:56 EST


On 7/16/07, Dave Jones <davej@xxxxxxxxxx> wrote:
On Mon, Jul 16, 2007 at 09:47:49AM -0500, Eric Van Hensbergen wrote:
> From: Meelis Roos <mroos@xxxxxxxx>
>
> With 9P but no 9P debug options, this error occurs:
> CC [M] fs/9p/v9fs.o
> fs/9p/v9fs.c: In function 'v9fs_parse_options':
> fs/9p/v9fs.c:134: error: 'p9_debug_level' undeclared (first use in this function)
>
> The following patch moves the definition of p9_debug_level out of #ifdef
> and seems to fix the problem.
>
> (Original patch took care of the extern definition in the includes, but
> not the actual definition in mod.c - ericvh)

Seems somewhat wasteful to include the debug options when the config
option has been disabled though.
Wouldn't something like this (untested) make more sense ?

Fair enough. Looks like I introduced this when I put back the
mount-time debug option.


Dave

---

fs/9p/v9fs.c: In function 'v9fs_parse_options':
fs/9p/v9fs.c:134: error: 'p9_debug_level' undeclared (first use in this function)

Signed-off-by: Dave Jones <davej@xxxxxxxxxx>
Acked-by: Eric Van Hensbergen <ericvh@xxxxxxxxx>


--- linux-2.6.22.noarch/fs/9p/v9fs.c~ 2007-07-16 11:45:56.000000000 -0400
+++ linux-2.6.22.noarch/fs/9p/v9fs.c 2007-07-16 11:46:12.000000000 -0400
@@ -131,7 +131,9 @@ static void v9fs_parse_options(char *opt
switch (token) {
case Opt_debug:
v9ses->debug = option;
+#ifdef CONFIG_NET_9P_DEBUG
p9_debug_level = option;
+#endif
break;
case Opt_port:
v9ses->port = option;

--
http://www.codemonkey.org.uk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/