mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
qla2x00t-32gbit: Use dma_pool_zalloc()
Use dma_pool_zalloc() instead of dma_pool_alloc() and memset(). Link: https://lore.kernel.org/r/1615603275-14303-1-git-send-email-wangqing@vivo.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> [ commit 720efdd23f963612d0a8c7072293aff119c6f915 upstream ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -4286,11 +4286,10 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
|
||||
|
||||
/* Get consistent memory allocated for Special Features-CB. */
|
||||
if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
|
||||
ha->sf_init_cb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL,
|
||||
ha->sf_init_cb = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL,
|
||||
&ha->sf_init_cb_dma);
|
||||
if (!ha->sf_init_cb)
|
||||
goto fail_sf_init_cb;
|
||||
memset(ha->sf_init_cb, 0, sizeof(struct init_sf_cb));
|
||||
ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0199,
|
||||
"sf_init_cb=%p.\n", ha->sf_init_cb);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user