Skip to contentSkip to conversation

xen/pciback: Remove unused pcistub_get_pci_dev

PATCH In review [email protected] 2 participants 2 messages Mar 7, 2025 – Mar 14, 2025 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/pciback: Remove unused pcistub_get_pci_dev

From: "Dr. David Alan Gilbert" <[email protected]>

pcistub_get_pci_dev() was added in 2009 as part of:
commit 30edc14bf39a ("xen/pciback: xen pci backend driver.")

Remove it.

---
 drivers/xen/xen-pciback/pci_stub.c | 20 --------------------
 drivers/xen/xen-pciback/pciback.h  |  2 --
 2 files changed, 22 deletions(-)
drivers/xen/xen-pciback/pci_stub.c +0 -20
index b616b7768c3b..5c2f829d5b0b 100644
@@ -262,26 +262,6 @@ struct pci_dev *pcistub_get_pci_dev_by_slot(struct xen_pcibk_device *pdev,
 	return found_dev;
 }
 
-struct pci_dev *pcistub_get_pci_dev(struct xen_pcibk_device *pdev,
-				    struct pci_dev *dev)
-{
-	struct pcistub_device *psdev;
-	struct pci_dev *found_dev = NULL;
-	unsigned long flags;
-
-	spin_lock_irqsave(&pcistub_devices_lock, flags);
-
-	list_for_each_entry(psdev, &pcistub_devices, dev_list) {
-		if (psdev->dev == dev) {
-			found_dev = pcistub_device_get_pci_dev(pdev, psdev);
-			break;
-		}
-	}
-
-	spin_unlock_irqrestore(&pcistub_devices_lock, flags);
-	return found_dev;
-}
-
 /*
  * Called when:
  *  - XenBus state has been reconfigure (pci unplug). See xen_pcibk_remove_device
drivers/xen/xen-pciback/pciback.h +0 -2
index f9599ed2f2e2..b786c1f74f85 100644
@@ -67,8 +67,6 @@ extern struct list_head xen_pcibk_quirks;
 struct pci_dev *pcistub_get_pci_dev_by_slot(struct xen_pcibk_device *pdev,
 					    int domain, int bus,
 					    int slot, int func);
-struct pci_dev *pcistub_get_pci_dev(struct xen_pcibk_device *pdev,
-				    struct pci_dev *dev);
 void pcistub_put_pci_dev(struct pci_dev *dev);
 
 static inline bool xen_pcibk_pv_support(void)
Signature · 1 line
2.48.1