From: John Garry <john.g.garry@oracle.com>
To: Damien Le Moal <dlemoal@kernel.org>,
linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH v2 2/5] scsi: libsas: Simplify sas_ata_wait_eh()
Date: Wed, 23 Jul 2025 12:04:42 +0100 [thread overview]
Message-ID: <45f2e6c5-495c-47b9-9fb3-bf7fa8ebd652@oracle.com> (raw)
In-Reply-To: <20250723085143.134333-3-dlemoal@kernel.org>
On 23/07/2025 09:51, Damien Le Moal wrote:
> Simplify the code of sas_ata_wait_eh(), removing the local variable ap
> for the pointer to the device ata_port structure.
>
> No functional changes.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---> drivers/scsi/libsas/sas_ata.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
> index 7b4e7a61965a..440efdc714f7 100644
> --- a/drivers/scsi/libsas/sas_ata.c
> +++ b/drivers/scsi/libsas/sas_ata.c
> @@ -927,13 +927,8 @@ EXPORT_SYMBOL_GPL(sas_ata_schedule_reset);
>
> void sas_ata_wait_eh(struct domain_device *dev)
> {
> - struct ata_port *ap;
> -
> - if (!dev_is_sata(dev))
> - return;
> -
> - ap = dev->sata_dev.ap;
> - ata_port_wait_eh(ap);
> + if (dev_is_sata(dev))
note that all callsites seem to check whether the dev is sata, so I
wonder why even have that check?
other sas_ata.c function have the same pattern.
> + ata_port_wait_eh(dev->sata_dev.ap);
> }
>
> void sas_ata_device_link_abort(struct domain_device *device, bool force_reset)
next prev parent reply other threads:[~2025-07-23 11:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 8:51 [PATCH v2 0/5] libsas cleanups Damien Le Moal
2025-07-23 8:51 ` [PATCH v2 1/5] scsi: libsas: Refactor dev_is_sata() Damien Le Moal
2025-07-23 10:57 ` John Garry
2025-07-23 8:51 ` [PATCH v2 2/5] scsi: libsas: Simplify sas_ata_wait_eh() Damien Le Moal
2025-07-23 11:04 ` John Garry [this message]
2025-07-23 8:51 ` [PATCH v2 3/5] scsi: libsas: Make sas_get_ata_info() static Damien Le Moal
2025-07-23 8:51 ` [PATCH v2 4/5] scsi: libsas: Move declarations of internal functions to sas_internal.h Damien Le Moal
2025-07-23 8:51 ` [PATCH v2 5/5] scsi: libsas: Use a bool for sas_deform_port() second argument Damien Le Moal
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=45f2e6c5-495c-47b9-9fb3-bf7fa8ebd652@oracle.com \
--to=john.g.garry@oracle.com \
--cc=dlemoal@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).