Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751501AbdGZKHI convert rfc822-to-8bit (ORCPT ); Wed, 26 Jul 2017 06:07:08 -0400 Received: from smtp-out4.electric.net ([192.162.216.189]:53104 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750964AbdGZKHH (ORCPT ); Wed, 26 Jul 2017 06:07:07 -0400 From: David Laight To: "'Rob Herring'" , "devicetree@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" CC: Frank Rowand , "linux-kernel@vger.kernel.org" , Paul Mackerras Subject: RE: [PATCH 3/4] powerpc: pseries: only store the device node basename in full_name Thread-Topic: [PATCH 3/4] powerpc: pseries: only store the device node basename in full_name Thread-Index: AQHTBZANc1V6ZZJncE++K4ShPZw4sqJl4ZPQ Date: Wed, 26 Jul 2017 10:07:01 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD00419B2@AcuExch.aculab.com> References: <20170725214427.25768-1-robh@kernel.org> <20170725214427.25768-4-robh@kernel.org> In-Reply-To: <20170725214427.25768-4-robh@kernel.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 668 Lines: 20 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