[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <6296722174e39a51cac74b7fc68b0d75bd0db2a3.1725690433.git.christophe.jaillet@wanadoo.fr>
Date: Sat, 7 Sep 2024 08:27:22 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-scsi@...r.kernel.org
Subject: [PATCH] scsi: scsi_debug: Remove a useless memset()
'arr' is kzalloc()'ed, so there is no need to call memset(.., 0, ...) on
it. It is already cleared.
This is a follow up of commit b952eb270df3 ("scsi: scsi_debug: Allocate the
MODE SENSE response from the heap").
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
drivers/scsi/scsi_debug.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index a9d8a9c62663..d95f417e24c0 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -2760,7 +2760,6 @@ static int resp_mode_sense(struct scsi_cmnd *scp,
else
bd_len = 0;
alloc_len = msense_6 ? cmd[4] : get_unaligned_be16(cmd + 7);
- memset(arr, 0, SDEBUG_MAX_MSENSE_SZ);
if (0x3 == pcontrol) { /* Saving values not supported */
mk_sense_buffer(scp, ILLEGAL_REQUEST, SAVING_PARAMS_UNSUP, 0);
return check_condition_result;
--
2.46.0
Powered by blists - more mailing lists