[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250509140021.4029303-2-wei.w.wang@intel.com>
Date: Fri, 9 May 2025 22:00:19 +0800
From: Wei Wang <wei.w.wang@...el.com>
To: dwmw2@...radead.org,
baolu.lu@...ux.intel.com,
kevin.tian@...el.com,
yi.l.liu@...el.com,
jroedel@...e.de,
linux-kernel@...r.kernel.org,
iommu@...ts.linux.dev
Cc: Wei Wang <wei.w.wang@...el.com>
Subject: [PATCH v1 1/3] 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 <wei.w.wang@...el.com>
---
drivers/iommu/intel/iommu.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index cb0b993bebb4..d8aa71305509 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2744,7 +2744,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) {
--
2.43.0
Powered by blists - more mailing lists