Skip to content

Commit 5158ec2

Browse files
damien-lemoalfloatious
authored andcommitted
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 <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Niklas Cassel <cassel@kernel.org> Link: https://lore.kernel.org/r/20250711082158.220047-1-dlemoal@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org>
1 parent 48925ba commit 5158ec2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/ata/libata-eh.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,15 +2781,15 @@ static int ata_do_reset(struct ata_link *link, ata_reset_fn_t reset,
27812781
return reset(link, classes, deadline);
27822782
}
27832783

2784-
static int ata_eh_followup_srst_needed(struct ata_link *link, int rc)
2784+
static bool ata_eh_followup_srst_needed(struct ata_link *link, int rc)
27852785
{
27862786
if ((link->flags & ATA_LFLAG_NO_SRST) || ata_link_offline(link))
2787-
return 0;
2787+
return false;
27882788
if (rc == -EAGAIN)
2789-
return 1;
2789+
return true;
27902790
if (sata_pmp_supported(link->ap) && ata_is_host_link(link))
2791-
return 1;
2792-
return 0;
2791+
return true;
2792+
return false;
27932793
}
27942794

27952795
int ata_eh_reset(struct ata_link *link, int classify,

0 commit comments

Comments
 (0)