Hello Walter,

Thanks for the patch.

On Tue, 5 Nov 2019 at 12:27, Walter Lozano <walter.loz...@collabora.com> wrote:
>
> The support of libfdt should only be needed when OF_CONTROL
> is enabled and OF_PLATDATA is not, as in other cases there is no
> DT file to query.
>
> This patch fixes this dependency allowing to save some space.
>

Can you add some more information about the space saving?
The ./scripts/bloat-o-meter will help you get some info
on static footprint.

> Signed-off-by: Walter Lozano <walter.loz...@collabora.com>
> ---
>  drivers/core/ofnode.c | 132 +++++++++++++++++++++++++++++++++++++--
>  include/dm/read.h     | 141 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 267 insertions(+), 6 deletions(-)
>

You should try to avoid adding #ifdefery to the code. Normally,
the way to ifdef code is by having this in a header:

#ifdef CONFIG_FOO
int foo_feature_optional(struct foo *priv);
#else
static inline int foo_feature_optional(struct foo *priv)
{
        return 0;
}
#endif

The user of foo_feature_optional shouldn't be bothered with
FOO being enabled or not. Pushing ifdefs away from .c to .h
is a common pattern, well described in a classic old article:

http://www.literateprogramming.com/ifdefs.pdf

Do you think you can try to rework the patch to reduce its impact
as much as possible?

Thanks,
Ezequiel
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to