Skip to contentSkip to conversation

Clean up libfdt.h includes

PATCH New Jerry Van Baren 3 participants 3 messages Feb 8, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Clean up libfdt.h includes

The libfdt.h file is the definition file for libfdt. It is unnecessary to include other fdt header files (the necessary ones are pulled in by libfdt.h).

---

This comes from discussion on the Device Tree email list that <libfdt.h> is *the* user interface definition.

FWIIW, I proposed removing the redundant #includes in the libfdt source too, but it hasn't been accepted by David Gibson yet. He is open to the concept but I have not pushed it forward to the point where he says "yes" or "no". I have the patch, but am holding it for when dtc/libfdt accepts it (or not).

Best regards,
gvb

 arch/nios2/cpu/fdt.c                         |    1 -
 arch/powerpc/cpu/mpc5xxx/cpu.c               |    1 -
 arch/powerpc/cpu/mpc8260/cpu.c               |    1 -
 arch/powerpc/cpu/mpc8xx/cpu.c                |    1 -
 arch/powerpc/cpu/ppc4xx/fdt.c                |    1 -
 arch/powerpc/lib/bootm.c                     |    1 -
 arch/x86/include/asm/arch-coreboot/sysinfo.h |    3 +--
 board/cm5200/cm5200.c                        |    1 -
 include/fdt_support.h                        |    3 +--
 9 files changed, 2 insertions(+), 11 deletions(-)
arch/nios2/cpu/fdt.c +0 -1
index b1ed9e1..f238665 100644
@@ -30,7 +30,6 @@
 
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 #include <libfdt.h>
-#include <libfdt_env.h>
 #include <fdt_support.h>
 
 DECLARE_GLOBAL_DATA_PTR;
arch/powerpc/cpu/mpc5xxx/cpu.c +0 -1
index 0c1eebd..dc021e3 100644
@@ -36,7 +36,6 @@
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
-#include <libfdt_env.h>
 #include <fdt_support.h>
 #endif
 
arch/powerpc/cpu/mpc8260/cpu.c +0 -1
index 220c1e2..f8bc5a9 100644
@@ -50,7 +50,6 @@
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
-#include <libfdt_env.h>
 #include <fdt_support.h>
 #endif
 
arch/powerpc/cpu/mpc8xx/cpu.c +0 -1
index b3fcfe5..b6b733d 100644
@@ -45,7 +45,6 @@
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
-#include <libfdt_env.h>
 #include <fdt_support.h>
 #endif
 
arch/powerpc/cpu/ppc4xx/fdt.c +0 -1
index 5ddb880..a94e82c 100644
@@ -29,7 +29,6 @@
 
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 #include <libfdt.h>
-#include <libfdt_env.h>
 #include <fdt_support.h>
 #include <asm/4xx_pcie.h>
 
arch/powerpc/lib/bootm.c +0 -1
index 33d013f..0119a7b 100644
@@ -38,7 +38,6 @@
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
 #include <fdt_support.h>
-
 #endif
 
 #ifdef CONFIG_SYS_INIT_RAM_LOCK
(quoted diff) +0 -0

b/arch/x86/include/asm/arch-coreboot/sysinfo.h
index bd88eb5..78d3a9d 100644

arch/x86/include/asm/arch-coreboot/sysinfo.h +1 -2
@@ -32,8 +32,7 @@
 
 #include <common.h>
 #include <compiler.h>
-#include <libfdt_env.h>
-#include <fdt.h>
+#include <libfdt.h>
 #include <asm/arch/tables.h>
 
 /* Allow a maximum of 16 memory range definitions. */
board/cm5200/cm5200.c +0 -1
index b25887b..c0ea1c6 100644
@@ -44,7 +44,6 @@
 
 #ifdef CONFIG_OF_LIBFDT
 #include <libfdt.h>
-#include <libfdt_env.h>
 #include <fdt_support.h>
 #endif /* CONFIG_OF_LIBFDT */
 
include/fdt_support.h +1 -2
index 568bcbf..2cccc35 100644
@@ -26,8 +26,7 @@
 
 #ifdef CONFIG_OF_LIBFDT
 
-#include <libfdt_env.h>
-#include <fdt.h>
+#include <libfdt.h>
 
 u32 fdt_getprop_u32_default(const void *fdt, const char *path,
 				const char *prop, const u32 dflt);
Signature · 1 line
1.7.9.5