Re: [PATCH 1/2] ata: use named initializers for acpi_device_id

Niklas Cassel <[email protected]> Mon, 3 Aug 2026 21:58:15 +0200
Newsgroups dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-ide
Message-ID <anDy13qZ6rr1tFqO@ryzen>
On Mon, Aug 03, 2026 at 03:14:16PM +0000, [email protected] wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Incomplete refactoring: ahci_seattle.c was missed when unifying acpi_device_id initialization.
> --
> 
> --- Patch [1]: [PATCH 1/2] ata: use named initializers for acpi_device_id ---
> commit f6b3d365ff5924969c9b77b57308411fcb82b7e1
> Author: Pawel Zalewski (The Capable Hub) <[email protected]>
> 
> ata: use named initializers for acpi_device_id
> 
> This commit updates acpi_device_id initializers in the ATA subsystem
> to use named fields. It also unifies the list terminators across these
> files to have a single space between the brackets.
> 
> > ata: use named initializers for acpi_device_id
> > 
> > Use a named initializer for the acpi_device_id fields which
> > makes the code more readable and consistent with how lists
> > are initialized in the rest of the kernel code base.
> > 
> > While we are at it - unify the list terminator to have
> > a single space between the brackets and no trailing
> > comma.
> 
> [Severity: Low]
> Was ahci_seattle.c missed during this refactoring? 
> 
> It appears drivers/ata/ahci_seattle.c still contains an old style
> initializer and a list terminator without a space:
> 
> drivers/ata/ahci_seattle.c:ahci_acpi_match() {
> static const struct acpi_device_id ahci_acpi_match[] = {
> 	{ "AMDI0600", 0 },
> 	{}


The series looks good to me.

I do kind of agree with Sashiko that ahci_seattle.c could have been fixed
in patch 1/2 (rather than fixing ahci_seattle.c in patch 2/2).

drivers/ata/ahci_seattle.c:ahci_acpi_match() {
static const struct acpi_device_id ahci_acpi_match[] = {
	{ "AMDI0600", 0 },
	{}

Having a .driver_data of 0 is redundant, regardless if the driver uses it
or not, since the struct is defined as static, and is thus guaranteed to
be zero-initialized.


Kind regards,
Niklas