From: Wei Wang Date: Tue, 13 May 2025 03:07:38 +0000 (+0800) Subject: iommu/vt-d: Eliminate pci_physfn() in dmar_find_matched_satc_unit() X-Git-Tag: v6.16-rc1~110^2^10~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3df2ebcee9fb3bd2597d1758795471a3a3b2203c;p=thirdparty%2Flinux.git iommu/vt-d: Eliminate pci_physfn() in dmar_find_matched_satc_unit() The function dmar_find_matched_satc_unit() contains a duplicate call to pci_physfn(). This call is unnecessary as pci_physfn() has already been invoked by the caller. Removing the redundant call simplifies the code and improves efficiency a bit. Signed-off-by: Wei Wang Link: https://lore.kernel.org/r/20250509140021.4029303-2-wei.w.wang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 0f2845147058d..d48ff945832de 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -2686,7 +2686,6 @@ static struct dmar_satc_unit *dmar_find_matched_satc_unit(struct pci_dev *dev) struct device *tmp; int i; - dev = pci_physfn(dev); rcu_read_lock(); list_for_each_entry_rcu(satcu, &dmar_satc_units, list) {