From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Darren Hart <dvhart@linux.intel.com>
Subject: Re: [PATCH 1/2] WARN_ON_SMP(): Allow use in if statements on UP
Date: Fri, 25 Mar 2011 10:35:38 +0100 [thread overview]
Message-ID: <1301045738.2250.153.camel@laptop> (raw)
In-Reply-To: <20110317192208.444147791@goodmis.org>
On Thu, 2011-03-17 at 15:21 -0400, Steven Rostedt wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> Both WARN_ON() and WARN_ON_SMP() should be able to be used in
> an if statement.
>
> if (WARN_ON_SMP(foo)) { ... }
>
> Because WARN_ON_SMP() is defined as a do { } while (0) on UP,
> it can not be used this way.
>
> Convert it to the same form that WARN_ON() is, even when
> CONFIG_SMP is off.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
next prev parent reply other threads:[~2011-03-25 9:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 19:21 [PATCH 0/2] [GIT PULL] futex: Fix WARN_ON triggering on UP Steven Rostedt
2011-03-17 19:21 ` [PATCH 1/2] WARN_ON_SMP(): Allow use in if statements " Steven Rostedt
2011-03-17 20:46 ` Darren Hart
2011-03-25 9:35 ` Peter Zijlstra [this message]
2011-03-25 10:48 ` [tip:core/urgent] WARN_ON_SMP(): Allow use in if() " tip-bot for Steven Rostedt
2011-03-25 16:45 ` Linus Torvalds
2011-03-25 18:16 ` Steven Rostedt
2011-03-25 18:19 ` Steven Rostedt
2011-03-25 19:31 ` Alexey Dobriyan
2011-03-25 19:36 ` Steven Rostedt
2011-03-25 19:40 ` Steven Rostedt
2011-03-25 19:47 ` Alexey Dobriyan
2011-03-25 19:53 ` Steven Rostedt
2011-03-25 19:56 ` Ingo Molnar
2011-03-17 19:21 ` [PATCH 2/2] futex: Fix WARN_ON() test for UP Steven Rostedt
2011-03-17 20:00 ` Darren Hart
2011-03-25 9:35 ` Peter Zijlstra
2011-03-25 10:49 ` [tip:core/urgent] " tip-bot for Steven Rostedt
2011-03-17 19:27 ` [PATCH 0/2] [GIT PULL] futex: Fix WARN_ON triggering on UP Steven Rostedt
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=1301045738.2250.153.camel@laptop \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=dvhart@linux.intel.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.