From: John Garry <john.g.garry@oracle.com>
To: Damien Le Moal <dlemoal@kernel.org>,
linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>,
linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH] ata: libata: Remove ata_noop_qc_prep()
Date: Thu, 1 Aug 2024 10:11:56 +0100 [thread overview]
Message-ID: <46ab2af0-fccc-4836-a246-b50a88025c19@oracle.com> (raw)
In-Reply-To: <20240801090151.1249985-1-dlemoal@kernel.org>
On 01/08/2024 10:01, Damien Le Moal wrote:
> The function ata_noop_qc_prep(), as its name implies, does nothing and
> simply returns AC_ERR_OK. For drivers that do not need any special
> preparations of queued commands, we can avoid having to define struct
> ata_port qc_prep operation by simply testing if that operation is
> defined or not in ata_qc_issue(). Make this change and remove
> ata_noop_qc_prep().
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
> ---
> drivers/ata/libata-core.c | 18 +++++++-----------
> drivers/ata/libata-sff.c | 1 -
> drivers/ata/pata_ep93xx.c | 2 --
> drivers/ata/pata_icside.c | 2 --
> drivers/ata/pata_mpc52xx.c | 1 -
> drivers/ata/pata_octeon_cf.c | 1 -
> drivers/scsi/libsas/sas_ata.c | 1 -
> include/linux/libata.h | 1 -
> 8 files changed, 7 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index fc9fcfda42b8..b4fdb78579c8 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -4696,12 +4696,6 @@ int ata_std_qc_defer(struct ata_queued_cmd *qc)
> }
> EXPORT_SYMBOL_GPL(ata_std_qc_defer);
>
> -enum ata_completion_errors ata_noop_qc_prep(struct ata_queued_cmd *qc)
> -{
> - return AC_ERR_OK;
> -}
> -EXPORT_SYMBOL_GPL(ata_noop_qc_prep);
> -
> /**
> * ata_sg_init - Associate command with scatter-gather table.
> * @qc: Command to be associated
> @@ -5088,10 +5082,13 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
> return;
> }
>
> - trace_ata_qc_prep(qc);
I assume qc->err_mask must be zero here.
> - qc->err_mask |= ap->ops->qc_prep(qc);
> - if (unlikely(qc->err_mask))
> - goto err;
> + if (ap->ops->qc_prep) {
> + trace_ata_qc_prep(qc);
next prev parent reply other threads:[~2024-08-01 9:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 9:01 [PATCH] ata: libata: Remove ata_noop_qc_prep() Damien Le Moal
2024-08-01 9:11 ` John Garry [this message]
2024-08-01 9:27 ` Damien Le Moal
2024-08-01 18:10 ` Sergei Shtylyov
2024-08-01 18:10 ` Sergey Shtylyov
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=46ab2af0-fccc-4836-a246-b50a88025c19@oracle.com \
--to=john.g.garry@oracle.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.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).