Commit 3f6d903b authored by Igor Pylypiv's avatar Igor Pylypiv Committed by Niklas Cassel

ata: libata-scsi: Remove redundant sense_buffer memsets

SCSI layer clears sense_buffer in scsi_queue_rq() so there is no need for
libata to clear it again.
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarNiklas Cassel <cassel@kernel.org>
Signed-off-by: default avatarIgor Pylypiv <ipylypiv@google.com>
Link: https://lore.kernel.org/r/20240702024735.1152293-5-ipylypiv@google.comSigned-off-by: default avatarNiklas Cassel <cassel@kernel.org>
parent 28ab9769
...@@ -926,11 +926,8 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc) ...@@ -926,11 +926,8 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
{ {
struct scsi_cmnd *cmd = qc->scsicmd; struct scsi_cmnd *cmd = qc->scsicmd;
struct ata_taskfile *tf = &qc->result_tf; struct ata_taskfile *tf = &qc->result_tf;
unsigned char *sb = cmd->sense_buffer;
u8 sense_key, asc, ascq; u8 sense_key, asc, ascq;
memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
/* /*
* Use ata_to_sense_error() to map status register bits * Use ata_to_sense_error() to map status register bits
* onto sense key, asc & ascq. * onto sense key, asc & ascq.
...@@ -965,8 +962,6 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc) ...@@ -965,8 +962,6 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc)
u64 block; u64 block;
u8 sense_key, asc, ascq; u8 sense_key, asc, ascq;
memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
if (ata_dev_disabled(dev)) { if (ata_dev_disabled(dev)) {
/* Device disabled after error recovery */ /* Device disabled after error recovery */
/* LOGICAL UNIT NOT READY, HARD RESET REQUIRED */ /* LOGICAL UNIT NOT READY, HARD RESET REQUIRED */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment