public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: joe@perches.com (Joe Perches)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure
Date: Tue, 18 Mar 2014 06:07:31 -0700	[thread overview]
Message-ID: <1395148051.2812.51.camel@joe-AO722> (raw)
In-Reply-To: <CAMuHMdUMpdp7deL5zC4hUVTHjyNbtkZ2bNFupo5JiDyuyc345w@mail.gmail.com>

On Tue, 2014-03-18 at 13:55 +0100, Geert Uytterhoeven wrote:
> On Tue, Mar 18, 2014 at 1:45 PM, Joe Perches <joe@perches.com> wrote:

Hi Geert.

> > #define dprintk(flg, fmt, ...) \
> > do { if (0) pr_debug(fmt, ##__VA_ARGS__); } while (0)
> 
> Na, no_printk():
> 
> #define dprintk(flg, fmt, ...) no_printk(fmt, ##__VA_ARGS__)

Fine, but with a correction.

no_printk keeps all side effects like
performing any function calls made by the
statement or accessing any volatiles.

Using

do { if (0) no_printk(fmt, ##__VA_ARGS__); } while (0)

does not have any side-effects.

  reply	other threads:[~2014-03-18 13:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140318002822.372705594@telegraphics.com.au>
2014-03-18  3:19 ` [PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure Joe Perches
2014-03-18 12:00   ` Finn Thain
2014-03-18 12:45     ` Joe Perches
2014-03-18 12:55       ` Geert Uytterhoeven
2014-03-18 13:07         ` Joe Perches [this message]
2014-03-18 13:13           ` Geert Uytterhoeven
2014-03-18 13:20             ` Joe Perches
2014-03-18 23:14           ` Finn Thain
2014-03-19  0:47             ` Joe Perches
2014-03-19  1:46               ` Finn Thain
2014-03-19  1:54                 ` Joe Perches
2014-03-18  0:42 Finn Thain

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=1395148051.2812.51.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=linux-arm-kernel@lists.infradead.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