Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3602450imm; Mon, 25 Jun 2018 01:08:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJIJShTmwgOGI2dfsZzmVhFXqMrP1n2iZqgWT8J9sGtifpcfpf9h1lcq+lgzGoytzsEvZFk X-Received: by 2002:a17:902:42e4:: with SMTP id h91-v6mr11351576pld.27.1529914096956; Mon, 25 Jun 2018 01:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529914096; cv=none; d=google.com; s=arc-20160816; b=qou2xs8reQ6GU8Wq+RIM9DQGoy/Klk4DGMERJtq9AKzeyR/9WRinVacFBhoS5cyKFG 4itNMzf3lIwfCB0qiVrynRZ38wnEzIiOk/0o8nVN69xkp033x00neyEfuwhFFL44O7c1 +w6mECW0XgSJ8neT7L0rkjAo9EmqN/oMphhJkcSkVL1pJ1ByZC0C4HOHowLOLZV9OLMW VAFc8gDt96XiXiIN7he2rz9S4WMKzgcqi8gswTbbhO6g9Z2jYu2X9S4T0TLf6ilvu49e xY7MP7HAwq8dRPX9i9Z+rlFzpy8hfPWlR15Rc40KlN2Xh9C2oztXlBySyqX/iMojCECd HZLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=S1a18xAbxYPLbpuSMfVvJkgnSQ59iPF3fFU8i4v1nCk=; b=m3WaCCPOw2ZLq8wosl6tdJeKa7hltZtFFDVIpAj3/n4uqa9gPZW/AvikhAroUGLeti AKI8KYLETPuClHo2X1ngUUCKIviI1g5gaIJl5BNnnqwHxALO+t1jarTpJhcfaDUaXm55 vs8YRw4LhlIH1VlOr1d8dA2KHgbuG5IdC1ASKQ6cAnFNvSb9fE431PAgF0XfcLlELRr9 s/QXLxgbZ3+x/0a20lpEIZhoaABSRRS6fcH2C28vHQpxDgxsxrI7CSGAZyIBzXam/JiF DWKpVMNYu54KnsRLzOrLMZgKUYrwJRkgUjWlShjqVIYaB34QA4sUjkQgT24eJrz7ApQb qs7A== 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 q8-v6si13730672pfa.272.2018.06.25.01.08.02; Mon, 25 Jun 2018 01:08:16 -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 S1752982AbeFYIFy (ORCPT + 99 others); Mon, 25 Jun 2018 04:05:54 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:54436 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752507AbeFYIFv (ORCPT ); Mon, 25 Jun 2018 04:05:51 -0400 Received: from localhost (unknown [211.231.11.194]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id AEB61133F9EE1; Mon, 25 Jun 2018 01:05:49 -0700 (PDT) Date: Mon, 25 Jun 2018 17:05:47 +0900 (KST) Message-Id: <20180625.170547.658198698048994134.davem@davemloft.net> To: marcel@ziswiler.com Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com, marcel.ziswiler@toradex.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] igb: allow optionally getting mac address from device tree From: David Miller In-Reply-To: <20180625080042.32286-1-marcel@ziswiler.com> References: <20180625080042.32286-1-marcel@ziswiler.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 25 Jun 2018 01:05:51 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcel Ziswiler Date: Mon, 25 Jun 2018 10:00:42 +0200 > @@ -3122,7 +3124,11 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > break; > } > > - if (eth_platform_get_mac_address(&pdev->dev, hw->mac.addr)) { > + /* try to get the MAC address from device tree data */ > + iap = of_get_mac_address(pdev->dev.of_node); > + if (iap) > + memcpy(hw->mac.addr, iap, ETH_ALEN); This is exactly what eth_platform_get_mac_address() shoule be doing.