mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Seebach <peter.seebach@windriver.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lubos Lunak <l.lunak@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	<linux-kernel@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH][RESEND] do not redefine userspace's NULL #define
Date: Fri, 13 Apr 2012 17:01:51 -0500	[thread overview]
Message-ID: <20120413170151.20c7230e@wrlaptop> (raw)
In-Reply-To: <CA+55aFxCrVtwCd9bjHLt82Uwisp8OtKP9c+raPYMqCTXqVfxGw@mail.gmail.com>

On Fri, 13 Apr 2012 12:39:20 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> And quite frankly, kernel-external definitions of NULL have
> traditionally been pure sh*t (ie plain "0" without the cast to a
> pointer), so I'm not entirely convinced about this patch.

I was going to dispute this, and point out that I'm pretty sure
the C++ standard specifically requires the plain-integer 0/0L
definition.  Then I realized this did not actually contradict
your description.

Maybe the thing to do would be to ensure that NULL goes to __null,
then define that to be ((void *) 0) if the compiler doesn't provide
it?  The magic behavior of __null seems like it'd be preferable
where it is available.

-s
-- 
Listen, get this.  Nobody with a good compiler needs to be justified.

  parent reply	other threads:[~2012-04-13 22:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 19:24 Lubos Lunak
2012-04-13 19:39 ` Linus Torvalds
2012-04-13 21:02   ` Arnd Bergmann
2012-04-16  7:43     ` Martin Schwidefsky
2012-04-13 21:46   ` Lubos Lunak
2012-04-14  8:28     ` Arnd Bergmann
2012-04-13 22:01   ` Peter Seebach [this message]
2012-04-13 22:24     ` Linus Torvalds
2012-04-13 23:18       ` Lubos Lunak
2012-04-14  0:44         ` Linus Torvalds
2012-04-14  6:43           ` Lubos Lunak
2012-04-14  7:51             ` Linus Torvalds
2012-04-14  8:21               ` Lubos Lunak
2012-04-14  8:27                 ` Linus Torvalds
2012-04-14  8:54                   ` Lubos Lunak
2012-04-14  9:30                     ` Arnd Bergmann

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=20120413170151.20c7230e@wrlaptop \
    --to=peter.seebach@windriver.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=l.lunak@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®