summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2026-07-13 13:16:53 +0900
committerDamien Le Moal <dlemoal@kernel.org>2026-07-13 14:08:12 +0900
commit39c00a4721db1480a9bf5e1d88c1957bf8750401 (patch)
treea675b635e25dee31b44f86109eab89dc1de4943e
parented9a8c6a2b3c89aeff5323fef196bb0c85c06423 (diff)
downloadlinux-next-39c00a4721db1480a9bf5e1d88c1957bf8750401.tar.gz
linux-next-39c00a4721db1480a9bf5e1d88c1957bf8750401.zip
ata: libata-eh: make ata_eh_qc_complete() and ata_eh_qc_retry() static
The functions ata_eh_qc_complete() and ata_eh_qc_retry() are used only in libata-eh.c. So remove the declaration of these functions from include/linux/libata.h and define them as static. While at it, add a missing blank line between variable declaration and code in these two functions. No functional changes intended. Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
-rw-r--r--drivers/ata/libata-eh.c6
-rw-r--r--include/linux/libata.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 05df7ea6954a..29ec0f7fef4a 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1230,9 +1230,10 @@ static void __ata_eh_qc_complete(struct ata_queued_cmd *qc)
* Indicate to the mid and upper layers that an ATA command has
* completed. To be used from EH.
*/
-void ata_eh_qc_complete(struct ata_queued_cmd *qc)
+static void ata_eh_qc_complete(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *scmd = qc->scsicmd;
+
scmd->retries = scmd->allowed;
__ata_eh_qc_complete(qc);
}
@@ -1248,9 +1249,10 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
* scmd->allowed is incremented for commands which get retried
* due to unrelated failures (qc->err_mask is zero).
*/
-void ata_eh_qc_retry(struct ata_queued_cmd *qc)
+static void ata_eh_qc_retry(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *scmd = qc->scsicmd;
+
if (!qc->err_mask)
scmd->allowed++;
__ata_eh_qc_complete(qc);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3703ef433bd4..18edb36c29fc 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1428,9 +1428,6 @@ extern int ata_port_freeze(struct ata_port *ap);
extern void ata_eh_freeze_port(struct ata_port *ap);
extern void ata_eh_thaw_port(struct ata_port *ap);
-extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
-extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
-
extern void ata_std_error_handler(struct ata_port *ap)
__must_hold(&ap->host->eh_mutex);
extern void ata_std_sched_eh(struct ata_port *ap);