[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6fd8902-f644-41c5-9009-7901ddf6778a@suse.de>
Date: Tue, 25 Jun 2024 08:22:27 +0200
From: Hannes Reinecke <hare@...e.de>
To: Igor Pylypiv <ipylypiv@...gle.com>, Damien Le Moal <dlemoal@...nel.org>,
Niklas Cassel <cassel@...nel.org>
Cc: Tejun Heo <tj@...nel.org>, "Martin K. Petersen"
<martin.petersen@...cle.com>, Jason Yan <yanaijie@...wei.com>,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/6] ata: libata-scsi: Remove redundant sense_buffer
memsets
On 6/25/24 00:12, Igor Pylypiv wrote:
> SCSI layer clears sense_buffer in scsi_queue_rq() so there is no need for
> libata to clear it again.
>
> Signed-off-by: Igor Pylypiv <ipylypiv@...gle.com>
> ---
> drivers/ata/libata-scsi.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> index 26b1263f5c7c..1aeab6e1c8b3 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -929,8 +929,6 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
> 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.
> @@ -968,8 +966,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 */
Reviewed-by: Hannes Reinecke <hare@...e.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@...e.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Powered by blists - more mailing lists