summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_logging.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_logging.h')
-rw-r--r--drivers/scsi/scsi_logging.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_logging.h b/drivers/scsi/scsi_logging.h
index e1722ba94586..a3e2af6a846c 100644
--- a/drivers/scsi/scsi_logging.h
+++ b/drivers/scsi/scsi_logging.h
@@ -45,10 +45,12 @@ extern unsigned int scsi_logging_level;
((scsi_logging_level >> (SHIFT)) & ((1 << (BITS)) - 1))
#define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) \
-{ \
+do { \
if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \
- (CMD); \
-}
+ do { \
+ CMD; \
+ } while (0); \
+} while (0)
#else
#define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD)
#endif /* CONFIG_SCSI_LOGGING */
OpenPOWER on IntegriCloud