Commit fff0ee36 authored by Shuah Khan's avatar Shuah Khan Committed by Bjorn Helgaas

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: default avatarShuah Khan <shuah.khan@hp.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarJoerg Roedel <joro@8bytes.org>
parent 85467136
...@@ -89,8 +89,6 @@ static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev) ...@@ -89,8 +89,6 @@ static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev)
return -ENOSPC; return -ENOSPC;
} }
#define PCI_BUS(x) (((x) >> 8) & 0xff)
/** /**
* is_error_source - check whether the device is source of reported error * is_error_source - check whether the device is source of reported error
* @dev: pointer to pci_dev to be checked * @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,7 +104,7 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info)
* When bus id is equal to 0, it might be a bad id * When bus id is equal to 0, it might be a bad id
* reported by root port. * reported by root port.
*/ */
if (!nosourceid && (PCI_BUS(e_info->id) != 0)) { if (!nosourceid && (PCI_BUS_NUM(e_info->id) != 0)) {
/* Device ID match? */ /* Device ID match? */
if (e_info->id == ((dev->bus->number << 8) | dev->devfn)) if (e_info->id == ((dev->bus->number << 8) | dev->devfn))
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment