diff mbox series

scsi: megaraid: Use PCI_DEVID() macro to simplify the code

Message ID 20240828103507.3680658-1-ruanjinjie@huawei.com (mailing list archive)
State Deferred
Headers show
Series scsi: megaraid: Use PCI_DEVID() macro to simplify the code | expand

Commit Message

Jinjie Ruan Aug. 28, 2024, 10:35 a.m. UTC
The macro PCI_DEVID() can be used instead of compose it manually.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index bc867da650b6..92107a125aa2 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -3730,7 +3730,7 @@  gather_hbainfo(adapter_t *adapter, mraid_hba_info_t *hinfo)
 	hinfo->irq		= adapter->host->irq;
 	hinfo->baseport		= ADAP2RAIDDEV(adapter)->baseport;
 
-	hinfo->unique_id	= (hinfo->pci_bus << 8) | adapter->pdev->devfn;
+	hinfo->unique_id	= PCI_DEVID(hinfo->pci_bus, adapter->pdev->devfn);
 	hinfo->host_no		= adapter->host->host_no;
 
 	return 0;