From: Niklas Cassel <cassel@kernel.org>
To: Igor Pylypiv <ipylypiv@google.com>
Cc: Damien Le Moal <dlemoal@kernel.org>, Tejun Heo <tj@kernel.org>,
Hannes Reinecke <hare@suse.de>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 4/8] ata: libata-scsi: Remove redundant sense_buffer memsets
Date: Mon, 1 Jul 2024 23:12:43 +0200 [thread overview]
Message-ID: <ZoMby8bM3s-HGVsg@ryzen.lan> (raw)
In-Reply-To: <20240701195758.1045917-5-ipylypiv@google.com>
On Mon, Jul 01, 2024 at 07:57:54PM +0000, Igor Pylypiv wrote:
> 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>
> Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
> ---
> drivers/ata/libata-scsi.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> index ace6b009e7ff..c11ae77d3ca6 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 */
> --
> 2.45.2.803.g4e1b14247a-goog
>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
next prev parent reply other threads:[~2024-07-01 21:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 19:57 [PATCH v4 0/8] ATA PASS-THROUGH sense data fixes Igor Pylypiv
2024-07-01 19:57 ` [PATCH v4 1/8] ata: libata-scsi: Fix offsets for the fixed format sense data Igor Pylypiv
2024-07-01 21:09 ` Niklas Cassel
2024-07-01 19:57 ` [PATCH v4 2/8] ata: libata-scsi: Do not overwrite valid sense data when CK_COND=1 Igor Pylypiv
2024-07-01 21:15 ` Niklas Cassel
2024-07-01 19:57 ` [PATCH v4 3/8] ata: libata-scsi: Honour the D_SENSE bit for CK_COND=1 and no error Igor Pylypiv
2024-07-01 21:12 ` Niklas Cassel
2024-07-01 19:57 ` [PATCH v4 4/8] ata: libata-scsi: Remove redundant sense_buffer memsets Igor Pylypiv
2024-07-01 21:12 ` Niklas Cassel [this message]
2024-07-01 19:57 ` [PATCH v4 5/8] ata: libata-scsi: Do not pass ATA device id to ata_to_sense_error() Igor Pylypiv
2024-07-01 21:12 ` Niklas Cassel
2024-07-01 19:57 ` [PATCH v4 6/8] ata: libata-core: Set ATA_QCFLAG_RTF_FILLED in fill_result_tf() Igor Pylypiv
2024-07-01 21:13 ` Niklas Cassel
2024-07-01 19:57 ` [PATCH v4 7/8] ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf Igor Pylypiv
2024-07-01 21:13 ` Niklas Cassel
2024-07-01 19:57 ` [PATCH v4 8/8] ata: libata-scsi: Make ata_scsi_qc_complete() more readable Igor Pylypiv
2024-07-01 21:15 ` Niklas Cassel
2024-07-02 2:50 ` Igor Pylypiv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZoMby8bM3s-HGVsg@ryzen.lan \
--to=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hare@suse.de \
--cc=ipylypiv@google.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox