Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1902996yba; Sat, 27 Apr 2019 09:31:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqycEKcY6eKnFHGM8bBzpyb/K4HIP+m1GiBSbs+hlkRflS6Y2qydEKQbaqFDeNEEg5bIqrBE X-Received: by 2002:a62:1690:: with SMTP id 138mr52097597pfw.28.1556382665652; Sat, 27 Apr 2019 09:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556382665; cv=none; d=google.com; s=arc-20160816; b=hzb+VRwKf2OM0guPPOQvmv69hKorE/7a8GbWD5hgXL08N3g8e45HwABwZ38wvvW8f8 WjvNHmIQthmYzPbOLI6Vlk0n5hKzTTOH8hL5IEIGsFwPzlIfTCgO2NyPoZlG4O8TNc0t 689Sud2VV7R2zzQEnkx0oN+cLoOVM/WSsFpmaI+0h7cRlpoHrxW8KoG29kM1h7g+mI3+ eZYXiYjlqVt9V9czN9O9chcaigc2z8Ph8vVnj24OOqjgoIxoYTdJOvEB13qcKJ0breJg ybgsW3VEQPKXiAF7JYLkpSomKijrbhITfNjRHP/osixdG+3geQW7BQo2ietvx1GOGG6o FmaA== 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:dkim-signature; bh=DrSwXGl/m5iWJzAo48ShV8DLblMhoPKvC7H2WjCBtRM=; b=cVjYNAMIDcLEN3N+aRSP+NkZQ3srEKmaX32/oO7YUV6kQrFW7TpOITgzragtb0VMeP D9puyTRYyo4JYklM6ZhyEFAZlvF4aavboPSWegtrIZwbFySgQXxhi9J+c4UYPvvhyeTI McfDoOGYsFHQk61dW/km+0uRS50GYiCWdHMDYyFs6CEM7E75izAKk1VH6mUckxTFW6X0 nz1q+GzgvBfJIxqfF6IUArtNKbFPgwxaX5cURZhMsQw+tifX8DL4LbVTDDgYrGpnARZT b25sgWvFU8SNX21rP5fcKSDt8lEjrx+uwZxA+2Bu0igoCvW+6uKEDNkW+0zaCDsRMfFS r5fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=nUctkk4x; 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 d22si5563633plr.387.2019.04.27.09.30.47; Sat, 27 Apr 2019 09:31:05 -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=fail header.i=@lunn.ch header.s=20171124 header.b=nUctkk4x; 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 S1726119AbfD0Q22 (ORCPT + 99 others); Sat, 27 Apr 2019 12:28:28 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46618 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbfD0Q21 (ORCPT ); Sat, 27 Apr 2019 12:28:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DrSwXGl/m5iWJzAo48ShV8DLblMhoPKvC7H2WjCBtRM=; b=nUctkk4xTAOl5jinKQT8lKygok QUvP/wqC49SQQNgptkVZdqqvDW2vm1q/JLe4vKcep5C9zKBuKvl/Pk/n2+hqszJp6i6ZIwgcgxnNS e+iSAor25mLLD5TmFIB14aQ6ebperNjxPPO9NO2kAtl1PdOjtwZdI2P3F4L6k6LsZxYs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hKQBb-0002el-V7; Sat, 27 Apr 2019 18:28:23 +0200 Date: Sat, 27 Apr 2019 18:28:23 +0200 From: Andrew Lunn To: Petr =?utf-8?Q?=C5=A0tetiar?= Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Florian Fainelli , Heiner Kallweit , Rob Herring , Frank Rowand , Srinivas Kandagatla , Maxime Ripard , Alban Bedel , Felix Fietkau , John Crispin Subject: Re: [PATCH 1/4] of_net: Add NVMEM support to of_get_mac_address Message-ID: <20190427162823.GA9816@lunn.ch> References: <1556320002-26213-1-git-send-email-ynezz@true.cz> <1556320002-26213-2-git-send-email-ynezz@true.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1556320002-26213-2-git-send-email-ynezz@true.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > /** > - * Search the device tree for the best MAC address to use. 'mac-address' is > - * checked first, because that is supposed to contain to "most recent" MAC > - * address. If that isn't set, then 'local-mac-address' is checked next, > - * because that is the default address. If that isn't set, then the obsolete > - * 'address' is checked, just in case we're using an old device tree. > + * Search the device tree for the best MAC address to use. Check NVME first as > + * it should contain the proper MAC address, then 'mac-address' is checked > + * next, because that is supposed to contain to "most recent" MAC address. If > + * that isn't set, then 'local-mac-address' is checked next, because that is > + * the default address. If that isn't set, then the obsolete 'address' is > + * checked, just in case we're using an old device tree. Hi Petr I'm not sure this is the correct order. I would actually put NVMEM after mac-address and local-mac-address. These are well established and used. We don't want to break existing boards with a new property. By putting NVMEM later, in order to make it used, any existing mac-address and local-mac-address need to be removed, making the developers actually think about what they are doing. Andrew