summaryrefslogtreecommitdiff
path: root/drivers/scsi/NCR5380.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2014-05-29 00:43:43 +1000
committerChristoph Hellwig <hch@lst.de>2014-05-28 18:14:16 +0200
commit16b9d870a0f19f6c1061927a623d9c51c09f2bed (patch)
tree9ac58f343fd79d23b62a6ea3e1fd033525dad54a /drivers/scsi/NCR5380.h
parenta48ac9e5d4f3555bdec2fd61e49fc71b26810d68 (diff)
scsi/NCR5380: dprintk macro
This is the delta between the two submissions: [PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure and [PATCH v2 00/12] scsi/NCR5380: fix debugging macros and #include structure The macro definition changes were discussed on the mailing list during review. The idea is to get the compiler to check the parameters of disabled printk() calls so that the debugging code doesn't rot again. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/NCR5380.h')
-rw-r--r--drivers/scsi/NCR5380.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index 1541c62ddf5f..c79ddfa6f53c 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -295,9 +295,10 @@ struct NCR5380_hostdata {
#define NDEBUG (0)
#endif
+#define dprintk(flg, fmt, ...) \
+ do { if ((NDEBUG) & (flg)) pr_debug(fmt, ## __VA_ARGS__); } while (0)
+
#if NDEBUG
-#define dprintk(flg, fmt, args...) \
- do { if ((NDEBUG) & (flg)) pr_debug(fmt, ## args); } while (0)
#define NCR5380_dprint(flg, arg) \
do { if ((NDEBUG) & (flg)) NCR5380_print(arg); } while (0)
#define NCR5380_dprint_phase(flg, arg) \
@@ -305,7 +306,6 @@ struct NCR5380_hostdata {
static void NCR5380_print_phase(struct Scsi_Host *instance);
static void NCR5380_print(struct Scsi_Host *instance);
#else
-#define dprintk(flg, fmt, args...) do {} while (0)
#define NCR5380_dprint(flg, arg) do {} while (0)
#define NCR5380_dprint_phase(flg, arg) do {} while (0)
#endif