From: Finn Thain <fthain@telegraphics.com.au>
To: Christoph Hellwig <hch@infradead.org>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org, Sam Creasey <sammy@sammy.net>,
Russell King <linux@arm.linux.org.uk>,
Michael Schmitz <schmitz@debian.org>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-m68k@vger.kernel.org
Subject: [PATCH] scsi/NCR5380: dprintk macro
Date: Thu, 29 May 2014 00:43:43 +1000 (EST) [thread overview]
Message-ID: <alpine.LNX.2.00.1405290020570.3539@nippy.intranet> (raw)
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>
---
I know the whitespace is wrong throughout these drivers but when I put
this patch series together it seemed best to defer the whitespace cleanup.
(I still intend to do that cleanup.)
diff -ru v1/drivers/scsi/NCR5380.h v2/drivers/scsi/NCR5380.h
--- v1/drivers/scsi/NCR5380.h 2014-05-29 00:07:28.525627086 +1000
+++ v2/drivers/scsi/NCR5380.h 2014-05-29 00:06:41.335557873 +1000
@@ -295,9 +295,10 @@
#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 @@
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
diff -ru v1/drivers/scsi/sun3_NCR5380.c v2/drivers/scsi/sun3_NCR5380.c
--- v1/drivers/scsi/sun3_NCR5380.c 2014-05-29 00:07:28.525627086 +1000
+++ v2/drivers/scsi/sun3_NCR5380.c 2014-05-29 00:06:41.355557902 +1000
@@ -1006,12 +1006,8 @@
for (tmp = (struct scsi_cmnd *) hostdata->issue_queue,
prev = NULL; tmp; prev = tmp, tmp = NEXT(tmp) ) {
-#if (NDEBUG & NDEBUG_LISTS)
if (prev != tmp)
- printk("MAIN tmp=%p target=%d busy=%d lun=%d\n",
- tmp, tmp->target, hostdata->busy[tmp->target],
- tmp->lun);
-#endif
+ dprintk(NDEBUG_LISTS, "MAIN tmp=%p target=%d busy=%d lun=%d\n", tmp, tmp->device->id, hostdata->busy[tmp->device->id], tmp->device->lun);
/* When we find one, remove it from the issue queue. */
/* ++guenther: possible race with Falcon locking */
if (
next reply other threads:[~2014-05-28 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 14:43 Finn Thain [this message]
2014-05-28 15:53 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.00.1405290020570.3539@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=JBottomley@parallels.com \
--cc=hch@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sammy@sammy.net \
--cc=schmitz@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®