diff options
author | Joe Perches <joe@perches.com> | 2014-09-03 12:56:12 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-16 09:10:06 -0700 |
commit | 1aee383d5912de15af3045a63a07e98f760f041c (patch) | |
tree | 6e58b144d1354008d497e3cd0003e9cb6e69e090 /drivers/scsi/lpfc/lpfc_bsg.c | |
parent | 9ab9b134a86ed9f897a29d2ba5abb93f7b162dca (diff) |
lpfc: use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,)
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: James Smart <james.smart@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_bsg.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_bsg.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 371474bec5a5..d236448b05b9 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -2693,14 +2693,13 @@ lpfc_bsg_dma_page_alloc(struct lpfc_hba *phba) INIT_LIST_HEAD(&dmabuf->list); /* now, allocate dma buffer */ - dmabuf->virt = dma_alloc_coherent(&pcidev->dev, BSG_MBOX_SIZE, - &(dmabuf->phys), GFP_KERNEL); + dmabuf->virt = dma_zalloc_coherent(&pcidev->dev, BSG_MBOX_SIZE, + &(dmabuf->phys), GFP_KERNEL); if (!dmabuf->virt) { kfree(dmabuf); return NULL; } - memset((uint8_t *)dmabuf->virt, 0, BSG_MBOX_SIZE); return dmabuf; } |