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 |
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;
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(-)