All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] saa7146: fix sparse warnings
Date: Sun, 02 Mar 2008 21:46:19 +0300	[thread overview]
Message-ID: <47CAF5FB.4070204@gmail.com> (raw)
In-Reply-To: <1204481204.23005.8.camel@brick>

Harvey Harrison пишет:
> 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 suppose I could see an argument for
> consistency if you had a long series of if() statements to keep a
> similar style.

To me it looks that the original style in this file can be sacrificed
in favor of

1) satisfying the coding style rules of the kernel;
2) keeping with informal, but commonly known idioms of C language.

So I thought that while you're at it, you could also comb through
this file and make the checkpatch.pl script happy with it.

But this is just my very personal opinion :)

Dmitri


  reply	other threads:[~2008-03-02 18:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 17:52 [PATCH] saa7146: fix sparse warnings Harvey Harrison
2008-02-21 21:19 ` Al Viro
2008-02-21 21:22   ` Harvey Harrison
2008-03-02 17:34 ` Dmitri Vorobiev
2008-03-02 18:06   ` Harvey Harrison
2008-03-02 18:46     ` Dmitri Vorobiev [this message]
2008-03-02 19:57     ` Andrew Morton

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=47CAF5FB.4070204@gmail.com \
    --to=dmitri.vorobiev@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@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 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.