[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD00419B2@AcuExch.aculab.com>
Date: Wed, 26 Jul 2017 10:07:01 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Rob Herring' <robh@...nel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
CC: Frank Rowand <frowand.list@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Paul Mackerras <paulus@...ba.org>
Subject: RE: [PATCH 3/4] powerpc: pseries: only store the device node
basename in full_name
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()?
Perhaps you should rename full_name to name - since it is no longer 'full'?
Maybe you could do a single malloc() for both 'dn' and the name?
David
Powered by blists - more mailing lists