summaryrefslogtreecommitdiff
path: root/drivers/scsi/hisi_sas
diff options
context:
space:
mode:
authorLuo Jiaxing <luojiaxing@huawei.com>2019-01-25 22:22:36 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-01-29 01:41:20 -0500
commitd1548e9c323f51e6d7da4392ec4368cfc5425a78 (patch)
treeda3bae9a882ed28faa1742ec45c31d2faa560071 /drivers/scsi/hisi_sas
parentb6c9b15e44090aee2a7fba646b06ff166f595b16 (diff)
scsi: hisi_sas: Correct memory allocation size for DQ debugfs
Some sizes we allocate for debugfs structure are incorrect, so fix them. Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 98ea029e5a35..6841a594fd5d 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -2498,7 +2498,7 @@ static void hisi_sas_debugfs_snapshot_cq_reg(struct hisi_hba *hisi_hba)
static void hisi_sas_debugfs_snapshot_dq_reg(struct hisi_hba *hisi_hba)
{
- int queue_entry_size = hisi_hba->hw->complete_hdr_size;
+ int queue_entry_size = sizeof(struct hisi_sas_cmd_hdr);
int i;
for (i = 0; i < hisi_hba->queue_count; i++)
@@ -2941,7 +2941,7 @@ void hisi_sas_debugfs_init(struct hisi_hba *hisi_hba)
}
/* Alloc buffer for dq */
- sz = hisi_hba->hw->complete_hdr_size * HISI_SAS_QUEUE_SLOTS;
+ sz = sizeof(struct hisi_sas_cmd_hdr) * HISI_SAS_QUEUE_SLOTS;
for (d = 0; d < hisi_hba->queue_count; d++) {
hisi_hba->debugfs_cmd_hdr[d] =
devm_kmalloc(dev, sz, GFP_KERNEL);