All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Stehlik <pstehlik@sophics.cz>
To: Yoann Padioleau <padator@wanadoo.fr>
Cc: kernel-janitors@vger.kernel.org, geert@linux-m68k.org,
	zippel@linux-m68k.org, linux-m68k@vger.kernel.org,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/68] 0 -> NULL, for arch/m68k
Date: Fri, 27 Jul 2007 10:56:38 +0000	[thread overview]
Message-ID: <46A9CF66.90108@sophics.cz> (raw)
In-Reply-To: <200707270944.LAA17213@ifs.emn.fr>

Yoann Padioleau wrote:
> When comparing a pointer, it's clearer to compare it to NULL than to 0.

>  	stram_start = phys_to_virt(0);
> -	kernel_in_stram = (stram_start = 0);
> +	kernel_in_stram = (stram_start = NULL);

stram_start is more like an offset than pointer, IMHO. And 0 is a valid 
offset. The "=NULL" does not make much sense in this particular case. 
NULL is usually used when checking for an uninitialized pointer, right?

Petr


WARNING: multiple messages have this Message-ID (diff)
From: Petr Stehlik <pstehlik@sophics.cz>
To: Yoann Padioleau <padator@wanadoo.fr>
Cc: kernel-janitors@vger.kernel.org, geert@linux-m68k.org,
	zippel@linux-m68k.org, linux-m68k@vger.kernel.org,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/68] 0 -> NULL, for arch/m68k
Date: Fri, 27 Jul 2007 12:56:38 +0200	[thread overview]
Message-ID: <46A9CF66.90108@sophics.cz> (raw)
In-Reply-To: <200707270944.LAA17213@ifs.emn.fr>

Yoann Padioleau wrote:
> When comparing a pointer, it's clearer to compare it to NULL than to 0.

>  	stram_start = phys_to_virt(0);
> -	kernel_in_stram = (stram_start == 0);
> +	kernel_in_stram = (stram_start == NULL);

stram_start is more like an offset than pointer, IMHO. And 0 is a valid 
offset. The "==NULL" does not make much sense in this particular case. 
NULL is usually used when checking for an uninitialized pointer, right?

Petr


  reply	other threads:[~2007-07-27 10:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-27  9:44 [PATCH 08/68] 0 -> NULL, for arch/m68k Yoann Padioleau
2007-07-27  9:44 ` Yoann Padioleau
2007-07-27 10:56 ` Petr Stehlik [this message]
2007-07-27 10:56   ` Petr Stehlik
2007-07-27 12:03   ` Al Viro
2007-07-27 12:03     ` Al Viro

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=46A9CF66.90108@sophics.cz \
    --to=pstehlik@sophics.cz \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=padator@wanadoo.fr \
    --cc=zippel@linux-m68k.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.