Re: [PATCH 0/3] ata: remove dead checks and redundant code

From: Niklas Cassel

Date: Mon Nov 09 2026 - 15:31:08 EST


On Wed, 04 Nov 2026 21:14:32 +0800, shao.mingyin@xxxxxxxxxx wrote:
> This series removes two checks that the surrounding code already
> guarantees and folds five duplicated cleanup paths in
> zpodd_get_mech_type() into one. It was found while reading libata.
> There is no functional change intended; every patch is independent and
> can be applied on its own or as any subset.
>
> Patch 1 drops a test that is constant-false at compile time.
> SATA_PMP_GSCR_DWORDS is 128, so "SATA_PMP_GSCR_DWORDS & 3" is zero and
> the loop already terminates every fourth dword with a newline.
>
> [...]

Applied to libata/linux.git (for-7.5), thanks!

[1/3] ata: libata-transport: drop the dead GSCR newline check
https://git.kernel.org/libata/linux/c/f6e285e1
[2/3] ata: libahci_platform: drop the dead error check
https://git.kernel.org/libata/linux/c/54bd1984
[3/3] ata: libata-zpodd: use a single exit in zpodd_get_mech_type()
https://git.kernel.org/libata/linux/c/3a533a66

Kind regards,
Niklas