Re: [PATCH] EDAC: sb_edac: use kzalloc_flex

From: Rosen Penev

Date: Wed Mar 11 2026 - 20:04:19 EST


On Wed, Mar 11, 2026 at 4:39 PM Luck, Tony <tony.luck@xxxxxxxxx> wrote:
>
> + sbridge_dev->n_devs = table->n_devs_per_imc;
>
> Do you need this? I thought that kzalloc_flex() filled in the __counted_by field of the structure for you.
kzalloc_flex is just a macro over kzalloc(struct_size()). It does not
do automatic __counted_by, which makes no sense.
> -Tony