Skip to content

Commit 3f6d903

Browse files
ipylypivfloatious
authored andcommitted
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 <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Niklas Cassel <[email protected]> Signed-off-by: Igor Pylypiv <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Cassel <[email protected]>
1 parent 28ab976 commit 3f6d903

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/ata/libata-scsi.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -926,11 +926,8 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
926926
{
927927
struct scsi_cmnd *cmd = qc->scsicmd;
928928
struct ata_taskfile *tf = &qc->result_tf;
929-
unsigned char *sb = cmd->sense_buffer;
930929
u8 sense_key, asc, ascq;
931930

932-
memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
933-
934931
/*
935932
* Use ata_to_sense_error() to map status register bits
936933
* onto sense key, asc & ascq.
@@ -965,8 +962,6 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc)
965962
u64 block;
966963
u8 sense_key, asc, ascq;
967964

968-
memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
969-
970965
if (ata_dev_disabled(dev)) {
971966
/* Device disabled after error recovery */
972967
/* LOGICAL UNIT NOT READY, HARD RESET REQUIRED */

0 commit comments

Comments
 (0)