linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: frowand.list@gmail.com
To: Rob Herring <robh+dt@kernel.org>,
	pantelis.antoniou@konsulko.com,
	Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	geert@linux-m68k.org
Subject: [PATCH 3/6] of: remove kbasename(of->full_name) from base.c
Date: Sun, 25 Feb 2018 18:22:27 -0800	[thread overview]
Message-ID: <1519611750-22355-4-git-send-email-frowand.list@gmail.com> (raw)
In-Reply-To: <1519611750-22355-1-git-send-email-frowand.list@gmail.com>

From: Frank Rowand <frank.rowand@sony.com>

struct device_node full_name has been changed to include the
basename instead of the full path.  kbasename() is no longer
needed to extract the basename from full_name.

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
---
 drivers/of/base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index ad28de96e13f..926d08b8674d 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -691,8 +691,8 @@ struct device_node *__of_find_node_by_path(struct device_node *parent,
 		return NULL;
 
 	__for_each_child_of_node(parent, child) {
-		const char *name = kbasename(child->full_name);
-		if (strncmp(path, name, len) == 0 && (strlen(name) == len))
+		if (strncmp(path, child->full_name, len) == 0 &&
+		    (strlen(child->full_name) == len))
 			return child;
 	}
 	return NULL;
-- 
Frank Rowand <frank.rowand@sony.com>

  parent reply	other threads:[~2018-02-26  2:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26  2:22 [PATCH 0/6] of: remove kbasename() from core frowand.list
2018-02-26  2:22 ` [PATCH 1/6] of: unittest: clean up changeset test frowand.list
2018-02-26  2:22 ` [PATCH 2/6] of: remove kbasename(of->full_name) from overlay related code frowand.list
2018-02-26  2:22 ` frowand.list [this message]
2018-02-26  2:22 ` [PATCH 4/6] of: remove kbasename(of->full_name) from kobj.c frowand.list
2018-02-26  2:22 ` [PATCH 5/6] of: remove kbasename(of->full_name) from of_reserved_mem.c frowand.list
2018-02-26  2:22 ` [PATCH 6/6] of: remove kbasename(of->full_name) from platform.c frowand.list
2018-02-26  9:03 ` [PATCH 0/6] of: remove kbasename() from core Geert Uytterhoeven
2018-02-26 19:42   ` Frank Rowand

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=1519611750-22355-4-git-send-email-frowand.list@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=panto@antoniou-consulting.com \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).