Messages in this thread | | | Subject | Re: [PATCH 1/3] staging: dgng: Fix Macros with complex values should be enclosed in parenthesis | From | Joe Perches <> | Date | Thu, 24 Jul 2014 10:52:34 -0700 |
| |
On Fri, 2014-07-25 at 00:26 +0900, Seunghun Lee wrote: > This patch fixes a checkpatch errors > "Macros with complex values should be enclosed in parenthesis" [] > diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h
> @@ -111,32 +111,32 @@ > #endif > > #if defined TRC_TO_KMEM > -#define PRINTF_TO_KMEM(args) dgnc_tracef args > +#define PRINTF_TO_KMEM(args) do { dgnc_tracef args } while (0)
All this _TO_KMEM code is #if 0 in dgnc_trace.h
It'd be good to change the dgnc_tracef prototype to use __printf(1, 2)
and this code in drivers/staging/dgnc/dgnc_driver.h:
#if defined TRC_TO_CONSOLE #define PRINTF_TO_CONSOLE(args) { printk(DRVSTR": "); printk args; } #else /* !defined TRACE_TO_CONSOLE */ #define PRINTF_TO_CONSOLE(args) #endif
should really consolidate the printk to something like:
#define PRINTF_TO_CONSOLE(fmt, ...) \ printk(KERN_INFO DRVSTR ": " fmt, ##__VA_ARGS__)
| |