[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200820185149.932178-1-alex.dewar90@gmail.com>
Date: Thu, 20 Aug 2020 19:51:49 +0100
From: Alex Dewar <alex.dewar90@...il.com>
To: Nilesh Javali <njavali@...vell.com>,
GR-QLogic-Storage-Upstream@...vell.com,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Alex Dewar <alex.dewar90@...il.com>
Subject: [PATCH] scsi: qla2xxx: Remove unnecessary call to memset
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@...il.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
Powered by blists - more mailing lists