On Tue, Oct 28, 2025 at 04:41:03AM +0100, Marek Vasut wrote: >Allocate all sub-driver instance data at once. The amount of data that >have to be allocated is known up front, so is the size of the data, so >there is no need to call malloc() in a loop, mallocate all data at once. > >The upside is, less heap fragmentation and fewer malloc() calls overall, >and a faster boot time. > >The downside is, if some of the clock fail to register, then the clock >driver cannot free parts of the bulk allocated sub-driver instance data. >Such a failure can only occur if clk_register() were to fail, and if that >happens, the system has more significant problems. Worse, if a core clock >driver fails to probe, the system has even bigger problem. > >Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Peng Fan <[email protected]>

