diff options
author | Sabyasachi Gupta <sabyasachi.linux@gmail.com> | 2018-11-18 15:38:48 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-11-22 04:31:22 +0100 |
commit | 359d0ac1e806caa6c233e32d33c8970aa94f6cb7 (patch) | |
tree | 467bd52e9f317e5eb3d01c852920142a6d1011e6 | |
parent | scsi: bnx2i: remove set but not used variable 'cid_num' (diff) | |
download | linux-359d0ac1e806caa6c233e32d33c8970aa94f6cb7.tar.xz linux-359d0ac1e806caa6c233e32d33c8970aa94f6cb7.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 0e97f6405ddd..3912a2d0b95d 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -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); } |