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

scsi: mvumi: 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 mannally. Use pci_dev_id() to simplify
the code a little bit.

Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
Link: https://lore.kernel.org/r/20230815025419.3523236-2-zhangjialin11@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Jialin Zhang and committed by
Martin K. Petersen
48e59021 517f8eb3

+1 -1
+1 -1
drivers/scsi/mvumi.c
··· 2490 2490 2491 2491 mhba->pdev = pdev; 2492 2492 mhba->shost = host; 2493 - mhba->unique_id = pdev->bus->number << 8 | pdev->devfn; 2493 + mhba->unique_id = pci_dev_id(pdev); 2494 2494 2495 2495 ret = mvumi_init_fw(mhba); 2496 2496 if (ret)