All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: mvsas: Replace pci_pool_alloc by pci_pool_zalloc
@ 2016-11-28 11:26 Souptick Joarder
  2016-12-01  6:04 ` Souptick Joarder
  2016-12-06 13:28 ` Johannes Thumshirn
  0 siblings, 2 replies; 9+ messages in thread
From: Souptick Joarder @ 2016-11-28 11:26 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: sahu.rameshwar73, linux-scsi

Inside mvs_task_prep(), pci_pool_alloc() followed by memset will be
replaced by pci_pool_zalloc()

Signed-off-by: Souptick joarder <jrdr.linux@gmail.com>
---
 drivers/scsi/mvsas/mv_sas.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 86eb199..681e5f7 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -790,10 +790,9 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
 	slot->n_elem = n_elem;
 	slot->slot_tag = tag;
 
-	slot->buf = pci_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
+	slot->buf = pci_pool_zalloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
 	if (!slot->buf)
 		goto err_out_tag;
-	memset(slot->buf, 0, MVS_SLOT_BUF_SZ);
 
 	tei.task = task;
 	tei.hdr = &mvi->slot[tag];
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-15  5:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28 11:26 [PATCH] scsi: mvsas: Replace pci_pool_alloc by pci_pool_zalloc Souptick Joarder
2016-12-01  6:04 ` Souptick Joarder
2016-12-05  6:26   ` Souptick Joarder
2016-12-05 22:04     ` Martin K. Petersen
2016-12-06 13:23       ` Souptick Joarder
2016-12-06 13:28 ` Johannes Thumshirn
2016-12-12  4:44   ` Souptick Joarder
2016-12-14  1:52     ` Martin K. Petersen
2016-12-15  5:09       ` Souptick Joarder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.