From: Jon Masters <jonathan@jonmasters.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@elte.hu,
rostedt@goodmis.org
Subject: Re: [RFC PATCH 1/1] smi_detector: A System Management Interrupt detector
Date: Tue, 09 Jun 2009 18:53:27 -0400 [thread overview]
Message-ID: <1244588008.30733.94.camel@localhost.localdomain> (raw)
In-Reply-To: <20090609145607.d8944778.akpm@linux-foundation.org>
On Tue, 2009-06-09 at 14:56 -0700, Andrew Morton wrote:
> On Tue, 09 Jun 2009 17:50:01 -0400
> Jon Masters <jonathan@jonmasters.org> wrote:
>
> > > > + if (0 != err)
> > >
> > > if (err != 0)
> > >
> > > or
> > >
> > > if (err)
> > >
> > > would be more typical.
> >
> > The former runs the risk of assignment,
>
> yup, which is why gcc will warn if you do
>
> if (err = 0)
>
> If you really meant to do that, then gcc can be silenced by
> double-parenthesising. We consider this "good enough" for kernel
> purposes, so we generally don't use the `if (CONSTANT == variable)' trick.
Ah, yes, good point.
Jon.
next prev parent reply other threads:[~2009-06-09 22:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-31 16:31 [RFC PATCH 0/1] SMI Detector (v2) Jon Masters
2009-05-31 16:31 ` [RFC PATCH 1/1] smi_detector: A System Management Interrupt detector Jon Masters
2009-06-02 3:57 ` Andrew Morton
2009-06-02 7:54 ` Ingo Molnar
2009-06-02 13:41 ` Jon Masters
2009-06-09 21:50 ` Jon Masters
2009-06-09 21:56 ` Andrew Morton
2009-06-09 22:53 ` Jon Masters [this message]
2009-06-02 18:32 ` Paul E. McKenney
2009-06-02 20:32 ` Jon Masters
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=1244588008.30733.94.camel@localhost.localdomain \
--to=jonathan@jonmasters.org \
--cc=akpm@linux-foundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox