Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: aic94xx: Avoid -Wempty-body warning

Building with 'make W=1' shows a harmless -Wempty-body warning:

drivers/scsi/aic94xx/aic94xx_init.c: In function 'asd_free_queues':
drivers/scsi/aic94xx/aic94xx_init.c:858:62: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
858 | ASD_DPRINTK("Uh-oh! Pending is not empty!\n");

Change the empty ASD_DPRINTK() macro to no_printk(), which avoids this
warning and adds format string checking.

Link: https://lore.kernel.org/r/20210322102549.278661-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Arnd Bergmann and committed by
Martin K. Petersen
6c26379d e27f3c88

+1 -1
+1 -1
drivers/scsi/aic94xx/aic94xx.h
··· 33 33 #ifdef ASD_DEBUG 34 34 #define ASD_DPRINTK asd_printk 35 35 #else 36 - #define ASD_DPRINTK(fmt, ...) 36 + #define ASD_DPRINTK(fmt, ...) no_printk(fmt, ##__VA_ARGS__) 37 37 #endif 38 38 39 39 /* 2*ITNL timeout + 1 second */