summaryrefslogtreecommitdiff
path: root/drivers/message
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2020-03-07 21:01:15 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2020-03-11 23:07:57 -0400
commit5848fe960b080b1e731b467b6e026de841c65234 (patch)
tree26ac1ab742f81fe4a3f411527d8344df92782df1 /drivers/message
parentcc6b32ee3b914d3036a4d364fd4918b48fc034eb (diff)
downloadlinux-stable-5848fe960b080b1e731b467b6e026de841c65234.tar.gz
scsi: fusion: fix if-statement empty body warning
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 <bvanassche@acm.org> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Cc: MPT-FusionLinux.pdl@broadcom.com Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com> Cc: Chaitra P B <chaitra.basappa@broadcom.com> Cc: Sathya Prakash <sathya.prakash@broadcom.com> Reviewed-by: Bart van Assche <bvanassche@acm.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptlan.h5
1 files changed, 3 insertions, 2 deletions
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 <linux/if_arp.h>
#include <linux/init.h>
#include <linux/kernel.h>
+#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
@@ -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))