From: Andrew Morton <akpm@osdl.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, schwidefsky@de.ibm.com
Subject: Re: do { } while (0) question
Date: Tue, 1 Aug 2006 01:49:13 -0700 [thread overview]
Message-ID: <20060801014913.5eec556c.akpm@osdl.org> (raw)
In-Reply-To: <20060801082109.GB9589@osiris.boeblingen.de.ibm.com>
On Tue, 1 Aug 2006 10:21:09 +0200
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> Hi Andrew,
>
> your commit e2c2770096b686b4d2456173f53cb50e01aa635c does this:
>
> ---
> Always use do {} while (0). Failing to do so can cause subtle compile
> failures or bugs.
>
> -#define hotcpu_notifier(fn, pri)
> -#define register_hotcpu_notifier(nb)
> -#define unregister_hotcpu_notifier(nb)
> +#define hotcpu_notifier(fn, pri) do { } while (0)
> +#define register_hotcpu_notifier(nb) do { } while (0)
> +#define unregister_hotcpu_notifier(nb) do { } while (0)
<strains brain>
Can't remember. Maybe it's OK in this case.
Would it be too weazelly to say "because CodingStyle says to"? ;)
next prev parent reply other threads:[~2006-08-01 8:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 8:21 Heiko Carstens
2006-08-01 8:45 ` Jonathan Matthews-Levine
2006-08-01 8:53 ` Heiko Carstens
2006-08-01 16:26 ` Andrew James Wade
2006-08-01 8:49 ` Andrew Morton [this message]
2006-08-01 8:52 ` Jiri Slaby
2006-08-01 9:03 ` Hua Zhong
2006-08-01 9:39 ` Peter Zijlstra
2006-08-01 9:46 ` Jiri Slaby
2006-08-01 9:57 ` Russell King
2006-08-01 10:04 ` Jiri Slaby
2006-08-01 9:59 ` Peter Zijlstra
2006-08-01 10:03 ` Jiri Slaby
2006-08-01 14:49 ` Horst H. von Brand
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=20060801014913.5eec556c.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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®