From: Damien Le Moal <dlemoal@kernel.org>
To: linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Subject: [PATCH v2 1/3] ata: libata-eh: Make ata_eh_followup_srst_needed() return a bool
Date: Tue, 8 Jul 2025 16:36:46 +0900 [thread overview]
Message-ID: <20250708073648.45171-2-dlemoal@kernel.org> (raw)
In-Reply-To: <20250708073648.45171-1-dlemoal@kernel.org>
ata_eh_followup_srst_needed() returns an integer used as a boolean. So
change this function to return that type.
No functional changes.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
drivers/ata/libata-eh.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 42aafb1ddb5a..436536112043 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2781,15 +2781,15 @@ static int ata_do_reset(struct ata_link *link, ata_reset_fn_t reset,
return reset(link, classes, deadline);
}
-static int ata_eh_followup_srst_needed(struct ata_link *link, int rc)
+static bool ata_eh_followup_srst_needed(struct ata_link *link, int rc)
{
if ((link->flags & ATA_LFLAG_NO_SRST) || ata_link_offline(link))
- return 0;
+ return false;
if (rc == -EAGAIN)
- return 1;
+ return true;
if (sata_pmp_supported(link->ap) && ata_is_host_link(link))
- return 1;
- return 0;
+ return true;
+ return false;
}
int ata_eh_reset(struct ata_link *link, int classify,
--
2.50.0
next prev parent reply other threads:[~2025-07-08 7:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 7:36 [PATCH v2 0/3] libata-eh cleanups Damien Le Moal
2025-07-08 7:36 ` Damien Le Moal [this message]
2025-07-08 7:50 ` [PATCH v2 1/3] ata: libata-eh: Make ata_eh_followup_srst_needed() return a bool Hannes Reinecke
2025-07-08 12:02 ` Niklas Cassel
2025-07-08 7:36 ` [PATCH v2 2/3] ata: libata-eh: Remove ata_do_eh() Damien Le Moal
2025-07-08 7:51 ` Hannes Reinecke
2025-07-08 12:34 ` Niklas Cassel
2025-07-08 12:38 ` Niklas Cassel
2025-07-08 12:46 ` Niklas Cassel
2025-07-08 7:36 ` [PATCH v2 3/3] Documentation: driver-api: Update libata error handler information Damien Le Moal
2025-07-08 7:52 ` Hannes Reinecke
2025-07-08 12:02 ` Niklas Cassel
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=20250708073648.45171-2-dlemoal@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=linux-ide@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.