From patchwork Fri Aug 10 08:05:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10562499 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CE9F157B for ; Fri, 10 Aug 2018 09:11:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBD792B883 for ; Fri, 10 Aug 2018 09:11:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E78822B8C9; Fri, 10 Aug 2018 09:11:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 998332B883 for ; Fri, 10 Aug 2018 09:11:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=CduWvLPrBKF265HF8Q6yRF2vmh74Dm/7H6BZ5CGPUcY=; b=ct61luF/Z93vu4gQQLgvPItG8p JCJXq5x/PX/O3vqC1+loBYQu6l9isBXk1/tcZD4sXZNaJnOU+3j+YzlzJBfr6UvCaSYBzYoRr7HQ4 HEY676oXyHLGLv3kZoNNRRSm/5WmskCka4igmXnfLBb+Xvti100OfEFFkOM1kOdD7aYQ3fb9EZnyn skXPwBQf4iSoe/uWculPPuEtehsgYKmjstEOZ1O2s/G5sT6sz1ixmFlUkAK0JcLbUgl8Uhiy6vfda y0/l59tGJ9hV47WVHnU/3wGi1cXrUpNRQ88/h54YX9rV0Rb2f53Pn5BNaodbEAljH7KmDRvqPXXl1 PkNvQA1A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fo3Rs-00036A-8V; Fri, 10 Aug 2018 09:11:08 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fo3BR-0007pj-Fc for linux-arm-kernel@bombadil.infradead.org; Fri, 10 Aug 2018 08:54:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: 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=HVcV+D9oE5OwLHTLo/qKvbgd6WX5oO3G+bmGYBBY+LM=; b=zdcBD6/Xv97yK4ZAqcGiZah+L 363BA8Jp99Ix1QHYAOolKE/evhd9ZiMY50/iYCRwAKrrFOf+/3wArlpyKivxDhIUiS6qQwK2AJ3K6 OytfwOCRaiHMTAMJ38iSlm86rw55NBBWxpnMzUbvIdHuViK7p5fDh6zQMoZXcugEQGgsK68cgnEWF qISS3msURB9h462/bACRMzx7T3cakjk1OQFdnxqATh/jA4aoWki+o8zm7Qhsy/BjMuqV3azbMvRu9 pgLuP6EZH+mVw/Dsdlul1T089NeBvkvCvGxqaMI1Nf5sP6oFSXlnNugomDChyIltqvn7kwMarFZAv 2PHy77pOg==; Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fo2R2-0007Wa-Ej for linux-arm-kernel@lists.infradead.org; Fri, 10 Aug 2018 08:06:14 +0000 Received: by mail-wr1-x436.google.com with SMTP id c13-v6so7496327wrt.1 for ; Fri, 10 Aug 2018 01:06:01 -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=hibBgftHlzkC0BCnVOfB5sDVQYC1AWm2bFBqfbcD+jLPs9GJaz0evpK4zFQtkKrD2F lK9F39lm9sYWKwSJrVIGRPFkfDHyUkoFlUZj4rW/WoRr3tKzt6u3orc/Jcs2sOeHbjJS 2daFPe+rVe76dinmalA0zKlmK5/sCPo33RidxXlsU3MBB/2Zp/4AluAWQF3A1fCvNzL2 ntOUNxJ9Prdks/i9OiFW/IEINt/oKbivoqCvy4orI6lcsHcfHQ1XrNU8lIotl0ssAFe0 vSn9hycyGxn6JTk1CQAa1NmpC8Ie3BTlq/MrIAZuPYXYSenvqNfV07UM5qXDpUFz9nb2 WARQ== X-Gm-Message-State: AOUpUlFMZwzrFO/G885fG0iwSgcakERh/IaQcAIz9y/OF4oe+XYe0+SO 5fH5j8Hhs0m2MOAFEyPu1kT7Qw== X-Google-Smtp-Source: AA+uWPyBdjVAqNR/3A8sojlKFsQmP5DkUM6AEbLZ9dYbBKm/fehxDFZKubc2KMb2IL1kO7W4wKMBJA== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180810_040612_545787_C94D78DE X-CRM114-Status: GOOD ( 15.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , linux-mtd@lists.infradead.org, linux-i2c@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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);