Skip to content

Commit 48e5902

Browse files
Jialin Zhangmartinkpetersen
authored andcommitted
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>
1 parent 517f8eb commit 48e5902

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/mvumi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,7 @@ static int mvumi_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
24902490

24912491
mhba->pdev = pdev;
24922492
mhba->shost = host;
2493-
mhba->unique_id = pdev->bus->number << 8 | pdev->devfn;
2493+
mhba->unique_id = pci_dev_id(pdev);
24942494

24952495
ret = mvumi_init_fw(mhba);
24962496
if (ret)

0 commit comments

Comments
 (0)