Re: [PATCH] net: marvell: prestera: use kzalloc_flex
From: Jakub Kicinski
Date: Thu Mar 19 2026 - 20:16:51 EST
On Wed, 18 Mar 2026 12:21:11 -0700 Rosen Penev wrote:
> Simplify allocation by using a flexible array member in this struct. No
> need to free separately.
>
> Add __counted_by to get extra runtime analysis. Move counting variable
> assignment to right after allocation as required by __counted_by.
Quoting documentation:
Clean-up patches
~~~~~~~~~~~~~~~~
Netdev discourages patches which perform simple clean-ups, which are not in
the context of other work.
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#clean-up-patches
--
pw-bot: reject