public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: vmw_pvscsi: No need to clear memory after a dma_alloc_coherent() call
@ 2022-03-23 20:32 Christophe JAILLET
  2022-04-07  3:02 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-03-23 20:32 UTC (permalink / raw)
  To: Vishal Bhakta, VMware PV-Drivers Reviewers, James E.J. Bottomley,
	Martin K. Petersen
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-scsi

dma_alloc_coherent() already clear the allocated memory, there is no need
to explicitly call memset().

Since 'config_page' and 'header' are the same, a memset() call can be
avoided.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/scsi/vmw_pvscsi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index 1f037b8ab904..f88ecdb93a8a 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -1324,7 +1324,6 @@ static u32 pvscsi_get_max_targets(struct pvscsi_adapter *adapter)
 	 * indicate success.
 	 */
 	header = config_page;
-	memset(header, 0, sizeof *header);
 	header->hostStatus = BTSTAT_INVPARAM;
 	header->scsiStatus = SDSTAT_CHECK;
 
-- 
2.32.0


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

end of thread, other threads:[~2022-04-07  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23 20:32 [PATCH] scsi: vmw_pvscsi: No need to clear memory after a dma_alloc_coherent() call Christophe JAILLET
2022-04-07  3:02 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox