public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@queued.net>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: devicetree-discuss@lists.ozlabs.org, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] sparc: move is_root_node from private header to of.h
Date: Tue, 13 Jul 2010 20:05:41 +0000	[thread overview]
Message-ID: <20100713200541.0dc8d0be@debxo> (raw)
In-Reply-To: <AANLkTinVpBjQQa93DZ17ULQdspDByGV8h037bVJ2qxGC@mail.gmail.com>

On Mon, 12 Jul 2010 09:53:04 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:

> On Tue, Jul 13, 2010 at 3:42 AM, Andres Salomon <dilinger@queued.net>
> wrote:
> >
> > Make is_root_node available for all archs to use, as it's not
> > PROM-specific. Also rename it to of_is_root_node, and a few other
> > minor changes for style/consistency.
> >
> > Signed-off-by: Andres Salomon <dilinger@queued.net>
> > ---
> >  arch/sparc/kernel/prom.h        |    8 --------
> >  arch/sparc/kernel/prom_64.c     |    6 +++---
> >  arch/sparc/kernel/prom_common.c |    2 +-
> >  include/linux/of.h              |    8 ++++++++
> >  4 files changed, 12 insertions(+), 12 deletions(-)
> [...]
> > diff --git a/include/linux/of.h b/include/linux/of.h
> > index a367e19..b38cdf7 100644
> > --- a/include/linux/of.h
> > +++ b/include/linux/of.h
> > @@ -97,6 +97,14 @@ extern struct device_node *of_node_get(struct
> > device_node *node); extern void of_node_put(struct device_node
> > *node); #endif
> >
> > +static inline bool of_is_root_node(const struct device_node *node)
> > +{
> > +       if (!node)
> > +               return false;
> > +
> > +       return (node->parent == NULL);
> > +}
> 
> Are you okay if I shorten this to?
> 
> +static inline bool of_is_root_node(const struct device_node *node)
> +{
> +       return (node && (node->parent == NULL));
> +}
> 
> g.

It's fine with me.


  reply	other threads:[~2010-07-12 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13  9:42 [PATCH] sparc: move is_root_node from private header to of.h Andres Salomon
2010-07-12 15:53 ` Grant Likely
2010-07-13 20:05   ` Andres Salomon [this message]
2010-07-13  4:17     ` David Miller

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=20100713200541.0dc8d0be@debxo \
    --to=dilinger@queued.net \
    --cc=davem@davemloft.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.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