linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 06/18] Make ft_node_add() accept and return NULL.
Date: Wed, 24 Jan 2007 16:02:54 -0600	[thread overview]
Message-ID: <45B7D78E.5020704@freescale.com> (raw)
In-Reply-To: <4EF444AA-B7C0-460D-BA0A-EEDC9E2E4812@kernel.crashing.org>

Segher Boessenkool wrote:
>> Currently, if ft_node_add() is passed NULL it will allocate an  entry for
>> it and return a non-NULL phandle.  This patch makes it simply pass the
>> NULL through.
> 
> 
> Hrm, is this a good thing?  Shouldn't you just BUG_ON()
> instead?

There are times where NULL is normal -- such as at the end of an 
iteration to find every instance of a certain type of node, or to follow 
parentage to the root node.  Having ft_node_add() pass the NULL through 
keeps it from being a special case in all of the wrapper code that turns 
the internal node into a phandle before returning.

-Scott

  reply	other threads:[~2007-01-24 22:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 21:07 [PATCH 06/18] Make ft_node_add() accept and return NULL Scott Wood
2007-01-24 21:48 ` Segher Boessenkool
2007-01-24 22:02   ` Scott Wood [this message]
2007-01-24 22:30     ` Segher Boessenkool
2007-01-24 23:41       ` Scott Wood
2007-01-24 23:53         ` Segher Boessenkool

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=45B7D78E.5020704@freescale.com \
    --to=scottwood@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=segher@kernel.crashing.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;
as well as URLs for NNTP newsgroup(s).