diff mbox series

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

Message ID 1507890530-12934-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Delegated to: Tom Rini
Headers show
Series [U-Boot] simple-bus: remove DECLARE_GLOBAL_DATA_PTR and <common.h> | expand

Commit Message

Masahiro Yamada Oct. 13, 2017, 10:28 a.m. UTC
Both are unneeded in this file.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/core/simple-bus.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Tom Rini Oct. 16, 2017, 5:45 p.m. UTC | #1
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@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.
diff mbox series

Patch

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;