Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1259084imm; Fri, 28 Sep 2018 15:06:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV62hG7Wyi3u3Ce8YWamopnr5babYRSVQTEsiW8YHXfVwO+kb+pvjdqKFW27SBWDw8cbjrc2D X-Received: by 2002:a17:902:8a90:: with SMTP id p16-v6mr543037plo.106.1538172413096; Fri, 28 Sep 2018 15:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538172413; cv=none; d=google.com; s=arc-20160816; b=jJUHv0Zxvvh+RNcCmwRSa/sjmqONe1uECelyfpytOe5I0taYLga8da1jIQwflyrvYU KIbL390MkgraWM3LH78vRAG5n2a2eqnzoy+rC+TJLeWGfrLxRJbP46Cd3ipmN1LntsGS fLm3utLVlQe5F8eAxcvOjv4UxNWtgaxUw7OejOT69nBpGz0itiA1MtqEXlYkqt50cEDN YQxnB8WM5qpXHeWw0kddnmIiiYXCkygswbaQ8lD5HvFRkMoJ0/kBFDw3iyucabSM/C04 Ia6UmnJeqGJv+IucNoxRw2QaqXrw34KN9h5vUp8xrMgx1CTujeB4z/VBBmkjJ42wGsrU 6rvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1mOaXcGBITtzixPGIzkv2yQ55OvRNch1ZO8r7BRaHT8=; b=OH0gOysdagyVQjwUS6o/K6aqT7Crs1G8TnJyVoHFjMYcbKKT4dYNGQOpQM60dgCjmb uiwXwzW0jv9SV4reJ+987jt7zR+FIpqGHEQyW3C98yKy0SL3aYOy49dJl8jaKegWdI3+ Iy56tiRJ8mrd8/A9ld3dcyWqJNITFi8SA2DBNM+ELWxhMoevx9eCdjeFEYGQuEnkeeMt bNs1PeFEO/0Ph/UaACA8i9S5/dsDi9ZIsNoZrHzwxbAm8K71MrHObiQQauwb2xFsUWp7 DnV5O35/m34Q3jMrBbkw8tXimjUHMZZYLp1D4ELm8ckd/41LVktZbSha73+Ew14E8W9P Gepw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K2cZw+4o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az4-v6si5370392plb.513.2018.09.28.15.06.38; Fri, 28 Sep 2018 15:06:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K2cZw+4o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727148AbeI2EcA (ORCPT + 99 others); Sat, 29 Sep 2018 00:32:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:58092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726332AbeI2EcA (ORCPT ); Sat, 29 Sep 2018 00:32:00 -0400 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 243792073F for ; Fri, 28 Sep 2018 22:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538172374; bh=IQrAz0TmJceKloJYPVIfOdYfTLTLDxWv5hUM9uam0r4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=K2cZw+4o+Ox+SckSzeuujaaN36fVCbKYlfJw/amGooh6jr19m13tLJQ94GA0+eQlS VaCh06fK/cRdZHTxNEMpmaLL5sbVGdVZy79Vlol17jxtA+qH9J4P5wQNQznkvln07m UgqJxH/FhxCKhPn8pwgUaKcfuDfMfEcBs7+asEHk= Received: by mail-qt1-f179.google.com with SMTP id c56-v6so3438194qtd.11 for ; Fri, 28 Sep 2018 15:06:14 -0700 (PDT) X-Gm-Message-State: ABuFfoivSPwDMktP72mxUkugq0ZtQ+4foeUP2Iywpa1sb+XINzH4l0Pz ty8z5Mq838rdS4c//nS0xvIkPpg2jpXSeNRlaw== X-Received: by 2002:aed:3983:: with SMTP id m3-v6mr475936qte.164.1538172373376; Fri, 28 Sep 2018 15:06:13 -0700 (PDT) MIME-Version: 1.0 References: <20180828015252.28511-1-robh@kernel.org> <20180828015252.28511-37-robh@kernel.org> In-Reply-To: <20180828015252.28511-37-robh@kernel.org> From: Rob Herring Date: Fri, 28 Sep 2018 17:06:02 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] nvmem: Convert to using %pOFn instead of device_node.name To: Srinivas Kandagatla Cc: "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 27, 2018 at 8:55 PM Rob Herring wrote: > > In preparation to remove the node name pointer from struct device_node, > convert printf users to use the %pOFn format specifier. > > Cc: Srinivas Kandagatla > Signed-off-by: Rob Herring > --- > drivers/nvmem/core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Ping. This has no dependencies, so please apply. Rob > > diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c > index aa1657831b70..6988ee9f11ba 100644 > --- a/drivers/nvmem/core.c > +++ b/drivers/nvmem/core.c > @@ -304,6 +304,7 @@ static void nvmem_cell_drop(struct nvmem_cell *cell) > mutex_lock(&nvmem_cells_mutex); > list_del(&cell->node); > mutex_unlock(&nvmem_cells_mutex); > + kfree(cell->name); > kfree(cell); > } > > @@ -879,7 +880,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np, > cell->nvmem = nvmem; > cell->offset = be32_to_cpup(addr++); > cell->bytes = be32_to_cpup(addr); > - cell->name = cell_np->name; > + cell->name = kasprintf(GFP_KERNEL, "%pOFn", cell_np); > > addr = of_get_property(cell_np, "bits", &len); > if (addr && len == (2 * sizeof(u32))) { > @@ -904,6 +905,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np, > return cell; > > err_sanity: > + kfree(cell->name); > kfree(cell); > > err_mem: > -- > 2.17.1 >