From: Rob Herring <robh@kernel.org>
To: David Laight <David.Laight@aculab.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Frank Rowand <frowand.list@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 3/4] powerpc: pseries: only store the device node basename in full_name
Date: Wed, 26 Jul 2017 09:34:17 -0500 [thread overview]
Message-ID: <CAL_JsqK6ioLTv+hgb7kZS2ySnDuM_FuOCUGBhtCG8hT607Js_Q@mail.gmail.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD00419B2@AcuExch.aculab.com>
On Wed, Jul 26, 2017 at 5:07 AM, David Laight <David.Laight@aculab.com> wrote:
> From: Rob Herring
>> Sent: 25 July 2017 22:44
>> With dependencies on full_name containing the entire device node path
>> removed, stop storing the full_name in nodes created by
>> dlpar_configure_connector() and pSeries_reconfig_add_node().
> ...
>> dn = kzalloc(sizeof(*dn), GFP_KERNEL);
>> if (!dn)
>> return NULL;
>>
>> name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
>> - dn->full_name = kasprintf(GFP_KERNEL, "%s/%s", path, name);
>> + dn->full_name = kasprintf(GFP_KERNEL, "%s", name);
>
> Isn't this just strdup()?
Yes, it can be simplified to that now.
> Perhaps you should rename full_name to name - since it is no longer 'full'?
Ideally, yes. However, we still have users in other places tree wide
(which should still work with the change) and I don't think it is
worth the additional churn. Also, we already have "name" as that is
the node name without the unit-address. I'd like to get rid of that,
but name is special in that it is exposed as a property too. Finally,
full_name is still the full path on Sparc.
> Maybe you could do a single malloc() for both 'dn' and the name?
Sure.
Rob
next prev parent reply other threads:[~2017-07-26 14:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 21:44 [PATCH 0/4] Removing full paths from DT full_name Rob Herring
2017-07-25 21:44 ` [PATCH 1/4] powerpc: pseries: vio: match parent nodes with of_find_node_by_path Rob Herring
2017-07-25 21:44 ` [PATCH 2/4] powerpc: pseries: remove dlpar_attach_node dependency on full path Rob Herring
2017-07-25 21:44 ` [PATCH 3/4] powerpc: pseries: only store the device node basename in full_name Rob Herring
2017-07-26 10:07 ` David Laight
2017-07-26 14:34 ` Rob Herring [this message]
2017-07-25 21:44 ` [PATCH 4/4] of/fdt: " Rob Herring
2017-07-26 10:26 ` Michael Ellerman
2017-07-26 14:10 ` Rob Herring
2017-07-26 14:20 ` [PATCH 0/4] Removing full paths from DT full_name Frank Rowand
2017-07-26 14:31 ` Rob Herring
2017-08-07 23:15 ` Rob Herring
2017-08-08 2:21 ` Michael Ellerman
2017-08-08 15:08 ` Rob Herring
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=CAL_JsqK6ioLTv+hgb7kZS2ySnDuM_FuOCUGBhtCG8hT607Js_Q@mail.gmail.com \
--to=robh@kernel.org \
--cc=David.Laight@aculab.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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).