Skip to content

Commit 359d0ac

Browse files
Sabyasachi Guptamartinkpetersen
authored andcommitted
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>
1 parent 9959376 commit 359d0ac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6229,7 +6229,7 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba,
62296229
goto free_mem;
62306230
}
62316231

6232-
dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev,
6232+
dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev,
62336233
LPFC_RAS_MAX_ENTRY_SIZE,
62346234
&dmabuf->phys,
62356235
GFP_KERNEL);
@@ -6240,7 +6240,6 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba,
62406240
"6187 DMA Alloc Failed FW logging");
62416241
goto free_mem;
62426242
}
6243-
memset(dmabuf->virt, 0, LPFC_RAS_MAX_ENTRY_SIZE);
62446243
dmabuf->buffer_tag = i;
62456244
list_add_tail(&dmabuf->list, &ras_fwlog->fwlog_buff_list);
62466245
}

0 commit comments

Comments
 (0)