Thread (3 messages) 3 messages, 3 authors, 2026-03-20

Re: [PATCH] net: marvell: prestera: use kzalloc_flex

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-03-20 00:16:32
Also in: linux-hardening, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help