Received: by 10.192.165.156 with SMTP id m28csp2007814imm; Thu, 12 Apr 2018 07:11:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/N7g7iiJqE89zqhgp3EG7t4DUlXVcCPAITGlR+1xrwhbWrKXMYQi8KS6tgsH1B42l3EuAf X-Received: by 2002:a17:902:a582:: with SMTP id az2-v6mr1241712plb.210.1523542288044; Thu, 12 Apr 2018 07:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523542288; cv=none; d=google.com; s=arc-20160816; b=wCe1wTpA5xkl7jHW5XM0YkW7e3Qnipz7DrVYAi46mCIbaTywhc3TvpFuR1i8mVoFbL xc/3gAhMHruVm91sJR0eBMsgdKAg4kaqcR3HnXeZxWfwohbZDUYIZXHDtWEFucLmAQRQ U/gvRm2D7PaFxgLO9aN56LBV/jlw+xRUbL3eKpJLnRwen3h+N+uXs42EpAj7OaIBKbxH puswwvNDaxtQU3iBBs8hn3+g9ThZOsDAolwUzLj2kY1lF++v+1cuSYifhpg/HaUQOnwJ GWPEyVDDVe1x1kRtPJlQ+Zhb6X64mZQBnTkO9qDKoeh4uU2Vrtv/HAzp21DtLvAfIO31 yVRA== 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:arc-authentication-results; bh=Zozat1SF4C9xSyTeSt57GINBGcAUOPPiyZbcAPEpm5s=; b=c2egAm2YsbpKrLZMIBuOYp2PSIBY7g4RnOY/dZ+utHnLdk++1mv79k0lIhOWRYwke+ NTIUGsATrIKCUxaGtGCEt2+wbnDUHwOlpVm0nTEn3z0ofMBsDfbh4D0NWtWpGudJ1SAa CS//L+nQA7RHJVPTPK8xBpCsJ3jDHEwwXE3f8ytIL/4nBW2Trl9hPY7U6iDuuv1P6DHf QAbGThFNmiUY2SWhzszVriMIf6fp6JKbcJcFCgcRTtPS9qVLFdRx0H2TriwuYKQVFn05 +jGpD7ZNbdXpeO5OYEKfgrpc2SMdatUFM/lgUmc2279GSa8g1GsNqtEoNgqyxhaeVnA7 ZdwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Xb3XlEhJ; 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 b3-v6si3330086pla.505.2018.04.12.07.10.51; Thu, 12 Apr 2018 07:11:28 -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=@lunn.ch header.s=20171124 header.b=Xb3XlEhJ; 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 S1752954AbeDLOGw (ORCPT + 99 others); Thu, 12 Apr 2018 10:06:52 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56555 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752355AbeDLOGv (ORCPT ); Thu, 12 Apr 2018 10:06:51 -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; bh=Zozat1SF4C9xSyTeSt57GINBGcAUOPPiyZbcAPEpm5s=; b=Xb3XlEhJ7XYLX/J1QUGdqh9ovUOTXKyZ8PYGK8bP6iv3bfnHA6iH+t0GEE+ASWqniBg9wMhWkckQXxWXM6dwVQAqoh5lKoAnxmhkIqeTxmkWbPQFwCc7RBt18ZQn5YfjyChyyAhEFIvFyODMQp11jBUcmDlxDGTFtMrTz0vNdnY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1f6cs4-0008JK-T5; Thu, 12 Apr 2018 16:06:40 +0200 Date: Thu, 12 Apr 2018 16:06:40 +0200 From: Andrew Lunn To: Phil Elwell Cc: Woojung Huh , Microchip Linux Driver Support , Rob Herring , Mark Rutland , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Linus Walleij , Andrew Morton , Randy Dunlap , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH 1/4] lan78xx: Read MAC address from DT if present Message-ID: <20180412140640.GL28963@lunn.ch> References: <1523541336-145953-1-git-send-email-phil@raspberrypi.org> <1523541336-145953-2-git-send-email-phil@raspberrypi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523541336-145953-2-git-send-email-phil@raspberrypi.org> 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 Hi Phil > - ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo); > - ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi); > + mac_addr = of_get_mac_address(dev->udev->dev.of_node); It might be better to use the higher level eth_platform_get_mac_address(). Andrew