On 03/06/2018 02:52 PM, Souptick Joarder wrote: > Any comment for this patch. > > On Sat, Feb 17, 2018 at 9:56 PM, Souptick Joarder <jrdr.linux@xxxxxxxxx> wrote: >> Use dma_pool_zalloc() instead of dma_pool_alloc + memset >> >> Signed-off-by: Souptick Joarder <jrdr.linux@xxxxxxxxx> >> --- >> drivers/scsi/ipr.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c >> index e07dd99..97387be 100644 >> --- a/drivers/scsi/ipr.c >> +++ b/drivers/scsi/ipr.c >> @@ -9684,14 +9684,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; >> >> -- >> 1.9.1 >> > Thanks! Acked-by: Brian King <brking@xxxxxxxxxxxxxxxxxx> -- Brian King Power Linux I/O IBM Linux Technology Center