Re: [PATCH] of: reserved-mem: Warn for missing initfn in __reservedmem_of_table

From: Rob Herring
Date: Tue Apr 15 2025 - 10:52:26 EST


On Tue, Apr 15, 2025 at 9:16 AM Liya Huang <1425075683@xxxxxx> wrote:
>
> For the data in __reservedmem_of_table, its function pointer initfn might
> be NULL. However, __reserved_mem_init_node() only considers non-NULL cases
> and ignores NULL function pointers.

If initfn is NULL, there's no point to the entry and that's a bug.
Unless you have a build time check, there's no point to add this.

Rob