Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2500287yba; Mon, 6 May 2019 07:07:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRo1Qzda0ihzANzv2XO8PRX+TEznOtHC1cD2bz7iC4aN6k9Q33S4jYn+b8mcwp3TUVEH+O X-Received: by 2002:a63:5907:: with SMTP id n7mr32402498pgb.416.1557151654171; Mon, 06 May 2019 07:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557151654; cv=none; d=google.com; s=arc-20160816; b=bLzWuWmtDIVut8X+H/IecAWdp3z89trWlaTuqnkbYItkF95wwynn3E2wuaB31vqwmo CMx4N7qUTioU8Ih/6p8pY4XGujSzzVaCDXBdzbj/g8kQXb++vI1S3VLHLtrbcwkdx6Vk jEP8iriHCZ/syMl6lSlpf9SgV1gW81EIg8Rz1Ytp9v/taCUiXkEXy/ZKTB/dflg3qJvv XEsaHrr4p5lF4SGb5n53M0GaQ1DmyO0IoxLV3LTstxe9XP7whePlbMigiNIHBDICIlRo Ewu8rtNp4uDSSymKjpQAOZvK2NTk07ccmRd1FREGWSz5gPtolr7yYGYxGiCOB2/rNdrG ej4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=rG6O+psh7WRoKhX1/7WMR9B09+ldEM8Qx+GDTPPJuQY=; b=Q6VnYmaxXFq30XE5MAe56ykv7XBs09xXd6/BMtgS1vz3wV2Z1+Q0jeurHpq8kQClyT 8XJQrUdc8ByWNYcslp7uQjSiuJ5OsKxwsHR6zheTdlr430cDWqb/UflMdu6xEOwpNuBC vQlfkF4qw+hUf3w33awRglAT0BBXj0hVjAQVhv/BNPBdQZd5iDNHlzD6MxHg8qqRPoHw ESJnQNbZQIVIKxlabNqxf8GbzvStKFE8tacyy4CdLUkp4VIQarFs2nJlKuE7VOVGJ4qp ZbyPvVm+fGfLWPhcPjRZeC9RGc/Nz8SX4hubJieIoxNqZn7yJXex4F2EMdJ3r6MYCcyn luMw== 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 1si16400719plz.45.2019.05.06.07.07.17; Mon, 06 May 2019 07:07:34 -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 S1726444AbfEFOEL (ORCPT + 99 others); Mon, 6 May 2019 10:04:11 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:57613 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbfEFOEK (ORCPT ); Mon, 6 May 2019 10:04:10 -0400 Received: from localhost (aaubervilliers-681-1-29-145.w90-88.abo.wanadoo.fr [90.88.149.145]) (Authenticated sender: maxime.ripard@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 44D5920001E; Mon, 6 May 2019 14:04:05 +0000 (UTC) Date: Mon, 6 May 2019 16:04:04 +0200 From: Maxime Ripard To: Petr =?utf-8?Q?=C5=A0tetiar?= Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, Andrew Lunn , Florian Fainelli , Heiner Kallweit , Rob Herring , Frank Rowand , Srinivas Kandagatla , Alban Bedel , Felix Fietkau , John Crispin , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 01/10] of_net: add NVMEM support to of_get_mac_address Message-ID: <20190506140404.rg63wecj4qet2244@flea> References: <1556893635-18549-1-git-send-email-ynezz@true.cz> <1556893635-18549-2-git-send-email-ynezz@true.cz> <20190503143643.hhfamnptcuriav4k@flea> <20190503154407.GE71477@meh.true.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="p37qtcksadkvh5cm" Content-Disposition: inline In-Reply-To: <20190503154407.GE71477@meh.true.cz> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --p37qtcksadkvh5cm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 03, 2019 at 05:44:07PM +0200, Petr =C5=A0tetiar wrote: > Maxime Ripard [2019-05-03 16:36:43]: > > Hi, > > ... > > > > + pp =3D devm_kzalloc(&pdev->dev, sizeof(*pp), GFP_KERNEL); > > > + if (!pp) > > > + return ERR_PTR(-ENOMEM); > > > + > > > + pp->name =3D "nvmem-mac-address"; > > > + pp->length =3D ETH_ALEN; > > > + pp->value =3D devm_kmemdup(&pdev->dev, mac, ETH_ALEN, GFP_KERNEL); > > > + if (!pp->value) { > > > + ret =3D -ENOMEM; > > > + goto free; > > > + } > > > + > > > + ret =3D of_add_property(np, pp); > > > + if (ret) > > > + goto free; > > > + > > > + return pp->value; > > > > I'm not sure why you need to do that allocation here, and why you need > > to modify the DT? > > I was asked about that in v2[0] already, so just copy&pasting relevant pa= rt of > my response here: > > I've just carried it over from v1 ("of_net: add mtd-mac-address support = to > of_get_mac_address()")[1] as nobody objected about this so far. > > 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 NV= MEM as > well in order to stay consistent. > > [...] > > 0. https://patchwork.ozlabs.org/patch/1092248/#2164089 > 1. https://patchwork.ozlabs.org/patch/1086628/ > > > can't you just return the mac address directly since it's what the > > of_get_mac_address caller will expect anyway? > > I don't need this stuff, I can remove it, please just tell me what is > appropriate and I'm going to do that. Well, if no ones need it, then there's no point in adding support for it then? Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --p37qtcksadkvh5cm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXNA+1AAKCRDj7w1vZxhR xbBPAQDGD/fKy0R05WqaOtYm+o/xz3E7fmM55x4yVTtBBNPaBwEAlrB12chRxf7D hQKQJNr947sM00pol0dDHf0AdNW3xwk= =fTWI -----END PGP SIGNATURE----- --p37qtcksadkvh5cm--