mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
scsi: lpfc: Use dma_zalloc_coherent
Replaced dma_alloc_coherent + memset with dma_zalloc_coherent. Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
9959376c1b
commit
359d0ac1e8
1 changed files with 1 additions and 2 deletions
|
@ -6229,7 +6229,7 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba,
|
|||
goto free_mem;
|
||||
}
|
||||
|
||||
dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev,
|
||||
dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev,
|
||||
LPFC_RAS_MAX_ENTRY_SIZE,
|
||||
&dmabuf->phys,
|
||||
GFP_KERNEL);
|
||||
|
@ -6240,7 +6240,6 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba,
|
|||
"6187 DMA Alloc Failed FW logging");
|
||||
goto free_mem;
|
||||
}
|
||||
memset(dmabuf->virt, 0, LPFC_RAS_MAX_ENTRY_SIZE);
|
||||
dmabuf->buffer_tag = i;
|
||||
list_add_tail(&dmabuf->list, &ras_fwlog->fwlog_buff_list);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue