Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp482576pxb; Wed, 27 Oct 2021 06:43:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPtCdjbaqCnzvmJoMwQswdQytImC8n5i7IOzx3js6SFTOiLSQXzROEiaGDuSS1y/sJBTqr X-Received: by 2002:a17:906:1957:: with SMTP id b23mr24826643eje.516.1635342217656; Wed, 27 Oct 2021 06:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635342217; cv=none; d=google.com; s=arc-20160816; b=yAWW3FhGR9NLhoGmNuSz7HPJmXc2rh7KAtrj0wR/LPj9Zuuvfl2HyuqapTH+Mcgxn7 KKr6MR5Rwiu/zhuP4qLy5FVAq4sFgHZC4GZ5BnDw7TcIr8dcrwJLf9ZuBpZzfAv94Blt 1fkdiG4Y72dsM3lx4RMGlcjZVjf4OsynbYFphb7RHluVlk8DPRXRbO7j86LhqFiU0BpA YQgZIo6MkMyWT+BT8aO3Yp0jLD41KK051MXMZ6wvRPjZEqPUvYi9sxp7styn02c6pS0Z Van+2PzjeKoUUWkRFFl3MLXZxnYtbMuZDSqoVuq3OiHOgdPIR/CPItRbQZzQLB95BbA1 hSzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=l3HKwrI4aii/N0e3D8E0FITj+tQPQCyffkihHJ5j0nc=; b=dDgDGl1i6nu4yw8QdZp61hCUs7Xm7QFJt7F8cMbFgrnpoX13/i13fEuyfSBlmZXTpa QIzAhK+bwRYIQ2lpdUTjXmN63LQKlppod9ZKU/BvrmMVElGMMj6psVGHg3Ra1+UVCmjh BBLusJ8FSJ8XDWUyQKAc/TrmXAf332wD5piosrSd9438kRD4qV5bk8Hh3cXj+ZYxZLip 8KEZnUZV6Z7ekgW4kTgs1LHsT6x3T2a02fRlLzLkFsoox9aPXfPnUP/17u0mkedwzHua plQEx9dQvNY+uIMB5aHIiqbxZBn3Wz9Brl56sjmuN5jeBx3K1MpPLnSv6nhwYOuwuXc4 Ze1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=n3q9Nv1+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt2si17875319ejc.571.2021.10.27.06.42.32; Wed, 27 Oct 2021 06:43:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=n3q9Nv1+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240362AbhJ0AKk (ORCPT + 99 others); Tue, 26 Oct 2021 20:10:40 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:60680 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230500AbhJ0AKj (ORCPT ); Tue, 26 Oct 2021 20:10:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=l3HKwrI4aii/N0e3D8E0FITj+tQPQCyffkihHJ5j0nc=; b=n3q9Nv1+OxmGCua+s3bMYSsIw0 v4zsQ7/sayqijhOCuHnryTEhDexB3O5CNiNM3TkuySjXvXqEmMJJFp3kKOCu4Pdq/B39BombxpMJR Cds3ckIsl9FUw4fj9iKtev+oMdO0m9Xdtx+M3GjF1Myt+5TChIIILEEY8RXs7d9pmkaM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mfWU8-00Bpoe-Nx; Wed, 27 Oct 2021 02:08:04 +0200 Date: Wed, 27 Oct 2021 02:08:04 +0200 From: Andrew Lunn To: Corentin Labbe Cc: davem@davemloft.net, kuba@kernel.org, linus.walleij@linaro.org, ulli.kroll@googlemail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] net: ethernet: cortina: permit to set mac address in DT Message-ID: References: <20211026191703.1174086-1-clabbe@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211026191703.1174086-1-clabbe@baylibre.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 07:17:03PM +0000, Corentin Labbe wrote: > Add ability of setting mac address in DT for cortina ethernet driver. > > Signed-off-by: Corentin Labbe > --- > drivers/net/ethernet/cortina/gemini.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c > index 941f175fb911..f6aa2387a1af 100644 > --- a/drivers/net/ethernet/cortina/gemini.c > +++ b/drivers/net/ethernet/cortina/gemini.c > @@ -2356,12 +2356,14 @@ static void gemini_port_save_mac_addr(struct gemini_ethernet_port *port) > static int gemini_ethernet_port_probe(struct platform_device *pdev) > { > char *port_names[2] = { "ethernet0", "ethernet1" }; > + struct device_node *np = pdev->dev.of_node; > struct gemini_ethernet_port *port; > struct device *dev = &pdev->dev; > struct gemini_ethernet *geth; > struct net_device *netdev; > struct device *parent; > unsigned int id; > + u8 mac[ETH_ALEN]; Off by one in terms of reverse Christmas tree. Andrew