public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: qla2xxx: Remove unnecessary call to memset
@ 2020-08-20 18:51 Alex Dewar
  2020-08-20 23:49 ` [PATCH v2] scsi: Don't call memset after dma_alloc_coherent() Alex Dewar
  2020-08-24 21:42 ` [PATCH] scsi: qla2xxx: Remove unnecessary call to memset Alex Dewar
  0 siblings, 2 replies; 9+ messages in thread
From: Alex Dewar @ 2020-08-20 18:51 UTC (permalink / raw)
  To: Nilesh Javali, GR-QLogic-Storage-Upstream, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, linux-kernel
  Cc: Alex Dewar

In qla25xx_set_els_cmds_supported(), a call is made to
dma_alloc_coherent() followed by zeroing the memory with memset. This is
unnecessary as dma_alloc_coherent() already zeros memory. Remove.

Issue identified with Coccinelle.

Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
---
 drivers/scsi/qla2xxx/qla_mbx.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 226f1428d3e5..e00f604bbf7a 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -4925,8 +4925,6 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha)
 		return QLA_MEMORY_ALLOC_FAILED;
 	}
 
-	memset(els_cmd_map, 0, ELS_CMD_MAP_SIZE);
-
 	/* List of Purex ELS */
 	cmd_opcode[0] = ELS_FPIN;
 	cmd_opcode[1] = ELS_RDP;
-- 
2.28.0


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

end of thread, other threads:[~2020-09-03  1:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-20 18:51 [PATCH] scsi: qla2xxx: Remove unnecessary call to memset Alex Dewar
2020-08-20 23:49 ` [PATCH v2] scsi: Don't call memset after dma_alloc_coherent() Alex Dewar
2020-08-24 21:52   ` Alex Dewar
2020-09-02  1:22   ` Martin K. Petersen
2020-09-02 15:51     ` Alex Dewar
2020-09-02 16:03     ` Alex Dewar
2020-09-03  1:20       ` Martin K. Petersen
2020-08-24 21:42 ` [PATCH] scsi: qla2xxx: Remove unnecessary call to memset Alex Dewar
2020-08-26 16:34   ` Arun Easi

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