summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2018-03-08 14:11:57 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2018-03-13 02:16:58 +0100
commit8b1bb6dcba76b0fceffff77a25e990f30b10d139 (patch)
tree65184498ad36eab6d225720cef9e16f846900d58
parentscsi: lpfc: use __raw_writeX on DPP copies (diff)
downloadlinux-8b1bb6dcba76b0fceffff77a25e990f30b10d139.tar.xz
linux-8b1bb6dcba76b0fceffff77a25e990f30b10d139.zip
scsi: ipr: Use dma_pool_zalloc()
Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/ipr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 52735162444f..dda1a64ab89c 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -9651,14 +9651,14 @@ static int ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
}
for (i = 0; i < IPR_NUM_CMD_BLKS; i++) {
- ipr_cmd = dma_pool_alloc(ioa_cfg->ipr_cmd_pool, GFP_KERNEL, &dma_addr);
+ ipr_cmd = dma_pool_zalloc(ioa_cfg->ipr_cmd_pool,
+ GFP_KERNEL, &dma_addr);
if (!ipr_cmd) {
ipr_free_cmd_blks(ioa_cfg);
return -ENOMEM;
}
- memset(ipr_cmd, 0, sizeof(*ipr_cmd));
ioa_cfg->ipr_cmnd_list[i] = ipr_cmd;
ioa_cfg->ipr_cmnd_list_dma[i] = dma_addr;