diff options
author | Jialin Zhang <zhangjialin11@huawei.com> | 2023-08-15 04:54:17 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-08-21 22:47:44 +0200 |
commit | 48e590218d1b2f472a3667e454bbe07ecaecb3f4 (patch) | |
tree | 94eb764d7db8a76cc25e63eada9dfe6a0eaba045 /drivers/scsi/mvumi.c | |
parent | scsi: ufs: host: Convert to dev_err_probe() in ufshcd_pltfrm_init() (diff) | |
download | linux-48e590218d1b2f472a3667e454bbe07ecaecb3f4.tar.xz linux-48e590218d1b2f472a3667e454bbe07ecaecb3f4.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/scsi/mvumi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 73aa7059b556..97f9d2fa6429 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c @@ -2490,7 +2490,7 @@ static int mvumi_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) mhba->pdev = pdev; mhba->shost = host; - mhba->unique_id = pdev->bus->number << 8 | pdev->devfn; + mhba->unique_id = pci_dev_id(pdev); ret = mvumi_init_fw(mhba); if (ret) |