Hello,

Am Wed, Mar 04, 2026 at 02:15:29PM -0800 schrieb Rosen Penev:
> Also add __counted_by attribute for extra runtime analysis.
…
> diff --git a/drivers/mtd/mtd_virt_concat.c b/drivers/mtd/mtd_virt_concat.c
> index aea88d1c9bc5..89e223edac6a 100644
> --- a/drivers/mtd/mtd_virt_concat.c
> +++ b/drivers/mtd/mtd_virt_concat.c
> @@ -31,8 +31,8 @@ static LIST_HEAD(concat_node_list);
>  struct mtd_virt_concat_node {
>       struct list_head head;
>       unsigned int count;
> -     struct device_node **nodes;
>       struct mtd_concat *concat;
> +     struct device_node *nodes[] __counted_by(nodes);

Looks wrong. Your follow-up patch does that:
-       struct device_node *nodes[] __counted_by(nodes);
+       struct device_node *nodes[] __counted_by(count);

Philipp

Reply via email to