Re: [PATCH] staging:board: Macros with flow control statements

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

 



On Tue, May 03, 2016 at 06:01:56AM +0300, Nikita Eshkeev wrote:
> This patch fixes the checkpatch.pl warning:
> 
> WARNING: Macros with flow control statements should be avoided
> +#define board_staging(str, fn)			\
> +static int __init runtime_board_check(void)	\
> +{						\
> +	if (of_machine_is_compatible(str))	\
> +		fn();				\
> +						\
> +	return 0;				\
> +}						\
> +						\
> +device_initcall(runtime_board_check)
> +

That's a dumb warning, the code is fine, as you can see.

checkpatch isn't always correct.

sorry,

greg k-h
_______________________________________________
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