From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC549C43218 for ; Fri, 26 Apr 2019 13:47:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DCE5206E0 for ; Fri, 26 Apr 2019 13:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726295AbfDZNrO (ORCPT ); Fri, 26 Apr 2019 09:47:14 -0400 Received: from 8bytes.org ([81.169.241.247]:37632 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfDZNrN (ORCPT ); Fri, 26 Apr 2019 09:47:13 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 11282447; Fri, 26 Apr 2019 15:47:11 +0200 (CEST) Date: Fri, 26 Apr 2019 15:47:10 +0200 From: Joerg Roedel To: Heiner Kallweit Cc: Benjamin Herrenschmidt , Michael Ellerman , Oded Gabbay , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , 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 , 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" Subject: Re: [PATCH v2 6/9] iommu/amd: use helper pci_dev_id Message-ID: <20190426134710.GD24576@8bytes.org> References: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Apr 24, 2019 at 09:15:25PM +0200, Heiner Kallweit wrote: > 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, > -- > 2.21.0 >