diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2010-04-15 00:13:41 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-05-11 15:01:15 -0400 |
commit | bd17d4742d5a8cbedd41a1d44c0cdee84a532363 (patch) | |
tree | 5df159b4dbd4ce1eaae5799ecc227e8e368c359e /drivers/pci/pcie/aer | |
parent | c887275e6a5b857b72c798e4a6019160a860e2ef (diff) |
PCI: aerdrv: remove compare_device_id
Inline too-simple subroutine only used here.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie/aer')
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 18 |
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 | } |
100 | EXPORT_SYMBOL_GPL(pci_cleanup_aer_uncorrect_error_status); | 100 | EXPORT_SYMBOL_GPL(pci_cleanup_aer_uncorrect_error_status); |
101 | 101 | ||
102 | static 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 | |||
115 | static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev) | 102 | static 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 */ |