public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Qi Zheng <arch0.zheng@gmail.com>
To: robh+dt@kernel.org, frowand.list@gmail.com, robh@kernel.org
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] of/fdt: Remove redundant kbasename function call
Date: Wed, 13 May 2020 21:44:25 +0800	[thread overview]
Message-ID: <c8c29efe-a79f-10e6-bb4d-a65f592eb33b@gmail.com> (raw)
In-Reply-To: <20200512154909.279788-1-arch0.zheng@gmail.com>

On 2020/5/12 下午11:49, Qi Zheng wrote:
> For version 1 to 3 of the device tree, this is the node full
> path as a zero terminated string, starting with "/". The
> following equation will not hold, since the node name has
> been processed in the fdt_get_name().
> 
> 	*pathp == '/'
> 
> For version 16 and later, this is the node unit name only
> (or an empty string for the root node). So the above
> equation will still not hold.
> 
> So the kbasename() is redundant, just remove it.
> 
> Signed-off-by: Qi Zheng <arch0.zheng@gmail.com>
> ---
>   drivers/of/fdt.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 8a8e07a8f03d..ea31b2ae8474 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -643,8 +643,6 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
>   	     offset = fdt_next_node(blob, offset, &depth)) {
>   
>   		pathp = fdt_get_name(blob, offset, NULL);
> -		if (*pathp == '/')
> -			pathp = kbasename(pathp);
>   		rc = it(offset, pathp, depth, data);
>   	}
>   	return rc;
> 

add Rob Herring <robh@kernel.org>.

  reply	other threads:[~2020-05-13 13:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 15:49 [PATCH] of/fdt: Remove redundant kbasename function call Qi Zheng
2020-05-13 13:44 ` Qi Zheng [this message]
2020-05-27 18:27 ` Rob Herring
2020-05-28 12:37   ` Qi Zheng

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=c8c29efe-a79f-10e6-bb4d-a65f592eb33b@gmail.com \
    --to=arch0.zheng@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --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