Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp663648yba; Fri, 26 Apr 2019 06:49:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxM5cVvH9WNdzB//EOAvZso3Fzl5eoXtDg4ujkC15lPHXDDQgbmUlAIF7llE+QIyl7iXNw6 X-Received: by 2002:aa7:9148:: with SMTP id 8mr16626802pfi.176.1556286562520; Fri, 26 Apr 2019 06:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556286562; cv=none; d=google.com; s=arc-20160816; b=m/nfQ3GxpJ7cfLWO2Worf9ItjfINEDeBj3jCnz1qMOoCoakRukJuosMsQz8VhicAD+ S31X1NR1BuktUgVeOE0cIsrHNBdCcBL+cnVhSARRX8ZCWlOBcmf4bMiYaFdz7HPd8bVX U+S14cX7TYyRAfEEpbhGAy9PYAaCVhKlT6c7Qih1M6+Idjks0MUzjDA6fEc2Nxh1YfGL FDbOJ8dbAt7nVeUhbPGPmjcqgx9YY+As76ZljKALbQSSnvqhmiQvN8xpUttY1eqCT7jd CejH/eWeKW6Pv/wkdur408RoMjy3d95AH7PVs7q98QvhXv48UtJiC6l0HKrf2jonL7s4 UsEA== 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=TbsOBb/nzJ/1dnmFjbeb0Jtb5WrzHRZ/gi3tia3EDXc=; b=EZTBzj3Jw+y81ivr0rVxLRdu+/ApKtIMcMiDGjl5ZG5bO7TXIBP2/P08HO76h9W837 wm116po4zwt3Q50Pj3Xa3M4e/iORYSpC8zqfFYFcSm0R6U50M/3UgcCRnOrYp88LUhMo VyL8GGiFcG+T0Zv82YGDXTYIDRsY1uJPIENBvnvdDSLUINmPurPc09u+VjWlkzdHnvr1 cR23auu8YavBrmWO69dVsrTCEwJON4Rn6u6VXtzZGpGMlurhsPr7+Nl4/aEdxqpDpHSb JP03PShH/ne9NbSvgVa939F726R30cowunXYSVI5QLkrxuE5sMfCYapjD/WO3MqajHGH tjCQ== 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 a17si7443652pgm.505.2019.04.26.06.49.07; Fri, 26 Apr 2019 06:49:22 -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 S1726409AbfDZNrc (ORCPT + 99 others); Fri, 26 Apr 2019 09:47:32 -0400 Received: from 8bytes.org ([81.169.241.247]:37696 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfDZNra (ORCPT ); Fri, 26 Apr 2019 09:47:30 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 590925F7; Fri, 26 Apr 2019 15:47:29 +0200 (CEST) Date: Fri, 26 Apr 2019 15:47:28 +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 7/9] iommu/vt-d: use helper pci_dev_id Message-ID: <20190426134727.GE24576@8bytes.org> References: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> <0889204c-18aa-8a5f-1781-aaf32ee5beba@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0889204c-18aa-8a5f-1781-aaf32ee5beba@gmail.com> 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:16:10PM +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/intel-iommu.c | 2 +- > drivers/iommu/intel_irq_remapping.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c > index d93c4bd7d..3f475a23a 100644 > --- a/drivers/iommu/intel-iommu.c > +++ b/drivers/iommu/intel-iommu.c > @@ -1391,7 +1391,7 @@ static void iommu_enable_dev_iotlb(struct device_domain_info *info) > > /* pdev will be returned if device is not a vf */ > pf_pdev = pci_physfn(pdev); > - info->pfsid = PCI_DEVID(pf_pdev->bus->number, pf_pdev->devfn); > + info->pfsid = pci_dev_id(pf_pdev); > } > > #ifdef CONFIG_INTEL_IOMMU_SVM > diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c > index 634d8f059..4160aa9f3 100644 > --- a/drivers/iommu/intel_irq_remapping.c > +++ b/drivers/iommu/intel_irq_remapping.c > @@ -424,7 +424,7 @@ static int set_msi_sid(struct irte *irte, struct pci_dev *dev) > set_irte_sid(irte, SVT_VERIFY_SID_SQ, SQ_ALL_16, data.alias); > else > set_irte_sid(irte, SVT_VERIFY_SID_SQ, SQ_ALL_16, > - PCI_DEVID(dev->bus->number, dev->devfn)); > + pci_dev_id(dev)); > > return 0; > } > -- > 2.21.0 >