From patchwork Wed Apr 24 19:15:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 10915561 X-Patchwork-Delegate: bhelgaas@google.com 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 7C4BF161F for ; Wed, 24 Apr 2019 19:18:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 683EC28AB1 for ; Wed, 24 Apr 2019 19:18:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B62C28BCA; Wed, 24 Apr 2019 19:18:29 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0980C28BAC for ; Wed, 24 Apr 2019 19:18:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729372AbfDXTSV (ORCPT ); Wed, 24 Apr 2019 15:18:21 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39216 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727357AbfDXTRx (ORCPT ); Wed, 24 Apr 2019 15:17:53 -0400 Received: by mail-wm1-f67.google.com with SMTP id n25so6647378wmk.4; Wed, 24 Apr 2019 12:17:52 -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=IeRjLmIo3+zL+ngn2z6PfEn9LxaA8z9ME0E/GMbJl4A=; b=TUzhCOH2F7RvxialpvgaUFfNbsBpgDv13m50OH+yCHXNzbKgkQ3+3J9fmVotTjHhZ+ nT72Tzc880/U6F/39r2rOLBXumQ/j5RU5NezTirLrIrK8HKif6onpzxPkeL9+3b1vQq2 1DjaR7ZH62jNLmGYqQQPFRrk8RastcZUjByEctXZYR9dDWVH50TBAdTissGRPJJFAaku yTmszbRe7C6g/MQlgrFC4qFKTUqOyA0NfxLlCq1xXJvcaq0cajMvWvopZxIRGurM8C5w Ky8/X9fshxb+9fnIfYrOG+f4N+cBIWfqByuQioMYFAZ1K6Xx48p3R+XHvkUnajpJttNi B/0A== 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=IeRjLmIo3+zL+ngn2z6PfEn9LxaA8z9ME0E/GMbJl4A=; b=gBYh9EKknFeDZ6vp7h5UEhlflKVpCvgQvVX4iKsPWfvndOlLQd348fhy2z3KpJYAU2 Ah58yrVJCtspu92pIUhzmuJQri6cgp7oFw85sg7D8PlvqJ6W3zJO3vLkyORIo38+wnh5 Rc/ph9wAB87ydOw+YtzSuo5n+2AiDLw111Z0ubvu4DAOSea4xsO/Tfl/tYrU40rYcO3W GhHGuuRBEAYKX3fCrPKGf6TERadRhrJLqrGXBq1sELuOjbwhU8TdIrvgya02mIZXeWuN 2WJZcN+3PPhln+inFvDEBRRk9p9lXXP3HKPCJh37C0pGs3wa7m4NTEAXC8xypSRrNws/ dx/Q== X-Gm-Message-State: APjAAAUgGxP/DcyzzPy0GoGmSCiZzeLoemI2cLTO80xULyOJekOMME/7 7JiHKHxlqVidk4cGBZUhC7cHzXpMYHNKMA== X-Google-Smtp-Source: APXvYqwLwnDZWORI7BhpqSdPQhydSnH4TJiDh5p2OFwPcJ1S0/zRXEp6j1rg2GAjg1ue7Rb470bFqw== X-Received: by 2002:a1c:4c1a:: with SMTP id z26mr474306wmf.73.1556133471446; Wed, 24 Apr 2019 12:17:51 -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 a11sm16605685wrx.5.2019.04.24.12.17.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 12:17:50 -0700 (PDT) Subject: [PATCH v2 6/9] iommu/amd: use 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:15: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-Language: en-US Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use new helper pci_dev_id() to simplify the code. Signed-off-by: Heiner Kallweit Reviewed-by: Joerg Roedel --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index f467cc4b4..5cb201422 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -165,7 +165,7 @@ static inline u16 get_pci_device_id(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); - return PCI_DEVID(pdev->bus->number, pdev->devfn); + return pci_dev_id(pdev); } static inline int get_acpihid_device_id(struct device *dev,