summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_logging.h
diff options
context:
space:
mode:
authorakpm@osdl.org <akpm@osdl.org>2006-04-15 11:30:24 +0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-15 18:04:40 +0400
commitc5f2e6404c65e8380c9ba80a7d58a27d2642743b (patch)
treea8af59f4cd7154032ac35486586babe73467b3c9 /drivers/scsi/scsi_logging.h
parentcdb8c2a6d848deb9eeefffff42974478fbb51b8c (diff)
downloadlinux-c5f2e6404c65e8380c9ba80a7d58a27d2642743b.tar.xz
[SCSI] scsi_scan.c: fix compile warnings
drivers/scsi/scsi_scan.c: In function `scsi_probe_and_add_lun': drivers/scsi/scsi_scan.c:926: warning: unused variable `vend' drivers/scsi/scsi_scan.c:926: warning: unused variable `mod' drivers/scsi/scsi_scan.c: At top level: drivers/scsi/scsi_scan.c:829: warning: `scsi_inq_str' defined but not used Fix those, tighten up the (somewhat poorly-designed) logging macro and fix some coding-style warts. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
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 */