Re: [PATCH 1/3] staging: dgng: Fix Macros with complex values should be enclosed in parenthesis

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

 



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__)


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux