diff options
author | Joe Perches <joe@perches.com> | 2014-06-15 16:37:44 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-25 17:16:54 -0400 |
commit | 7626d9f36cdeab32bd12ea783aa8ee9fea0a41a2 (patch) | |
tree | d6aa2d2cc4099183688a563ea3a05bc08e53c4b8 | |
parent | 1f3d2d9edc832bdd5507130446abf1c8d2923ac5 (diff) |
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>
-rw-r--r-- | drivers/scsi/bfa/bfad_bsg.c | 6 |
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, | |||
3270 | /* Allocate dma coherent memory */ | 3270 | /* Allocate dma coherent memory */ |
3271 | buf_info = buf_base; | 3271 | buf_info = buf_base; |
3272 | buf_info->size = payload_len; | 3272 | buf_info->size = payload_len; |
3273 | buf_info->virt = dma_alloc_coherent(&bfad->pcidev->dev, buf_info->size, | 3273 | buf_info->virt = dma_zalloc_coherent(&bfad->pcidev->dev, |
3274 | &buf_info->phys, GFP_KERNEL); | 3274 | buf_info->size, &buf_info->phys, |
3275 | GFP_KERNEL); | ||
3275 | if (!buf_info->virt) | 3276 | if (!buf_info->virt) |
3276 | goto out_free_mem; | 3277 | goto out_free_mem; |
3277 | 3278 | ||
3278 | /* copy the linear bsg buffer to buf_info */ | 3279 | /* copy the linear bsg buffer to buf_info */ |
3279 | memset(buf_info->virt, 0, buf_info->size); | ||
3280 | memcpy(buf_info->virt, payload_kbuf, buf_info->size); | 3280 | memcpy(buf_info->virt, payload_kbuf, buf_info->size); |
3281 | 3281 | ||
3282 | /* | 3282 | /* |