Hi Chetan, On Fri, Feb 17, 2017 at 12:08:02PM +0900, Chetan Sethi wrote:
+ do {if (KS_WLAN_DEBUG > (n)) \ + printk(KERN_NOTICE "%s: "fmt, __FUNCTION__, ## args); \ + } while (0)
Is this fix really necessary? I know checkpatch is complaining, but this isn't a macro that requires the do { } while (0) fix to ensure it is used correctly, it seems kinda superfluous to add it anyway. Checkpatch doesn't emit this error for a single statement `for`, so it seems like a single statement `if` was also probably not intended to be considered 'complex'. On that note though, if it is going to be added I think it would make sense to get the indentation correct with the `do {`: do { \ if (KS_WLAN_DEBUG > (n)) \ prink(...); \ } while (0) Thanks, Matthew Kilgore _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel