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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 16, 2007 at 09:47:49AM -0500, Eric Van Hensbergen wrote:
 > From: Meelis Roos <[email protected]>
 > 
 > 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 ?

	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 <[email protected]>

--- 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux