On Tue, Mar 04, 2025 at 05:06:01PM +0000, Daniel Golle wrote: > Allow partition parsers to set the Device Tree node for a partition by > introducing of_put_partition() and extending struct parsed_partitions > accordingly. > > As the partition information is preallocated independently of the actual > number of partitions the additional pointer takes about 2 kiB of allocated > memory which is worth avoiding in case CONFIG_OF is not set. This is > achieved by only adding the corresponding field to the struct in case > CONFIG_OF is set using #ifdef'ery. > > Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx> I also think ifdef for OF is a necessity in this case to prevent the struct size to explode. Reviewed-by: Christian Marangi <ansuelsmth@xxxxxxxxx> -- Ansuel