Re: [PATCH] ata: libata-eh: drop redundant ata_tag_valid() check in ata_eh_maybe_retry_flush()
From: Niklas Cassel
Date: Mon Nov 02 2026 - 05:24:47 EST
On Tue, 20 Oct 2026 16:01:01 +0800, shao.mingyin@xxxxxxxxxx wrote:
> ata_eh_maybe_retry_flush() validates link->active_tag with ata_tag_valid()
> before calling __ata_qc_from_tag(), which itself evaluates ata_tag_valid()
> on the same tag and returns NULL when the tag is invalid.
>
> Since the NULL return value of __ata_qc_from_tag() is the single source of
> truth for tag validity, drop the redundant explicit ata_tag_valid() check
> and simply return early when qc is NULL. This mirrors the style already
> used in ata_eh_get_non_ncq_success_sense().
>
> [...]
Applied to libata/linux.git (for-7.5), thanks!
[1/1] ata: libata-eh: drop redundant ata_tag_valid() check in ata_eh_maybe_retry_flush()
https://git.kernel.org/libata/linux/c/267accfa
Kind regards,
Niklas