From: Lu Baolu <baolu.lu@linux.intel.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] iommu/vt-d: Eliminate pci_physfn() in dmar_find_matched_satc_unit()
Date: Tue, 13 May 2025 11:07:38 +0800 [thread overview]
Message-ID: <20250513030739.2718555-5-baolu.lu@linux.intel.com> (raw)
In-Reply-To: <20250513030739.2718555-1-baolu.lu@linux.intel.com>
From: Wei Wang <wei.w.wang@intel.com>
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@intel.com>
Link: https://lore.kernel.org/r/20250509140021.4029303-2-wei.w.wang@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.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 8c405532ddbf..2258814ffc70 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) {
--
2.43.0
next prev parent reply other threads:[~2025-05-13 3:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 3:07 [PATCH 0/5] [PULL REQUEST] Intel IOMMU updates for v6.16 Lu Baolu
2025-05-13 3:07 ` [PATCH 1/5] iommu/vt-d: Restore WO permissions on second-level paging entries Lu Baolu
2025-05-13 3:07 ` [PATCH 2/5] iommu/vt-d: Use ida to manage domain id Lu Baolu
2025-05-13 3:07 ` [PATCH 3/5] iommu/vt-d: Replace spin_lock with mutex to protect domain ida Lu Baolu
2025-05-13 3:07 ` Lu Baolu [this message]
2025-05-13 3:07 ` [PATCH 5/5] iommu/vt-d: Change dmar_ats_supported() to return boolean Lu Baolu
2025-05-16 6:49 ` [PATCH 0/5] [PULL REQUEST] Intel IOMMU updates for v6.16 Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250513030739.2718555-5-baolu.lu@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox