Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocxl: 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: Zheng Zengkai <zhengzengkai@huawei.com>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230811102039.17257-1-zhengzengkai@huawei.com

authored by

Zheng Zengkai and committed by
Michael Ellerman
075a88d5 cd50430c

+1 -1
+1 -1
arch/powerpc/platforms/powernv/ocxl.c
··· 449 449 if (!data) 450 450 return -ENOMEM; 451 451 452 - bdfn = (dev->bus->number << 8) | dev->devfn; 452 + bdfn = pci_dev_id(dev); 453 453 rc = opal_npu_spa_setup(phb->opal_id, bdfn, virt_to_phys(spa_mem), 454 454 PE_mask); 455 455 if (rc) {