Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp662708yba; Fri, 26 Apr 2019 06:48:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYeNV7q0gLhxCUwbV0tUopvQattuRtLFHNUi+CXqf5ITvQCoRps+y45EG50h29gyTecNUO X-Received: by 2002:a63:28c8:: with SMTP id o191mr1751319pgo.164.1556286505253; Fri, 26 Apr 2019 06:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556286505; cv=none; d=google.com; s=arc-20160816; b=jsO2TgOs+k9GOE9elOMJEtLJpdH7pxmDS9swSy2A4GPlpopziEZsDFjTHltlPuvwFP 41dzHRw1tTItfwBu6eDZS6gnD/GDVC0n9VM8F1uoiWfZoJuRnrWunH205VFwoet/7cY2 5SJM/f1GRk/bev/aa5q7DSqXNKWmFHVtFPOsxu2/Zv+I4O70FnbKYj6j3rKLDdMIH0GU mDDNKmqkE+/8xLKcw02d/c4aoZSiUtwfslPiUS6mh8GCLCTtiK3l10x/H7EDtzAPqBkh Emla1mWDXjnRiqkriwdzktlsAzvd/C/ZNbJSqOKtOJr0q6c1+GEYmFsjGsckMYgRv6Yr P2Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2+f7c3dtsV5eQAq2feewoHUc3FDMUxeAMV8twAyL0og=; b=oLyRgbOu8UvBx0c5P9LqUeK+nYt3Nj4+CvpWxDeJeh482JTgHrBhyleMNyO00eHuTR YTWe03Jcro5cFeL80hc3q+xLplxcPRgNWxJvsc6D0ezcInphpsc0r8Tq8tjrpuAICjle YgypUYOcEYg5ouIIq136s2Lexw3j/SiyyVKOizes6M5LeX2n+HdFhqrmaf+0wH7uBlMY 1SVY2kMM6kSxl+mu8/JGJEekqcNNPFHDGbCXrjIXR8FPZMKpZYgTFKn8xFzznPX0K9e5 qi9ak4bYxCazoN4rHyoIPkvwR7IcNRe8GWO9Nb6KUIoMokHQtHvvEcSgj+VVlsB+0c/w NQFA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h63si24121658pgc.404.2019.04.26.06.48.09; Fri, 26 Apr 2019 06:48:25 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726308AbfDZNrO (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 >