[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240828103507.3680658-1-ruanjinjie@huawei.com>
Date: Wed, 28 Aug 2024 18:35:07 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: <kashyap.desai@...adcom.com>, <sumit.saxena@...adcom.com>,
<shivasharan.srikanteshwara@...adcom.com>, <chandrakanth.patil@...adcom.com>,
<James.Bottomley@...senPartnership.com>, <martin.petersen@...cle.com>,
<megaraidlinux.pdl@...adcom.com>, <linux-scsi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH] scsi: megaraid: Use PCI_DEVID() macro to simplify the code
The macro PCI_DEVID() can be used instead of compose it manually.
Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
---
drivers/scsi/megaraid/megaraid_mbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.34.1
Powered by blists - more mailing lists