Re: [PATCH] clk: visconti: pll: use kzalloc_flex

From: Brian Masney

Date: Mon Mar 30 2026 - 09:15:59 EST


On Wed, Mar 25, 2026 at 09:23:17PM -0700, Rosen Penev wrote:
> Simplify allocation by using a flexible array member and kzalloc_flex.
>
> Add __counted_by for extra runtime analysis. Assign after allocation as
> required by __counted_by.
>
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>

Reviewed-by: Brian Masney <bmasney@xxxxxxxxxx>

Note: Sashiko reported a separate issue related to the struct clk_init_data
not fully initialized to zero, and parent_data and parent_hws fields are
left containing stack garbage.

https://sashiko.dev/#/patchset/20260326042317.122536-1-rosenp%40gmail.com

I'll post a fix for this.

Brian