Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3649734imm; Mon, 1 Oct 2018 02:05:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV62B+7YB1VrozCQt/cHGYwDikpvxEbrPvR4B+CXDELPi4u1gSSqZ3aRdrUfDj5ATayqYDiDN X-Received: by 2002:a17:902:710e:: with SMTP id a14-v6mr10905388pll.179.1538384744323; Mon, 01 Oct 2018 02:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538384744; cv=none; d=google.com; s=arc-20160816; b=HSL1DeaaUr1QlYPtFeMgvdkJPlBhdaSy62SqOabM1V7JpsVFz2jE24KiaCaB9TfNx9 yJRS/DCz3vmUe/B6+iL46L/QqzwuMyOx4ydDh1T9jw5xSpmynv8NxbXhzcbaEX5ay3FC bfjdQmksCVdG0S9CAtGwWD/hZ6ut4lBPVr61IPxcfk2YLaf8rMt7AQH2j8xYTuJsdkVW u9p542Unfo9yxP7/AjScSEwiLCX/M01I704Vyk7pVf/Uo4l5oGqXT7eAfdvo5cftUbAT 0avnQFmtvfAWz9wF3jhlAcA9/QedN7IxTsFmNL1eK3eBqJHsL/PDgd6Y0geuaxCU6UcM QQGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=+41b4xfuLROPjXmXAV/GBRmIFeToWI55jGiWeOP4P0g=; b=0Vtct7olbsAacYVZY6BGNex+XTRGMdc8xLFSYYOIltRTuDQdYaLLOLLCZMi48bWjVE HycB4lCdwBf75RjHxT1/pRr5+NHtJLkH5DD6iFeLhWF8nmPaWkOTTPsU6YNUg1vKCV5A 4eUVjvGeHV2B2vlit7tq1ukaKChRU6AyFFxokwzFZ32NUkLzi4Pj6aurzRFprm38lERi 7c3uj+LW+9knM/Ab19n/YBRu/vkwX/ftf+X3flupglVN30xtBNcF+NKlluP5WvKCBtRN 6IZiL1km+J4QnH1Y/OxnKDUSF2XEz9mkkRxKYCBz4PkQ/iV6xS3gIpSh/VNWAx0/4XeO 7Fiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ec4fMoCQ; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6-v6si11964598pfh.266.2018.10.01.02.05.28; Mon, 01 Oct 2018 02:05:44 -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=@linaro.org header.s=google header.b=Ec4fMoCQ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729006AbeJAPmE (ORCPT + 99 others); Mon, 1 Oct 2018 11:42:04 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34134 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbeJAPmE (ORCPT ); Mon, 1 Oct 2018 11:42:04 -0400 Received: by mail-wr1-f67.google.com with SMTP id z4-v6so11605233wrb.1 for ; Mon, 01 Oct 2018 02:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+41b4xfuLROPjXmXAV/GBRmIFeToWI55jGiWeOP4P0g=; b=Ec4fMoCQr4TEkEqR03xJi43xOmtDfP5EpWqhP76m/Bi4nM18ufUcfdWMG9eaYA6DAS KOWAvxT92TwiCT+4yal7u2EWCDSau5y8xJQ+JZEWCnJUXwlEuSge3wM90MSgHfqeH3eJ 5xhp1BX4xNbwvEO/AYFfjwtGSYwc2N+fui0J8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+41b4xfuLROPjXmXAV/GBRmIFeToWI55jGiWeOP4P0g=; b=Mm9kflpIcavfR9lK5+JT+XoFyd21awxGsH1Pusn2AwHaAr4nCQ+7NPztmjOVWz+IV3 P8py1ytOC7HbeuedBX5b73MxuObQVjkc2pPgvqMnvBnG3BXoxBArxEPuEdW83xYU1FMP tWSDl+OKQkzgk74SHz/3K86GVCLuN1jBAEXUfBDPVpTw44GQDz1c4WQ+HNF6Ml+nWG2c EYGPGfCoJ0Rna8A3+uzLo7B4680NaBRyPjZzh9fJdgfh1h5fMLb4z3g0z8qO6pshTK5/ pK6dHLRTxtClTgH/NbZHkG9gzUv3uENhfJer6xFmCSjd4OTYeY5SD3M7LXXpLH9VOGep gsmA== X-Gm-Message-State: ABuFfoj8I9htdNGIqVrr3BPSIAvmqEwO8b2G0xoybJTNZwzwXt8ZW7mk jpnl9PNdkaGAV3XlAlqYYOXU7KGaDk8= X-Received: by 2002:adf:e792:: with SMTP id n18-v6mr6046041wrm.136.1538384717980; Mon, 01 Oct 2018 02:05:17 -0700 (PDT) Received: from [192.168.0.19] (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.googlemail.com with ESMTPSA id a18sm10515797wrx.55.2018.10.01.02.05.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 02:05:17 -0700 (PDT) Subject: Re: [PATCH] nvmem: Convert to using %pOFn instead of device_node.name To: Rob Herring Cc: "linux-kernel@vger.kernel.org" References: <20180828015252.28511-1-robh@kernel.org> <20180828015252.28511-37-robh@kernel.org> From: Srinivas Kandagatla Message-ID: Date: Mon, 1 Oct 2018 10:05:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/09/18 23:06, Rob Herring wrote: > 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. Sorry, Looks like I missed this one! I already re-based it. I will send it with other fixes to Greg KH soon! thanks, --srini > > 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 >>