Commit 664ec386 authored by Jialin Zhang's avatar Jialin Zhang Committed by Michael Ellerman

powerpc/eeh: Use pci_dev_id() to simplify the code

PCI core API pci_dev_id() can be used to get the BDF number for a pci
device. We don't need to compose it mannually. Use pci_dev_id() to
simplify the code a little bit.
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230815023303.3515503-1-zhangjialin11@huawei.com
parent 50832720
...@@ -855,8 +855,7 @@ static int pnv_eeh_bridge_reset(struct pci_dev *pdev, int option) ...@@ -855,8 +855,7 @@ static int pnv_eeh_bridge_reset(struct pci_dev *pdev, int option)
struct pci_controller *hose = pci_bus_to_host(pdev->bus); struct pci_controller *hose = pci_bus_to_host(pdev->bus);
struct pnv_phb *phb = hose->private_data; struct pnv_phb *phb = hose->private_data;
struct device_node *dn = pci_device_to_OF_node(pdev); struct device_node *dn = pci_device_to_OF_node(pdev);
uint64_t id = PCI_SLOT_ID(phb->opal_id, uint64_t id = PCI_SLOT_ID(phb->opal_id, pci_dev_id(pdev));
(pdev->bus->number << 8) | pdev->devfn);
uint8_t scope; uint8_t scope;
int64_t rc; int64_t rc;
......
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