diff options
author | Jialin Zhang <zhangjialin11@huawei.com> | 2023-08-15 05:33:03 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-08-25 01:39:30 +0300 |
commit | 664ec38673bef18bbcc4ede02274c8977470823f (patch) | |
tree | ae1f267d87e12a14c11cfaa6bf62d7ff00fed235 /arch/powerpc/platforms | |
parent | 50832720ec54c39ab189cd5e057aec1c514978ce (diff) | |
download | linux-664ec38673bef18bbcc4ede02274c8977470823f.tar.xz |
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: Jialin Zhang <zhangjialin11@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230815023303.3515503-1-zhangjialin11@huawei.com
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powernv/eeh-powernv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c index a83cb679dd59..af3a5d37a149 100644 --- a/arch/powerpc/platforms/powernv/eeh-powernv.c +++ b/arch/powerpc/platforms/powernv/eeh-powernv.c @@ -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 pnv_phb *phb = hose->private_data; struct device_node *dn = pci_device_to_OF_node(pdev); - uint64_t id = PCI_SLOT_ID(phb->opal_id, - (pdev->bus->number << 8) | pdev->devfn); + uint64_t id = PCI_SLOT_ID(phb->opal_id, pci_dev_id(pdev)); uint8_t scope; int64_t rc; |