Skip to content

Commit 2167c40

Browse files
hkallweitbjorn-helgaas
authored andcommitted
PCI: Remove unused pci_lost_interrupt()
388c8c1 ("PCI: add routines for debugging and handling lost interrupts") added pci_lost_interrupt() that apparently never has had a single user. Remove it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 2575b2f commit 2167c40

File tree

2 files changed

+0
-57
lines changed

2 files changed

+0
-57
lines changed

drivers/pci/irq.c

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,61 +6,11 @@
66
* Copyright (C) 2017 Christoph Hellwig.
77
*/
88

9-
#include <linux/acpi.h>
109
#include <linux/device.h>
1110
#include <linux/kernel.h>
1211
#include <linux/export.h>
1312
#include <linux/pci.h>
1413

15-
static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason)
16-
{
17-
struct pci_dev *parent = to_pci_dev(pdev->dev.parent);
18-
19-
pci_err(pdev, "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n",
20-
dev_name(&parent->dev), parent->vendor, parent->device);
21-
pci_err(pdev, "%s\n", reason);
22-
pci_err(pdev, "Please report to [email protected]\n");
23-
WARN_ON(1);
24-
}
25-
26-
/**
27-
* pci_lost_interrupt - reports a lost PCI interrupt
28-
* @pdev: device whose interrupt is lost
29-
*
30-
* The primary function of this routine is to report a lost interrupt
31-
* in a standard way which users can recognise (instead of blaming the
32-
* driver).
33-
*
34-
* Returns:
35-
* a suggestion for fixing it (although the driver is not required to
36-
* act on this).
37-
*/
38-
enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *pdev)
39-
{
40-
if (pdev->msi_enabled || pdev->msix_enabled) {
41-
enum pci_lost_interrupt_reason ret;
42-
43-
if (pdev->msix_enabled) {
44-
pci_note_irq_problem(pdev, "MSIX routing failure");
45-
ret = PCI_LOST_IRQ_DISABLE_MSIX;
46-
} else {
47-
pci_note_irq_problem(pdev, "MSI routing failure");
48-
ret = PCI_LOST_IRQ_DISABLE_MSI;
49-
}
50-
return ret;
51-
}
52-
#ifdef CONFIG_ACPI
53-
if (!(acpi_disabled || acpi_noirq)) {
54-
pci_note_irq_problem(pdev, "Potential ACPI misrouting please reboot with acpi=noirq");
55-
/* currently no way to fix acpi on the fly */
56-
return PCI_LOST_IRQ_DISABLE_ACPI;
57-
}
58-
#endif
59-
pci_note_irq_problem(pdev, "unknown cause (not MSI or ACPI)");
60-
return PCI_LOST_IRQ_NO_INFORMATION;
61-
}
62-
EXPORT_SYMBOL(pci_lost_interrupt);
63-
6414
/**
6515
* pci_request_irq - allocate an interrupt line for a PCI device
6616
* @dev: PCI device to operate on

include/linux/pci.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,13 +1053,6 @@ void pci_sort_breadthfirst(void);
10531053

10541054
/* Generic PCI functions exported to card drivers */
10551055

1056-
enum pci_lost_interrupt_reason {
1057-
PCI_LOST_IRQ_NO_INFORMATION = 0,
1058-
PCI_LOST_IRQ_DISABLE_MSI,
1059-
PCI_LOST_IRQ_DISABLE_MSIX,
1060-
PCI_LOST_IRQ_DISABLE_ACPI,
1061-
};
1062-
enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev);
10631056
int pci_find_capability(struct pci_dev *dev, int cap);
10641057
int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
10651058
int pci_find_ext_capability(struct pci_dev *dev, int cap);

0 commit comments

Comments
 (0)