Skip to content

Commit

Permalink
scsi: aic94xx: Avoid -Wempty-body warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Bergmann authored and Martin K. Petersen committed Apr 2, 2021
1 parent e27f3c8 commit 6c26379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/aic94xx/aic94xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifdef ASD_DEBUG
#define ASD_DPRINTK asd_printk
#else
#define ASD_DPRINTK(fmt, ...)
#define ASD_DPRINTK(fmt, ...) no_printk(fmt, ##__VA_ARGS__)
#endif

/* 2*ITNL timeout + 1 second */
Expand Down

0 comments on commit 6c26379

Please sign in to comment.