aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 5b02f62cdc47..f8ffa47503b7 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -99,19 +99,6 @@ int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
99} 99}
100EXPORT_SYMBOL_GPL(pci_cleanup_aer_uncorrect_error_status); 100EXPORT_SYMBOL_GPL(pci_cleanup_aer_uncorrect_error_status);
101 101
102static inline int compare_device_id(struct pci_dev *dev,
103 struct aer_err_info *e_info)
104{
105 if (e_info->id == ((dev->bus->number << 8) | dev->devfn)) {
106 /*
107 * Device ID match
108 */
109 return 1;
110 }
111
112 return 0;
113}
114
115static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev) 102static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev)
116{ 103{
117 if (e_info->error_dev_num < AER_MAX_MULTI_ERR_DEVICES) { 104 if (e_info->error_dev_num < AER_MAX_MULTI_ERR_DEVICES) {
@@ -136,15 +123,14 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info)
136 int pos; 123 int pos;
137 u32 status, mask; 124 u32 status, mask;
138 u16 reg16; 125 u16 reg16;
139 int result;
140 126
141 /* 127 /*
142 * When bus id is equal to 0, it might be a bad id 128 * When bus id is equal to 0, it might be a bad id
143 * reported by root port. 129 * reported by root port.
144 */ 130 */
145 if (!nosourceid && (PCI_BUS(e_info->id) != 0)) { 131 if (!nosourceid && (PCI_BUS(e_info->id) != 0)) {
146 result = compare_device_id(dev, e_info); 132 /* Device ID match? */
147 if (result) 133 if (e_info->id == ((dev->bus->number << 8) | dev->devfn))
148 return true; 134 return true;
149 135
150 /* Continue id comparing if there is no multiple error */ 136 /* Continue id comparing if there is no multiple error */