[U-Boot] [PATCH 2/3] fdtdec: only create phandle if caller wants it in fdtdec_add_reserved_memory()

Simon Glass
2019-10-22T00:16:59Z

Hi Heiko,

On Mon, 7 Oct 2019 at 18:22, Heiko Stuebner <heiko@sntech.de> wrote:
>
> The phandlep pointer returning the phandle to the caller is optional
> and if it is not set when calling fdtdec_add_reserved_memory() it is
> highly likely that the caller is not interested in a phandle to the
> created reserved-memory area and really just wants that area added.
>
> So just don't create a phandle in that case.

Update function comment?

>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
> lib/fdtdec.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)

Regards,
Simon