Re: [PATCHv2] clk: kirkwood: use kzalloc_flex

From: Gustavo A. R. Silva

Date: Tue Mar 31 2026 - 11:40:46 EST




On 3/31/26 08:05, Brian Masney wrote:
On Mon, Mar 30, 2026 at 01:55:04PM -0700, Rosen Penev wrote:
Simplify allocation by using a flexible array member and kzalloc_flex to
combine allocations.

Add __counted_by for extra runtime analysis. Move counting variable
assignment to right after allocation as required by __counted_by.

This is misinformation and should be phrased differently[1]

-Gustavo

[1] https://lore.kernel.org/linux-hardening/37378f49-437f-438b-ad6c-d60480feb306@xxxxxxxxxxxxxx/


Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
v2: remove unused goto.

Reviewed-by: Brian Masney <bmasney@xxxxxxxxxx>

For the future, if someone asks for changes in a previous version, then
be sure to CC them on the next revision.