From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] sparc: move is_root_node from private header to of.h Date: Mon, 12 Jul 2010 21:17:29 -0700 (PDT) Message-ID: <20100712.211729.73671287.davem@davemloft.net> References: <20100713094226.33b421dd@debxo> <20100713200541.0dc8d0be@debxo> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20100713200541.0dc8d0be@debxo> Sender: sparclinux-owner@vger.kernel.org To: dilinger@queued.net Cc: grant.likely@secretlab.ca, devicetree-discuss@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: devicetree@vger.kernel.org =46rom: Andres Salomon Date: Tue, 13 Jul 2010 20:05:41 +0000 > On Mon, 12 Jul 2010 09:53:04 -0600 > Grant Likely wrote: >=20 >> On Tue, Jul 13, 2010 at 3:42 AM, Andres Salomon >> 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 >> > --- >> > =A0arch/sparc/kernel/prom.h =A0 =A0 =A0 =A0| =A0 =A08 -------- >> > =A0arch/sparc/kernel/prom_64.c =A0 =A0 | =A0 =A06 +++--- >> > =A0arch/sparc/kernel/prom_common.c | =A0 =A02 +- >> > =A0include/linux/of.h =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A08 ++++++= ++ >> > =A04 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= ) >> > +{ >> > + =A0 =A0 =A0 if (!node) >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return false; >> > + >> > + =A0 =A0 =A0 return (node->parent =3D=3D NULL); >> > +} >>=20 >> Are you okay if I shorten this to? >>=20 >> +static inline bool of_is_root_node(const struct device_node *node) >> +{ >> + return (node && (node->parent =3D=3D NULL)); >> +} >>=20 >> g. >=20 > It's fine with me. >=20 Me too: Acked-by: David S. Miller -- To unsubscribe from this list: send the line "unsubscribe sparclinux" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html