aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorXiang Chen <chenxiang66@hisilicon.com>2018-03-24 00:05:11 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-18 19:32:51 -0400
commit4f4e21b8ff3e706f79e1adb2a475c3f5ee6b57f9 (patch)
tree85447541a56e684f9ec8b36574e44e8e5354b3bb /drivers/scsi
parentscsi: hisi_sas: delete timer when removing hisi_sas driver (diff)
downloadlinux-dev-4f4e21b8ff3e706f79e1adb2a475c3f5ee6b57f9.tar.xz
linux-dev-4f4e21b8ff3e706f79e1adb2a475c3f5ee6b57f9.zip
scsi: hisi_sas: use dma_zalloc_coherent()
This is a warning coming from Coccinelle, and need to use new interface dma_zalloc_coherent() instead of dma_alloc_coherent()/memset(). Signed-off-by: Xiang Chen <chenxiang66@hisilicon.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')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index a21679574142..9563dfa72181 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1822,13 +1822,11 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba, struct Scsi_Host *shost)
goto err_out;
s = HISI_SAS_MAX_ITCT_ENTRIES * sizeof(struct hisi_sas_itct);
- hisi_hba->itct = dma_alloc_coherent(dev, s, &hisi_hba->itct_dma,
+ hisi_hba->itct = dma_zalloc_coherent(dev, s, &hisi_hba->itct_dma,
GFP_KERNEL);
if (!hisi_hba->itct)
goto err_out;
- memset(hisi_hba->itct, 0, s);
-
hisi_hba->slot_info = devm_kcalloc(dev, max_command_entries,
sizeof(struct hisi_sas_slot),
GFP_KERNEL);