[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080302115743.c9a0a280.akpm@linux-foundation.org>
Date: Sun, 2 Mar 2008 11:57:43 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Harvey Harrison <harvey.harrison@...il.com>
Cc: Dmitri Vorobiev <dmitri.vorobiev@...il.com>,
Mauro Carvalho Chehab <mchehab@...radead.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] saa7146: fix sparse warnings
On Sun, 02 Mar 2008 10:06:44 -0800 Harvey Harrison <harvey.harrison@...il.com> wrote:
> On Sun, 2008-03-02 at 20:34 +0300, Dmitri Vorobiev wrote:
> > Harvey Harrison пишет:
> > >
> > > - if( 0 != (dev->ext)) {
> > > + if( NULL != (dev->ext)) {
> >
> > At the risk of looking an idiot, I'm taking a liberty to ask what is
> > the point in explicit comparison to zero in conditional operators? Is
> > it not a fundamental C idiom to write
>
> <snip>
>
> Yes, that's how I would have written it, but I tried to keep with the
> prevailing style in that file.
I'm not a bit fan of the match-the-existing-style approach.
You'll find that files which started out with a non-standard style already
contain a mixup of styles, because later changes were often made in
standard-style.
And given that we're churning the code anyway, we might as well fix it up now.
Yes, that'll make the code look partially-weird rather than wholly-weird,
but I doubt if that will harm anyone much.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists