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

Simon Glass sjg at chromium.org
Wed Oct 30 01:48:22 UTC 2019


On Tue, 22 Oct 2019 at 13:04, Heiko Stuebner <heiko at sntech.de> wrote:
>
> From: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>
>
> 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.
>
> Signed-off-by: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>
> ---
> changes in v2:
> - update function comment
>
>  include/fdtdec.h |  2 +-
>  lib/fdtdec.c     | 16 +++++++++-------
>  2 files changed, 10 insertions(+), 8 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list