提交 15db12d5 编写于 作者: C chenxiang 提交者: Xie XiuQi

scsi: hisi_sas: remove redundant codes related to dmam_alloc_coherent()

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Since commit "518a2f19 dma-mapping: zero memory returned from dma_alloc_*",
the allocated memory are zeroed. So it is not necessary to zero them or
allocate them with flag __GFP_ZERO.
Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: NJohn Garry <john.garry@huawei.com>

Feature or Bugfix:Bugfix
Reviewed-by: NJohn Garry <john.garry@huawei.com>
Signed-off-by: Nchenxiang (M) <chenxiang66@hisilicon.com>
Reviewed-by: Ntanxiaofei <tanxiaofei@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 7ff9e14f
...@@ -2390,7 +2390,6 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba) ...@@ -2390,7 +2390,6 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba)
GFP_KERNEL); GFP_KERNEL);
if (!hisi_hba->itct) if (!hisi_hba->itct)
goto err_out; goto err_out;
memset(hisi_hba->itct, 0, s);
hisi_hba->slot_info = devm_kcalloc(dev, max_command_entries, hisi_hba->slot_info = devm_kcalloc(dev, max_command_entries,
sizeof(struct hisi_sas_slot), sizeof(struct hisi_sas_slot),
...@@ -2417,8 +2416,7 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba) ...@@ -2417,8 +2416,7 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba)
dma_addr_t buf_dma; dma_addr_t buf_dma;
int slot_index = i * slots_per_blk; int slot_index = i * slots_per_blk;
buf = dmam_alloc_coherent(dev, s, &buf_dma, GFP_KERNEL | buf = dmam_alloc_coherent(dev, s, &buf_dma, GFP_KERNEL);
__GFP_ZERO);
if (!buf) if (!buf)
goto err_out; goto err_out;
...@@ -2467,7 +2465,6 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba) ...@@ -2467,7 +2465,6 @@ int hisi_sas_alloc(struct hisi_hba *hisi_hba)
GFP_KERNEL); GFP_KERNEL);
if (!hisi_hba->sata_breakpoint) if (!hisi_hba->sata_breakpoint)
goto err_out; goto err_out;
hisi_sas_init_mem(hisi_hba);
hisi_sas_slot_index_init(hisi_hba); hisi_sas_slot_index_init(hisi_hba);
hisi_hba->last_slot_index = hisi_hba->hw->max_command_entries - hisi_hba->last_slot_index = hisi_hba->hw->max_command_entries -
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册