Re: [PATCH] scsi: qla2xxx: Remove unnecessary call to memset

From: Alex Dewar
Date: Mon Aug 24 2020 - 17:42:55 EST


On 2020-08-20 19:51, Alex Dewar wrote:
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@xxxxxxxxx>
Gentle ping?
---
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;