From 5848fe960b080b1e731b467b6e026de841c65234 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sat, 7 Mar 2020 21:01:15 -0800 Subject: scsi: fusion: fix if-statement empty body warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When driver debugging is not enabled, change the debug print macros to use the no_printk() macro. This fixes a gcc warning when -Wextra is set: ../drivers/message/fusion/mptlan.c:266:39: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] I have verified that there is very little object code change (with gcc 7.5.0). There are a few changes like: cmp %a,%b jl $1 to cmp %b,%a jg $1 Link: https://lore.kernel.org/r/ff9df31b-c4c1-c942-1cbf-18039e084c8e@infradead.org Cc: Bart Van Assche Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Cc: MPT-FusionLinux.pdl@broadcom.com Cc: Suganath Prabu Subramani Cc: Chaitra P B Cc: Sathya Prakash Reviewed-by: Bart van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen --- drivers/message/fusion/mptlan.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/message') diff --git a/drivers/message/fusion/mptlan.h b/drivers/message/fusion/mptlan.h index 8a24494f8c4d..a1ec7e84d6fe 100644 --- a/drivers/message/fusion/mptlan.h +++ b/drivers/message/fusion/mptlan.h @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -111,13 +112,13 @@ MODULE_DESCRIPTION(LANAME); #ifdef MPT_LAN_IO_DEBUG #define dioprintk(x) printk x #else -#define dioprintk(x) +#define dioprintk(x) no_printk x #endif #ifdef MPT_LAN_DEBUG #define dlprintk(x) printk x #else -#define dlprintk(x) +#define dlprintk(x) no_printk x #endif #define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)netdev_priv(d)) -- cgit v1.2.3