Clean up libfdt.h includes
Subsystems (3)
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 1/1 Clean up libfdt.h includes
Quoted 5 lines · Jerry Van Baren
The
libfdt.hfile is the definition file for libfdt. It is unnecessary to include other fdt header files (the necessary ones are pulled in bylibfdt.h).Signed-off-by Gerald Van Baren <[email protected]>
PATCH 1/1 Clean up libfdt.h includes
In reply to Jerry Van BarenQuoted 5 lines · Jerry Van Baren
The
libfdt.hfile is the definition file for libfdt. It is unnecessary to include other fdt header files (the necessary ones are pulled in bylibfdt.h).Signed-off-by Gerald Van Baren <[email protected]>
Thanks,
Stefan