Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1453993yba; Wed, 24 Apr 2019 23:20:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzw8gDR4UJEdXl+XNS0hU6YL+1eOBKjZEpqf0Y9tmFzMiMG6kMUHOvHV1GceQPqNigmwm+j X-Received: by 2002:a63:6907:: with SMTP id e7mr34289910pgc.209.1556173253138; Wed, 24 Apr 2019 23:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556173253; cv=none; d=google.com; s=arc-20160816; b=WHoKawutoNek4GtE+liZS1DGohqkgqf81/jd+CqBkaQoNvEFKniF4zouvhwuPmXkw5 Rqjsmh8GysMKjfwQMpdRChd2FHHMK5tFC1wBTQ6O5VCf1uUtUw4r9tgRtIkG/V15N2eX 1dv+Cp0Iio6U/uVBYAPaik23k9qXTB1V+wQH1LWbmkrA7zBPuH7u0lDBiK6KEpqdZwEb O3cmNryCE1aJeaWfgH2bWHqUptqmKIuqRf1+C5+Q40uqvofG0fPZTbLF5tGUKhXfpPfO lk5U19NlcuuHOV1WhT3JOTnsfVgZztCGxBNSbM/k+RCfO4BII4DY3kTuWdajuFVDBORc 28YA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=+k7fklQVC1wXNkIsXxuBFFgxierE2Y58VYjajnqTX8M=; b=SIy4dkVWWKSEPyMUwjIiHO5xco1r0V4tx9auZhaiL35Zy6KA1PbPoqroJEdepd4eMv S5EKW09oIWaqhJwVe6546Knnn4eU1qu1Ds1PhkkkgbX74Irb8p2SMlp7X/WIUc5gnC9e 7t3Un6aTxBDoqa+YIG/PUFaIAHKrDSIjclyBc53a7csUHRVRY7iz6pbYct3Kjax9nON0 92VoYtHL7YAqY0GICCr8WAG68k7MzH+ZKU80DJpFMgj2rNfqixjPzXVmdFoveTiFjGxq 3K21Le39SkgxkD7DNBTngmGLVxzc764u08aLQ8ls+NYvOm2ryYFRTN7LZtg7n7GhxYtY rlbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KK4njm5c; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j36si22324805plb.210.2019.04.24.23.20.37; Wed, 24 Apr 2019 23:20:53 -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=@gmail.com header.s=20161025 header.b=KK4njm5c; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388523AbfDXTRs (ORCPT + 99 others); Wed, 24 Apr 2019 15:17:48 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43555 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732310AbfDXTRq (ORCPT ); Wed, 24 Apr 2019 15:17:46 -0400 Received: by mail-wr1-f68.google.com with SMTP id a12so3432422wrq.10; Wed, 24 Apr 2019 12:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+k7fklQVC1wXNkIsXxuBFFgxierE2Y58VYjajnqTX8M=; b=KK4njm5c66wApJlm8WGtcK3eINA7bZzqf9jpF/xDcoCSdcuGWR7ygTnW7CxGOT7Zpb ClJa1zpkc0LnLQ3Y9FSdXrMwgQvpBYbm2h61pKGsBRYXBFkHEnXr7h2wDgkaAsAj6P04 n+Zhe79BzllwSlP7qQcQ1oNHfpi5n4yGvzSir6Qil6I+8IfT0AGlMW1C3bfb7hbIOrnv /TQKg5FQRX19gB+eGsG3WBIFJCSsQmuhe604FqNiT/pZUC4DClEWV5U3gwAbTgI70ma+ +jCLa9iSGj52KBjpTWMg0o/2CwQGRZzVKsI7N71kUDVC8rL8yE29inQ1qfO+L+vf3GA3 Zx2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+k7fklQVC1wXNkIsXxuBFFgxierE2Y58VYjajnqTX8M=; b=Q18H1v0Ex2k8R0yyIHpu9qv+ACIRRSDaxOHPlm2jkA3Nbk+QdULOcFHr1SXD5qhvRf K9nnbaNPuyYDFyXBRkbqGLXE9H54VGUKqzgYwtGNMRMnU2haZun7OjZpm+MNAu38AEQT X4OzBVbR0Eq7kAuJCkGGHCVA1OtKqDOsTW69I9HGwQ8beTtcD8gRWPy2nvDxi9/MnJCm an0JE+g2S2JVC2qMYb6RQTXT3JyATEOUfrsI+cRmZHxVQuV52k9MZom2PeTPLHMR7rjj WgsSOxLFKekyDgUHiCaMKZ9OhZm0Th4qEV2tS/nmYe85opoixPjm4s1iDTpREV0t4Iyy VIKw== X-Gm-Message-State: APjAAAXP6lGYk9kRhiUfnxDJb58I2UAcCre2RG9clZ4QISyAPIJrLS7L yUtmRTYNb9XsDdQ5qMhf2QyLxHSyPMAhyQ== X-Received: by 2002:a5d:5485:: with SMTP id h5mr377002wrv.315.1556133463901; Wed, 24 Apr 2019 12:17:43 -0700 (PDT) Received: from ?IPv6:2003:ea:8bd4:5700:c498:ee8f:ff0a:13e5? (p200300EA8BD45700C498EE8FFF0A13E5.dip0.t-ipconnect.de. [2003:ea:8bd4:5700:c498:ee8f:ff0a:13e5]) by smtp.googlemail.com with ESMTPSA id u1sm2183653wrp.69.2019.04.24.12.17.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 12:17:43 -0700 (PDT) Subject: [PATCH v2 3/9] r8169: use new helper pci_dev_id From: Heiner Kallweit To: Benjamin Herrenschmidt , Michael Ellerman , Oded Gabbay , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Joerg Roedel , David Woodhouse , Realtek linux nic maintainers , "David S. Miller" , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Bjorn Helgaas , Benson Leung , Enric Balletbo i Serra , Stephen Rothwell , Paul Mackerras Cc: open list , "open list:AMD KFD" , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:AMD IOMMU (AMD-VI)" , "open list:8169 10/100/1000 GIGABIT ETHERNET DRIVER" , "moderated list:ARM/STM32 ARCHITECTURE" , "moderated list:ARM/STM32 ARCHITECTURE" , "open list:PCI SUBSYSTEM" References: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> Message-ID: Date: Wed, 24 Apr 2019 21:13:25 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use new helper pci_dev_id() to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index efaea1a0a..ae476fe8d 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -7020,8 +7020,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp) new_bus->priv = tp; new_bus->parent = &pdev->dev; new_bus->irq[0] = PHY_IGNORE_INTERRUPT; - snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x", - PCI_DEVID(pdev->bus->number, pdev->devfn)); + snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x", pci_dev_id(pdev)); new_bus->read = r8169_mdio_read_reg; new_bus->write = r8169_mdio_write_reg; -- 2.21.0