ata: libata-eh: Make ata_eh_followup_srst_needed() return a bool
Damien Le Moal
maintainerPATCH v3 1/1 ata: libata-eh: Make ata_eh_followup_srst_needed() return a bool
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 <[email protected]>
Reviewed-by Hannes Reinecke <[email protected]>
Reviewed-by Niklas Cassel <[email protected]>
---
Changes from v2:
- Added review tags
- Extracted it from the patch series "libata-eh cleanups"
drivers/ata/libata-eh.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/ata/libata-eh.c +5 -5
@@ -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,
Signature · 1 line
2.50.1
Quoted 6 lines · Damien Le Moal
ata_eh_followup_srst_needed()returns an integer used as a boolean. So change this function to return that type.No functional changes.
Applied to libata/linux.git (for-6.17), thanks!
[1/1] ata: libata-eh: Make ata_eh_followup_srst_needed() return a bool
https://git.kernel.org/libata/linux/c/5158ec25
Kind regards,
Niklas