]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ata: libahci_platform: use flex array for platform PHYs
authorRosen Penev <rosenp@gmail.com>
Mon, 30 Mar 2026 20:37:37 +0000 (13:37 -0700)
committerNiklas Cassel <cassel@kernel.org>
Tue, 31 Mar 2026 08:29:35 +0000 (10:29 +0200)
commitd5d286154b6cc1729b5aa0bc579902e2dbe9be5c
tree028984915c668f5d8b1ddd8e43eb6920bcb14b21
parent78ec06991d2cd564ff45f280e0bb57b369be7587
ata: libahci_platform: use flex array for platform PHYs

Modify struct ahci_host_priv to use a flexible array member for an adapter
port PHYs and use struct_size to combine the allocation of this array
together with the adapter private data structure. __counted_by() annotation
is added for the phys field to support runtime analysis.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/ahci.h
drivers/ata/libahci_platform.c