All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Knutsson <ricknu-0@student.ltu.se>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: Robin Getz <rgetz@blackfin.uclinux.org>,
	Yoann Padioleau <padator@wanadoo.fr>,
	David Howells <dhowells@redhat.com>,
	kernel-janitors@vger.kernel.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 06/68] 0 -> NULL, for arch/frv
Date: Wed, 01 Aug 2007 10:38:39 +0000	[thread overview]
Message-ID: <46B062AF.1040907@student.ltu.se> (raw)
In-Reply-To: <8bd0f97a0708010303j7f443b06lf9d77f6d36816237@mail.gmail.com>

Mike Frysinger wrote:
> On 7/31/07, Richard Knutsson <ricknu-0@student.ltu.se> wrote:
>   
>> Mike Frysinger wrote:
>>     
>>> On 7/27/07, Robin Getz <rgetz@blackfin.uclinux.org> wrote:
>>>       
>>>> If there is a definite style or semantic preference that everyone should live
>>>> with - does it make sense to put checks in checkpatch.pl to enforce it?
>>>>         
>>> checkpatch.pl does not have enough semantic knowledge to know if the
>>> thing being tested is a pointer ... dont know if the sparse utility
>>> would be able to pick it out as i'm not familiar with what level that
>>> thing runs at
>>>       
>> Didn't he mean "x = NULL" > "!x"?
>>     
>
> i'm sure i understand your meaning of ">" ... are you saying that "x
> = NULL" is greater (preferred) to "!x" or are you saying that "x =
> NULL" should be changed to "!x" ?
>   
If I understood Robin correctly, he suggested that checkpatch.pl would 
tell to convert "x = NULL" to "!x", if that would be the preferred way.
> i dont think the former case can be checked by checkpatch.pl, but the
> latter certainly can ... but i'd be very skeptical you could get the
> wider LKML audience to sign off one way or the other wrt to "x =
> NULL" vs "!x".  you can certainly get people to sign off on "x = 0"
> being wrong when x is a pointer.
>   
I agree!
BTW, too bad checkpatch.pl does not know the types, since it otherwise 
could check for the "x [=!]= 0"-thing.

Richard Knutsson


WARNING: multiple messages have this Message-ID (diff)
From: Richard Knutsson <ricknu-0@student.ltu.se>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: Robin Getz <rgetz@blackfin.uclinux.org>,
	Yoann Padioleau <padator@wanadoo.fr>,
	David Howells <dhowells@redhat.com>,
	kernel-janitors@vger.kernel.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 06/68] 0 -> NULL, for arch/frv
Date: Wed, 01 Aug 2007 12:38:39 +0200	[thread overview]
Message-ID: <46B062AF.1040907@student.ltu.se> (raw)
In-Reply-To: <8bd0f97a0708010303j7f443b06lf9d77f6d36816237@mail.gmail.com>

Mike Frysinger wrote:
> On 7/31/07, Richard Knutsson <ricknu-0@student.ltu.se> wrote:
>   
>> Mike Frysinger wrote:
>>     
>>> On 7/27/07, Robin Getz <rgetz@blackfin.uclinux.org> wrote:
>>>       
>>>> If there is a definite style or semantic preference that everyone should live
>>>> with - does it make sense to put checks in checkpatch.pl to enforce it?
>>>>         
>>> checkpatch.pl does not have enough semantic knowledge to know if the
>>> thing being tested is a pointer ... dont know if the sparse utility
>>> would be able to pick it out as i'm not familiar with what level that
>>> thing runs at
>>>       
>> Didn't he mean "x == NULL" > "!x"?
>>     
>
> i'm sure i understand your meaning of ">" ... are you saying that "x
> == NULL" is greater (preferred) to "!x" or are you saying that "x ==
> NULL" should be changed to "!x" ?
>   
If I understood Robin correctly, he suggested that checkpatch.pl would 
tell to convert "x == NULL" to "!x", if that would be the preferred way.
> i dont think the former case can be checked by checkpatch.pl, but the
> latter certainly can ... but i'd be very skeptical you could get the
> wider LKML audience to sign off one way or the other wrt to "x ==
> NULL" vs "!x".  you can certainly get people to sign off on "x == 0"
> being wrong when x is a pointer.
>   
I agree!
BTW, too bad checkpatch.pl does not know the types, since it otherwise 
could check for the "x [=!]= 0"-thing.

Richard Knutsson


  reply	other threads:[~2007-08-01 10:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-27  9:44 [PATCH 06/68] 0 -> NULL, for arch/frv Yoann Padioleau
2007-07-27  9:44 ` Yoann Padioleau
2007-07-27 10:00 ` Al Viro
2007-07-27 10:00   ` Al Viro
2007-07-27 10:21   ` Yoann Padioleau
2007-07-27 10:21     ` Yoann Padioleau
2007-07-27 10:40     ` Al Viro
2007-07-27 10:40       ` Al Viro
2007-07-27 10:14 ` David Howells
2007-07-27 10:14   ` David Howells
2007-07-27 10:18   ` Yoann Padioleau
2007-07-27 10:18     ` Yoann Padioleau
2007-07-28  1:38     ` Robin Getz
2007-07-28  1:38       ` Robin Getz
2007-07-28  1:37       ` Mike Frysinger
2007-07-28  1:37         ` Mike Frysinger
2007-07-31 12:04         ` Richard Knutsson
2007-07-31 12:04           ` Richard Knutsson
2007-08-01 10:03           ` Mike Frysinger
2007-08-01 10:03             ` Mike Frysinger
2007-08-01 10:38             ` Richard Knutsson [this message]
2007-08-01 10:38               ` Richard Knutsson
2007-08-01 20:28               ` Matt Mackall
2007-08-01 20:28                 ` Matt Mackall
2007-08-02 14:58               ` Robin Getz
2007-08-02 14:58                 ` Robin Getz

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=46B062AF.1040907@student.ltu.se \
    --to=ricknu-0@student.ltu.se \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=padator@wanadoo.fr \
    --cc=rgetz@blackfin.uclinux.org \
    --cc=vapier.adi@gmail.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 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.