Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4945069yba; Wed, 8 May 2019 05:37:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxL+EKhA15aHfsq1+Jxo7d9QIvxJy7AVeoAuxbK0hpgoUlBuTML+HznzCdh6Y797Q+cPuDI X-Received: by 2002:a63:8a4a:: with SMTP id y71mr46780573pgd.270.1557319037215; Wed, 08 May 2019 05:37:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557319037; cv=none; d=google.com; s=arc-20160816; b=H6X2UiADdXsJJyr1inNClCqTvzQ+nSttph5msHQxFQwMD5soK89nwdFq9IRyaHqoVw 1tHJzgf5ei74XrZnFokC8zr7jAkkTTwWaU0RXC8dm/e5npMmPTMv0AuGZzAw15q+mID6 6ipSXCJh3IPIj8pUR3+drn+hkWXBkkAtfwGNGPEcZH64HrdoS/SstU7jsloUkIDoPC0R ZQvEyaQ63isjCNi38dafhYbS97cmWjzPM8ns7mBQCALFFVb95Ss8K2K0J9UCxUDAQgNk bvkZyJkWU+BBih0d7m6fXmscuB8jp/9HeLiaHU+fZSrmocn31Flzqw66WXX2+mWWLpYJ i6hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date; bh=8tE8pqZ1+K6vYh6ym2qhX6dLLnGTA1++wZ9GlDfJnpI=; b=KtL8v6XbFux8DM1XgOrc08X23LvMCkxMjGwdvfNjLCu9lKQBDrxiXy4APks67NF866 pMRwNuBQE4dfaEEyEECbRuaPPkNcP3o6GLcnRRrVr52gEQuJHugLFcyV07c0iJqxdHlf TZvYwO7Vi6lYdpLWfsiNQgFvYh5YbWD537eQQgUtXvDoSXSbRuytIsIY0tli90gpU6OL ykg63QG5Giynf0C5cxbOfkKiOFAsEED5UrJrzNbLCg+aKpWTeZhayMKJfCq87Ue+/FKn 8jsZEbwBkNWg2chQar2+3nz5GrDGrwRnWCiubTpi9WQ+/HdpwNbFvIzZoCjHGAbZXvKn Xu/w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j68si12166340pfb.268.2019.05.08.05.37.01; Wed, 08 May 2019 05:37:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726984AbfEHJCJ (ORCPT + 99 others); Wed, 8 May 2019 05:02:09 -0400 Received: from smtp-out.xnet.cz ([178.217.244.18]:35043 "EHLO smtp-out.xnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbfEHJCI (ORCPT ); Wed, 8 May 2019 05:02:08 -0400 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 802DD4819; Wed, 8 May 2019 11:02:05 +0200 (CEST) Received: from localhost (meh.true.cz [local]) by meh.true.cz (OpenSMTPD) with ESMTPA id 87e01008; Wed, 8 May 2019 11:02:04 +0200 (CEST) Date: Wed, 8 May 2019 11:02:04 +0200 From: Petr =?utf-8?Q?=C5=A0tetiar?= To: Rob Herring Cc: netdev , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Andrew Lunn , Florian Fainelli , Heiner Kallweit , Frank Rowand , Srinivas Kandagatla , Maxime Ripard , Alban Bedel , Felix Fietkau , John Crispin Subject: Re: [PATCH v2 1/4] of_net: Add NVMEM support to of_get_mac_address Message-ID: <20190508090204.GN81826@meh.true.cz> Reply-To: Petr =?utf-8?Q?=C5=A0tetiar?= References: <1556456002-13430-1-git-send-email-ynezz@true.cz> <1556456002-13430-2-git-send-email-ynezz@true.cz> <20190501201925.GA15495@bogus> <20190502090538.GD346@meh.true.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rob Herring [2019-05-07 11:06:43]: Hi, > > Honestly I don't know if it's necessary to have it, but so far address, > > mac-address and local-mac-address properties provide this DT nodes, so I've > > simply thought, that it would be good to have it for MAC address from NVMEM as > > well in order to stay consistent. > > If you want to be consistent, then fill in 'local-mac-address' with > the value from nvmem. We don't need the same thing with a new name > added to DT. (TBC, I'm not suggesting you do that here.) Ok, got it. > But really, my point with using devm_kzalloc() is just return the > data, not store in DT and free it when the driver unbinds. Ok, I've simply misunderstood your point, sorry, I'll handle it in the follow up fix series, along with the DT documentation update. > Allocating it with devm_kzalloc AND adding it to DT as you've done in v4 > leads to 2 entities refcounting the allocation. If the driver unbinds, the > buffer is freed, but DT code is still referencing that memory. Indeed, I did it wrong, will fix that. > 'nvmem-mac-address' is not a documented property. That would need to > be documented before using upstream. Though, for reasons above, I > don't think it should be. Ok, it makes sense now. Thanks for the detailed explanation. -- ynezz