Hi Tom, On Fri, 19 Dec 2025 at 13:21, Tom Rini <[email protected]> wrote: > > The devm alloc functions that we have may follow the Linux kernel model > where allocations are (almost always) automatically free()'d. However, > quite often we don't enable, in full U-Boot, the corresponding automatic > free. This in turn leads to memory leaks. Rather than manually tracking > allocations and implementing frees, rework things so that we follow > expectations now and enable the DEVRES functionality to manage frees. > > This turns DEVRES from a prompted symbol to a symbol that must be > select'd, and we now remove our non-managed alloc/free functions from > outside of xPL builds. >
Most of the time boards don't enable DM_DEVICE_REMOVE to save code size. We certainly don't unbind devices. A memory leak implies some sort of problem, but if we are booting the OS, all the memory is 'freed' by that process. What problem are you solving here? It is missing from your commit. Regards, Simon

