[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181108.191116.1317160901826988583.davem@davemloft.net>
Date: Thu, 08 Nov 2018 19:11:16 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: robh@...nel.org
Cc: frowand.list@...il.com, linux-kernel@...r.kernel.org,
sparclinux@...r.kernel.org
Subject: Re: [PATCH 2/8] of: Drop full path from Sparc PDT full_name
From: Rob Herring <robh@...nel.org>
Date: Wed, 7 Nov 2018 16:31:45 -0600
> @@ -32,24 +32,7 @@ unsigned int of_pdt_unique_id __initdata;
>
> static char * __init of_pdt_build_full_name(struct device_node *dp)
> {
> - int len, ourlen, plen;
> - char *n;
> -
> - dp->path_component_name = build_path_component(dp);
> -
> - plen = strlen(dp->parent->full_name);
> - ourlen = strlen(dp->path_component_name);
> - len = ourlen + plen + 2;
> -
> - n = prom_early_alloc(len);
> - strcpy(n, dp->parent->full_name);
> - if (!of_node_is_root(dp->parent)) {
> - strcpy(n + plen, "/");
> - plen++;
> - }
> - strcpy(n + plen, dp->path_component_name);
> -
> - return n;
> + return build_path_component(dp);
> }
>
> #else /* CONFIG_SPARC */
Hmmm, shouldn't this be doing what the non-SPARC version of
of_pdt_build_full_name() does which is to return the component string
appended to the parent's full_name?
You're just returning the component string here.
Powered by blists - more mailing lists