mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Holger Schurig <holgerschurig@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/3] sandbox: work around missing of_add_memory_bank()
Date: Tue, 22 Jul 2014 10:32:19 +0200	[thread overview]
Message-ID: <1406017939.4667.14.camel@weser.hi.pengutronix.de> (raw)
In-Reply-To: <1406015842-20754-4-git-send-email-holgerschurig@gmail.de>

Am Dienstag, den 22.07.2014, 09:57 +0200 schrieb Holger Schurig:
> From: Holger Schurig <holgerschurig@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@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/  |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-07-22  8:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22  7:57 Holger Schurig
2014-07-22  8:32 ` Lucas Stach [this message]
2014-07-22  8:39   ` Holger Schurig
2014-07-22  8:50     ` Lucas Stach
2014-07-22  8:59       ` Holger Schurig
2014-07-22  9:09         ` Holger Schurig
2014-07-22  9:43           ` Lucas Stach
2014-07-22 10:25             ` Holger Schurig
2014-07-22 10:52               ` Lucas Stach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406017939.4667.14.camel@weser.hi.pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=holgerschurig@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox