summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-06-16 00:37:44 +0400
committerChristoph Hellwig <hch@lst.de>2014-07-26 01:16:54 +0400
commit7626d9f36cdeab32bd12ea783aa8ee9fea0a41a2 (patch)
treed6aa2d2cc4099183688a563ea3a05bc08e53c4b8 /drivers
parent1f3d2d9edc832bdd5507130446abf1c8d2923ac5 (diff)
downloadlinux-7626d9f36cdeab32bd12ea783aa8ee9fea0a41a2.tar.xz
bfa: Use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/bfa/bfad_bsg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 8994fb857ee9..65f3e74819fc 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -3270,13 +3270,13 @@ bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf,
/* Allocate dma coherent memory */
buf_info = buf_base;
buf_info->size = payload_len;
- buf_info->virt = dma_alloc_coherent(&bfad->pcidev->dev, buf_info->size,
- &buf_info->phys, GFP_KERNEL);
+ buf_info->virt = dma_zalloc_coherent(&bfad->pcidev->dev,
+ buf_info->size, &buf_info->phys,
+ GFP_KERNEL);
if (!buf_info->virt)
goto out_free_mem;
/* copy the linear bsg buffer to buf_info */
- memset(buf_info->virt, 0, buf_info->size);
memcpy(buf_info->virt, payload_kbuf, buf_info->size);
/*