diff mbox

[U-Boot,v2] Kill unneeded #include <linux/kconfig.h>

Message ID 1437132628-22244-1-git-send-email-yamada.masahiro@socionext.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada July 17, 2015, 11:30 a.m. UTC
Because the top-level Makefile forces all the source files
to include include/linux/kconfig.h (see the UBOOTINCLUDE define),
these includes are redundant.

By the way, there are exceptions for the statement above; host
programs.  In fact, host tools in U-Boot depend on a particular
board configuration, although I think they should not.  So, some
files still include <linux/config.h> to work around build errors
on host tools.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
---

Changes in v2:
  - Fix a typo in git description
      include/linux/kconfig -> include/linux/kconfig.h
  - Add Ian's Acked-by

 arch/arm/cpu/armv7/sunxi/dram_sun8i_a23.c | 1 -
 arch/arm/cpu/armv7/sunxi/dram_sun8i_a33.c | 1 -
 arch/x86/cpu/ivybridge/gma.c              | 1 -
 board/sunxi/dram_sun4i_auto.c             | 1 -
 board/sunxi/dram_sun5i_auto.c             | 1 -
 5 files changed, 5 deletions(-)

Comments

Simon Glass July 18, 2015, 2:37 p.m. UTC | #1
On 17 July 2015 at 05:30, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Because the top-level Makefile forces all the source files
> to include include/linux/kconfig.h (see the UBOOTINCLUDE define),
> these includes are redundant.
>
> By the way, there are exceptions for the statement above; host
> programs.  In fact, host tools in U-Boot depend on a particular
> board configuration, although I think they should not.  So, some
> files still include <linux/config.h> to work around build errors
> on host tools.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
> ---
>
> Changes in v2:
>   - Fix a typo in git description
>       include/linux/kconfig -> include/linux/kconfig.h
>   - Add Ian's Acked-by
>
>  arch/arm/cpu/armv7/sunxi/dram_sun8i_a23.c | 1 -
>  arch/arm/cpu/armv7/sunxi/dram_sun8i_a33.c | 1 -
>  arch/x86/cpu/ivybridge/gma.c              | 1 -
>  board/sunxi/dram_sun4i_auto.c             | 1 -
>  board/sunxi/dram_sun5i_auto.c             | 1 -
>  5 files changed, 5 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>
Tom Rini July 28, 2015, 2:59 p.m. UTC | #2
On Fri, Jul 17, 2015 at 08:30:28PM +0900, Masahiro Yamada wrote:

> Because the top-level Makefile forces all the source files
> to include include/linux/kconfig.h (see the UBOOTINCLUDE define),
> these includes are redundant.
> 
> By the way, there are exceptions for the statement above; host
> programs.  In fact, host tools in U-Boot depend on a particular
> board configuration, although I think they should not.  So, some
> files still include <linux/config.h> to work around build errors
> on host tools.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/sunxi/dram_sun8i_a23.c b/arch/arm/cpu/armv7/sunxi/dram_sun8i_a23.c
index 165c052..c53671a 100644
--- a/arch/arm/cpu/armv7/sunxi/dram_sun8i_a23.c
+++ b/arch/arm/cpu/armv7/sunxi/dram_sun8i_a23.c
@@ -26,7 +26,6 @@ 
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
-#include <linux/kconfig.h>
 
 static const struct dram_para dram_para = {
 	.clock = CONFIG_DRAM_CLK,
diff --git a/arch/arm/cpu/armv7/sunxi/dram_sun8i_a33.c b/arch/arm/cpu/armv7/sunxi/dram_sun8i_a33.c
index ebba438..fa1620c 100644
--- a/arch/arm/cpu/armv7/sunxi/dram_sun8i_a33.c
+++ b/arch/arm/cpu/armv7/sunxi/dram_sun8i_a33.c
@@ -14,7 +14,6 @@ 
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
-#include <linux/kconfig.h>
 
 /* PLL runs at 2x dram-clk, controller runs at PLL / 4 (dram-clk / 2) */
 #define DRAM_CLK_MUL 2
diff --git a/arch/x86/cpu/ivybridge/gma.c b/arch/x86/cpu/ivybridge/gma.c
index ea169b0..89d4a5e 100644
--- a/arch/x86/cpu/ivybridge/gma.c
+++ b/arch/x86/cpu/ivybridge/gma.c
@@ -16,7 +16,6 @@ 
 #include <asm/pci.h>
 #include <asm/arch/pch.h>
 #include <asm/arch/sandybridge.h>
-#include <linux/kconfig.h>
 
 struct gt_powermeter {
 	u16 reg;
diff --git a/board/sunxi/dram_sun4i_auto.c b/board/sunxi/dram_sun4i_auto.c
index 149bb51..7d4409b 100644
--- a/board/sunxi/dram_sun4i_auto.c
+++ b/board/sunxi/dram_sun4i_auto.c
@@ -1,6 +1,5 @@ 
 #include <common.h>
 #include <asm/arch/dram.h>
-#include <linux/kconfig.h>
 
 static struct dram_para dram_para = {
 	.clock = CONFIG_DRAM_CLK,
diff --git a/board/sunxi/dram_sun5i_auto.c b/board/sunxi/dram_sun5i_auto.c
index 596a206..e3fa243 100644
--- a/board/sunxi/dram_sun5i_auto.c
+++ b/board/sunxi/dram_sun5i_auto.c
@@ -2,7 +2,6 @@ 
 
 #include <common.h>
 #include <asm/arch/dram.h>
-#include <linux/kconfig.h>
 
 static struct dram_para dram_para = {
 	.clock = CONFIG_DRAM_CLK,