[PATCH] Bad fix to arcdevice.h

C. Scott Ananian (cananian@lcs.mit.edu)
Wed, 20 May 1998 23:14:24 -0400 (EDT)


Linux-kernel 2.1.103 contains the following patch to arcdevice.h:

x--- v2.1.102/linux/include/linux/arcdevice.h Sun Dec 21 17:27:17 1997
x+++ linux/include/linux/arcdevice.h Thu May 14 18:57:36 1998
x@@ -114,10 +114,11 @@
x /* macros to simplify debug checking */
x #define BUGLVL(x) if ((ARCNET_DEBUG_MAX)&arcnet_debug&(x))
x #define BUGMSG2(x,msg,args...) BUGLVL(x) printk(msg, ## args)
x-#define BUGMSG(x,msg,args...) BUGMSG2(x,"%s%6s: " msg, \
x+#define BUGMSG(x,msg,args...) do { \
x+ BUGMSG2(x,"%s%6s: " msg, \
x x==D_NORMAL ? KERN_WARNING : \
x x<=D_INIT_REASONS ? KERN_INFO : KERN_DEBUG , \
x- dev->name , ## args)
x+ dev->name , ## args); } while (0)

I don't like this patch at all. It leaves corrects BUGMSG but leaves
BUGMSG2 uncorrected. BUGMSG2 is in fact used in the kernel (see
linux/drivers/net/com90xx.c). I propose the attached patch (on top of
2.1.103) to remedy the problem correctly.
--Scott
@ @
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-oOO-(_)-OOo-=-=-=-=-=
C. Scott Ananian: cananian@lcs.mit.edu / Declare the Truth boldly and
Laboratory for Computer Science/Crypto / without hindrance.
Massachusetts Institute of Technology /META-PARRESIAS AKOLUTOS:Acts 28:31
-.-. .-.. .. ..-. ..-. --- .-. -.. ... -.-. --- - - .- -. .- -. .. .- -.
PGP key available via finger and from http://www.pdos.lcs.mit.edu/~cananian

--- linux/include/linux/arcdevice.h.orig Wed May 20 23:05:29 1998
+++ linux/include/linux/arcdevice.h Wed May 20 23:06:56 1998
@@ -113,12 +113,12 @@

/* macros to simplify debug checking */
#define BUGLVL(x) if ((ARCNET_DEBUG_MAX)&arcnet_debug&(x))
-#define BUGMSG2(x,msg,args...) BUGLVL(x) printk(msg, ## args)
-#define BUGMSG(x,msg,args...) do { \
+#define BUGMSG2(x,msg,args...) do { BUGLVL(x) printk(msg, ## args) } while(0)
+#define BUGMSG(x,msg,args...) \
BUGMSG2(x,"%s%6s: " msg, \
x==D_NORMAL ? KERN_WARNING : \
x<=D_INIT_REASONS ? KERN_INFO : KERN_DEBUG , \
- dev->name , ## args); } while (0)
+ dev->name , ## args)


#define SETMASK AINTMASK(lp->intmask)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu