Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3005058imm; Fri, 10 Aug 2018 02:01:21 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz4aA1oDa+tSr7T+X67dQ/+qJnHjAJv6E7ib6IrawaioohL3UBzhhlY9QcBMD9PafDQS39k X-Received: by 2002:a63:c608:: with SMTP id w8-v6mr5569247pgg.16.1533891681658; Fri, 10 Aug 2018 02:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533891681; cv=none; d=google.com; s=arc-20160816; b=WJH0I/EBB7+vAX5Uo+nC/WqCHJPrw5FXEEGTKevBCbMbm3uRrYU6KtBXJWn7DcrpHY o7k1Ak8dMttrIsafaRyQ4So9day/EQj0aTSL6PQIATOa2psmvCfxV1O4/ZZhZ4A9aJji PUSbL+vZWNK4SY2wbTZXSYem36rgDIosftQ5LES+76PiLl+ZssRW8cVlVdFTvLHUYhUS HmL4OOaK8j+rK1eDlxcyw+YejYaom4ZqNOcTylKnQgmXj7MpjGOG+Xw+GZEyYHdYctrQ FRIXpZsbxIPL10OPJEjvH3fU7lPnMPuZykc74iFYUgktcfDkOdnkOVmBGU2muuyRY7yE TtDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=HVcV+D9oE5OwLHTLo/qKvbgd6WX5oO3G+bmGYBBY+LM=; b=lX00GSzo/wxwBKr2CUW+3UguRScqqcy6teYDLoVpYlTczi/J3DR8iMytCIVJE8hop2 tKvV661pyIipbTr9KkVU3EaDuqPnPy4w8VO+5+MRtoajqxVv/Pj+0WK5IOpeyuf+ctmE t/Tx55r5TL7rhGJBlJumIQUsTSUAYPux8CcaJZ4coez+ZYbV5eFYzt6BR9/f61VUL96X vZW6dg5A4RJAO6DaKHpW7yW/07vSz70d9JqpJnUerDasti3s0MzgbPedBO9XZfHiV11N huJuX0CizK6/kVvx6PIQmn2jfYFfpombmgBSPKu5ZdBsKJO16g83SoFNNKDi2VbJnohN 6ZQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=bhFAgZ5h; 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 r191-v6si9493181pfr.152.2018.08.10.02.01.06; Fri, 10 Aug 2018 02:01:21 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=bhFAgZ5h; 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 S1727969AbeHJKhB (ORCPT + 99 others); Fri, 10 Aug 2018 06:37:01 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:39104 "EHLO mail-wr1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728206AbeHJKep (ORCPT ); Fri, 10 Aug 2018 06:34:45 -0400 Received: by mail-wr1-f51.google.com with SMTP id h10-v6so7462194wre.6 for ; Fri, 10 Aug 2018 01:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HVcV+D9oE5OwLHTLo/qKvbgd6WX5oO3G+bmGYBBY+LM=; b=bhFAgZ5hHjjTrwrl1iOBbafXfBDZiTPhqPFI3NNgnioBKDQ9cc/2d9WiTpA060hA31 dvp9PdgR/uW2GaC/OfRLieKDN2frM/haHRGaGTfW61Gb9dqlssGutnim8Wr0rUiK2KWH xHoM/SWqCl0FxIazn4IPWAC1uvLuPN/QbBUwVgXVuI6CbZvMWJRcAqYn2UJMZ+Jrg41p ZIuLV4F6xKtofc6znzidBFHaUZ458NXJnukAgkkbkI82sWb5xlYEMW2o0b58czd1clnl j+Drc3J+KuvjnViTb2VpM2V0LP2JjL+1wK7CiLodtIYRrBzFwebqEbHStVGZF/kmONeF POlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HVcV+D9oE5OwLHTLo/qKvbgd6WX5oO3G+bmGYBBY+LM=; b=BdTarQvsQlqearf32HiQH+CX5+YniBPAYLyw8ku9I4neZrHFLzn21QnrLVN3oaMKqN N8T0wEG4o85d4tgsepQmEzCPjym26zbF8vNbtH+RxXTyYRQeu0+AXltic6A4Lz75Oa8G 1TRsdsl1FoI2JJEhpBy87e9kcDrNNXYxbKneA+DcK70JH6mMurKDwp/jFVQzJIEm6ErM GBPEpca6JuIipnpF9YUWWkXdJQvgcnawP0i+aGQiHjHJqZIf3SA5hjj65pWvnVNlGsRc o2uJYcm+3OAVot8GpiXYM9d1YULlTLm0avoxb48hT7vFxYwFOgvN3nB9mkkycuxze+mX 9gEg== X-Gm-Message-State: AOUpUlEYsCAwQZx6Q+txXkMOmyDKz9khHMC/R44XM8teep/orlDH+vfv saUU0oMSUuwoK+dNMP+UI2ux5Q== X-Received: by 2002:a5d:458b:: with SMTP id p11-v6mr3508671wrq.122.1533888359309; Fri, 10 Aug 2018 01:05:59 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-MAR-1-609-89.w90-118.abo.wanadoo.fr. [90.118.185.89]) by smtp.gmail.com with ESMTPSA id h7-v6sm9546405wrs.8.2018.08.10.01.05.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 01:05:58 -0700 (PDT) From: Bartosz Golaszewski To: Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Alban Bedel , Rob Herring , David Lechner , Andrew Lunn Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 14/29] net: simplify eth_platform_get_mac_address() Date: Fri, 10 Aug 2018 10:05:11 +0200 Message-Id: <20180810080526.27207-15-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180810080526.27207-1-brgl@bgdev.pl> References: <20180810080526.27207-1-brgl@bgdev.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski We don't need to use pci_device_to_OF_node() - we can retrieve dev->of_node directly even for pci devices. Suggested-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski --- net/ethernet/eth.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index ee28440f57c5..7f08105402c8 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -530,11 +530,7 @@ int eth_platform_get_mac_address(struct device *dev, u8 *mac_addr) const unsigned char *addr; struct device_node *dp; - if (dev_is_pci(dev)) - dp = pci_device_to_OF_node(to_pci_dev(dev)); - else - dp = dev->of_node; - + dp = dev->of_node; addr = NULL; if (dp) addr = of_get_mac_address(dp); -- 2.18.0