* [PATCH] scsi: megaraid: Remove redundant memset before memcpy
@ 2017-01-13 10:28 Shyam Saini
0 siblings, 0 replies; only message in thread
From: Shyam Saini @ 2017-01-13 10:28 UTC (permalink / raw)
To: kashyap.desai
Cc: sumit.saxena, shivasharan.srikanteshwara, jejb, martin.petersen,
linux-scsi, Shyam Saini
The region set by the call to memset, immediately overwritten by the
subsequent call to memcpy and thus makes the memset redundant
Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
---
drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 24778ba..32102f6 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -1406,8 +1406,6 @@ map_cmd_status(struct megasas_cmd_fusion *cmd, u8 status, u8 ext_status)
cmd->scmd->result = (DID_OK << 16) | ext_status;
if (ext_status == SAM_STAT_CHECK_CONDITION) {
- memset(cmd->scmd->sense_buffer, 0,
- SCSI_SENSE_BUFFERSIZE);
memcpy(cmd->scmd->sense_buffer, cmd->sense,
SCSI_SENSE_BUFFERSIZE);
cmd->scmd->result |= DRIVER_SENSE << 24;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-13 10:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 10:28 [PATCH] scsi: megaraid: Remove redundant memset before memcpy Shyam Saini
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.