summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIgor Pylypiv <ipylypiv@google.com>2024-07-02 02:47:32 +0000
committerNiklas Cassel <cassel@kernel.org>2024-07-03 10:51:41 +0200
commit3f6d903b54a137e9e438d9c3b774b5d0432917bc (patch)
tree84378238a8544e56e2d286c08e8159a0777e5956 /drivers
parent28ab9769117ca944cb6eb537af5599aa436287a4 (diff)
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: Hannes Reinecke <hare@suse.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Igor Pylypiv <ipylypiv@google.com> Link: https://lore.kernel.org/r/20240702024735.1152293-5-ipylypiv@google.com Signed-off-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-scsi.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index fdc2a3b59fc1..01ba659d5f1b 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -926,11 +926,8 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *cmd = qc->scsicmd;
struct ata_taskfile *tf = &qc->result_tf;
- unsigned char *sb = cmd->sense_buffer;
u8 sense_key, asc, ascq;
- memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
-
/*
* Use ata_to_sense_error() to map status register bits
* onto sense key, asc & ascq.
@@ -965,8 +962,6 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc)
u64 block;
u8 sense_key, asc, ascq;
- memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
-
if (ata_dev_disabled(dev)) {
/* Device disabled after error recovery */
/* LOGICAL UNIT NOT READY, HARD RESET REQUIRED */