[PATCH] [SCSI] mpt2sas: fix build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes this warning:

drivers/scsi/mpt2sas/mpt2sas_scsih.c: In function ‘_scsih_sas_broadcast_primitive_event’:
drivers/scsi/mpt2sas/mpt2sas_scsih.c:5810:40: warning: unused variable ‘event_data’ [-Wunused-variable]

when CONFIG_SCSI_MPT2SAS_LOGGING is not enabled.

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 drivers/scsi/mpt2sas/mpt2sas_debug.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Equivalent patches for drivers/message/fusion/mptdebug.h and
drivers/scsi/mpt3sas/mpt3sas_debug.h would fix similar, but to me
theoretical, warnings.

diff --git a/drivers/scsi/mpt2sas/mpt2sas_debug.h b/drivers/scsi/mpt2sas/mpt2sas_debug.h
index 69cc7d0..18b9a0c 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_debug.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_debug.h
@@ -79,7 +79,11 @@
 		CMD;						\
 }
 #else
-#define MPT_CHECK_LOGGING(IOC, CMD, BITS)
+#define MPT_CHECK_LOGGING(IOC, CMD, BITS)			\
+{								\
+	if (0)							\
+		CMD;						\
+}
 #endif /* CONFIG_SCSI_MPT2SAS_LOGGING */
 
 
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

Attachment: pgpZQYLVydwZT.pgp
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux