[PATCH 3/3] sandbox: work around missing of_add_memory_bank()
Lucas Stach
l.stach at pengutronix.de
Tue Jul 22 01:32:19 PDT 2014
Am Dienstag, den 22.07.2014, 09:57 +0200 schrieb Holger Schurig:
> From: Holger Schurig <holgerschurig at gmail.com>
>
> The goal of "make ARCH=sandbox allyesconfig && make all" is not to
> generate a sensible barebox that you'd use. The goal is to create
> as much code coverage as possible, so that you see compiler warnings
> are can send barebox throught a static checker.
>
> Therefore this simple band-aid to compile drivers/of/base.c wouldn't
> create a working device tree implementation, but it will compile.
>
> Signed-off-by: Holger Schurig <holgerschurig at gmail.com>
> ---
> drivers/of/base.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index c440a69..69d9b09 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -1713,8 +1713,10 @@ int of_add_memory(struct device_node *node, bool dump)
> continue;
> }
>
> +#ifndef CONFIG_SANDBOX
> of_add_memory_bank(node, dump, n,
> res.start, resource_size(&res));
> +#endif
> n++;
> }
>
I really dislike this patch. This adds ifdeffery (which everyone hates)
just for the sake of a static checker that depends on the build to be
run. There are a lot of static checkers out there which don't have this
requirement.
If you still want the build to include this stuff, fix it by adding a
working of_add_memory_bank() for sandbox, this would be both useful in a
general sense and fix your problem.
Regards,
Lucas
--
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the barebox
mailing list