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>
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++)
}
/* 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);