rtlwifi: Convert RTPRINT macro to use ##__VA_ARGS__

Consolidate printks to avoid possible message interleaving
and reduce the object size.

Remove unnecessary RTPRINT parentheses.
Coalesce formats.
Align arguments.

$ size drivers/net/wireless/rtlwifi/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 590002	  55333	 127560	 772895	  bcb1f	drivers/net/wireless/rtlwifi/built-in.o.new
 594841	  55333	 129680	 779854	  be64e	drivers/net/wireless/rtlwifi/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Joe Perches
2012-01-04 19:40:42 -08:00
committed by John W. Linville
parent f30d7507a8
commit 4c48869f5d
9 changed files with 355 additions and 370 deletions

View File

@@ -175,11 +175,11 @@ do { \
} \
} while (0)
#define RTPRINT(rtlpriv, dbgtype, dbgflag, printstr) \
#define RTPRINT(rtlpriv, dbgtype, dbgflag, fmt, ...) \
do { \
if (unlikely(rtlpriv->dbg.dbgp_type[dbgtype] & dbgflag)) { \
printk(KERN_DEBUG "%s: ", KBUILD_MODNAME); \
printk printstr; \
printk(KERN_DEBUG KBUILD_MODNAME ": " fmt, \
##__VA_ARGS__); \
} \
} while (0)