mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Rob Herring <robh@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-acpi@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 3/4] of/property: Introduce of_fwnode_name()
Date: Tue, 6 Nov 2018 16:55:37 +0200	[thread overview]
Message-ID: <20181106145537.GB10650@smile.fi.intel.com> (raw)
In-Reply-To: <20181106144037.GD13048@kuha.fi.intel.com>

On Tue, Nov 06, 2018 at 04:40:37PM +0200, Heikki Krogerus wrote:
> On Tue, Nov 06, 2018 at 07:18:14AM -0600, Rob Herring wrote:

> > Looking at patch 4, if matching the name is what you want to do, then
> > use the DT name matching functions. They were added in 4.19.
> 
> That is something that the of_fwnode_get_named_child_node() needs
> to use (would have needed).
> 
> Regardless of what we do with that callback, fwnode_name() needs to
> return the name in from that for example of_node_name_eq() takes as
> the second parameter. So "node-name@unit-address" is not OK. Sorry for
> not realizeing that before.
> 
> So I guess we need to either get the "node-name" from that full_name
> member in of_fwnode_name() (Andy, are you OK with that?), or is there
> already a helper that does it for us?

Looking into existing API I think we need something like

of_node_name_extract()

of_node_name_eq()
{
	name = of_node_name_extract();
	return strlen()...strncmp()...;
}

The question is who is going to allocate and free memory for the name out of it.

OTOH, of_fwnode_get_named_child_node() might need to copy that code which
brings the consistency issue (several places to maintain the same set of rules,
i.e. how we extract name out of full_name).

So, removal of name field shouldn't be done until we resolve the issue with
of_fwnode_get_named_child_node().

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2018-11-06 14:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  9:17 [PATCH 0/4] device property: Add fwnode_name() helper Heikki Krogerus
2018-11-05  9:17 ` [PATCH 1/4] device property: Introduce fwnode_name() Heikki Krogerus
2018-11-05 14:37   ` Andy Shevchenko
2018-11-05 14:57     ` Heikki Krogerus
2018-11-05  9:17 ` [PATCH 2/4] ACPI: property: Introduce acpi_fwnode_name() Heikki Krogerus
2018-11-05  9:17 ` [PATCH 3/4] of/property: Introduce of_fwnode_name() Heikki Krogerus
2018-11-05 18:50   ` Rob Herring
2018-11-06  8:45     ` Heikki Krogerus
2018-11-06 10:58     ` Andy Shevchenko
2018-11-06 12:27       ` Heikki Krogerus
2018-11-06 13:18         ` Rob Herring
2018-11-06 14:28           ` Andy Shevchenko
2018-11-06 18:17             ` Rob Herring
2018-11-06 14:40           ` Heikki Krogerus
2018-11-06 14:55             ` Andy Shevchenko [this message]
2018-11-06 15:05               ` Heikki Krogerus
2018-11-06 15:53                 ` Andy Shevchenko
2018-11-06 18:13                   ` Rob Herring
2018-11-07 12:35                     ` Heikki Krogerus
2018-11-05  9:17 ` [PATCH 4/4] device property: Drop get_named_child_node callback Heikki Krogerus
2018-11-05 14:38 ` [PATCH 0/4] device property: Add fwnode_name() helper Andy Shevchenko

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=20181106145537.GB10650@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=robh@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

all inboxes | Powered by JetHome®