[U-Boot] simple-bus: remove DECLARE_GLOBAL_DATA_PTR and <common.h>

Tom Rini trini at konsulko.com
Mon Oct 16 17:45:25 UTC 2017


On Fri, Oct 13, 2017 at 07:28:50PM +0900, Masahiro Yamada wrote:

> Both are unneeded in this file.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
> 
>  drivers/core/simple-bus.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
> index 14803e3..cc48c8b 100644
> --- a/drivers/core/simple-bus.c
> +++ b/drivers/core/simple-bus.c
> @@ -4,11 +4,8 @@
>   * SPDX-License-Identifier:	GPL-2.0+
>   */
>  
> -#include <common.h>
>  #include <dm.h>
>  
> -DECLARE_GLOBAL_DATA_PTR;
> -
>  struct simple_bus_plat {
>  	u32 base;
>  	u32 size;

This, in and of itself, is OK.  It however exposes a problem on x86,
that is also potentially found on most other arches.  Namely that
arch/{arm,m68k,mips,nds32,x86}/include/asm/global_data.h reference
CONFIG_foo but do not have an #include of config.h directly.  On other
platforms that compiled this file, something else drags in config.h and
it's OK, but on x86 it's a fatal error.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171016/a13b050c/attachment.sig>


More information about the U-Boot mailing list