Re: [PATCHv2] ata: libahci_platform: use flex array for platform PHYs

From: Damien Le Moal

Date: Sun Mar 29 2026 - 17:23:17 EST


On 3/29/26 04:10, Rosen Penev wrote:
> Use a flexible array member with struct_size to combine the allocations.

This is a little light... What about something like:

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.

With that:

Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>

--
Damien Le Moal
Western Digital Research