[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181106084542.GA13048@kuha.fi.intel.com>
Date: Tue, 6 Nov 2018 10:45:42 +0200
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Rob Herring <robh@...nel.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-acpi@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 3/4] of/property: Introduce of_fwnode_name()
On Mon, Nov 05, 2018 at 12:50:02PM -0600, Rob Herring wrote:
> On Mon, Nov 5, 2018 at 3:17 AM Heikki Krogerus
> <heikki.krogerus@...ux.intel.com> wrote:
> >
> > Instead of always being forced to read the "name" property
> > in fwnode_name() with of_nodes, implementing the fwnode
> > operation meant for getting the node name.
> >
> > Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> > Cc: Rob Herring <robh@...nel.org>
> > ---
> > drivers/of/property.c | 6 ++++++
>
> Please Cc the DT list for DT changes.
OK.
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/of/property.c b/drivers/of/property.c
> > index f46828e3b082..ac7b0b6c2d4d 100644
> > --- a/drivers/of/property.c
> > +++ b/drivers/of/property.c
> > @@ -823,6 +823,11 @@ static void of_fwnode_put(struct fwnode_handle *fwnode)
> > of_node_put(to_of_node(fwnode));
> > }
> >
> > +static const char *of_fwnode_name(const struct fwnode_handle *fwnode)
> > +{
> > + return to_of_node(fwnode)->name;
>
> I'm trying to get rid of the DT name ptr, so please don't add one. You
> can use of_node_full_name() here instead if "<name>@<unit-address>"
> instead of <name> is fine. Otherwise, you've got to allocate your own
> storage and use "%pOFn" printf specifier.
OK, I'll use of_node_full_name().
thanks,
--
heikki
Powered by blists - more mailing lists