aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
authorShuah Khan <shuah.khan@hp.com>2013-02-27 19:07:05 -0500
committerBjorn Helgaas <bhelgaas@google.com>2013-03-26 18:21:45 -0400
commitfff0ee3640d55c1df4e9da6084b20e2b3345abec (patch)
tree38af58c706c6339b1bcb1551c00d1ad982ee2120 /drivers/pci/pcie
parent85467136cdcc674f30beb0e5b79f048fe3a6a76f (diff)
PCI/AER: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI
Change to remove local PCI_BUS() define and use the new PCI_BUS_NUM() interface from PCI. Signed-off-by: Shuah Khan <shuah.khan@hp.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 564d97f94b6c..8ec8b4f48560 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -89,8 +89,6 @@ static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev)
89 return -ENOSPC; 89 return -ENOSPC;
90} 90}
91 91
92#define PCI_BUS(x) (((x) >> 8) & 0xff)
93
94/** 92/**
95 * is_error_source - check whether the device is source of reported error 93 * is_error_source - check whether the device is source of reported error
96 * @dev: pointer to pci_dev to be checked 94 * @dev: pointer to pci_dev to be checked
@@ -106,7 +104,7 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info)
106 * When bus id is equal to 0, it might be a bad id 104 * When bus id is equal to 0, it might be a bad id
107 * reported by root port. 105 * reported by root port.
108 */ 106 */
109 if (!nosourceid && (PCI_BUS(e_info->id) != 0)) { 107 if (!nosourceid && (PCI_BUS_NUM(e_info->id) != 0)) {
110 /* Device ID match? */ 108 /* Device ID match? */
111 if (e_info->id == ((dev->bus->number << 8) | dev->devfn)) 109 if (e_info->id == ((dev->bus->number << 8) | dev->devfn))
112 return true; 110 return true;