From 97043ac98e13a726dbf8b3b41654dca759e3da2c Mon Sep 17 00:00:00 2001 From: Dan Handley Date: Wed, 9 Apr 2014 13:14:54 +0100 Subject: Reduce deep nesting of header files Reduce the number of header files included from other header files as much as possible without splitting the files. Use forward declarations where possible. This allows removal of some unnecessary "#ifndef __ASSEMBLY__" statements. Also, review the .c and .S files for which header files really need including and reorder the #include statements alphabetically. Fixes ARM-software/tf-issues#31 Change-Id: Iec92fb976334c77453e010b60bcf56f3be72bd3e --- lib/aarch64/cache_helpers.S | 2 +- lib/aarch64/misc_helpers.S | 3 +-- lib/aarch64/sysreg_helpers.S | 2 +- lib/aarch64/tlb_helpers.S | 1 - lib/aarch64/xlat_helpers.c | 3 +-- lib/io_storage.c | 5 ++--- lib/locks/bakery/bakery_lock.c | 5 ++--- lib/semihosting/semihosting.c | 3 +-- 8 files changed, 9 insertions(+), 15 deletions(-) (limited to 'lib') diff --git a/lib/aarch64/cache_helpers.S b/lib/aarch64/cache_helpers.S index 2696d901..2649ad0e 100644 --- a/lib/aarch64/cache_helpers.S +++ b/lib/aarch64/cache_helpers.S @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include .globl dcisw diff --git a/lib/aarch64/misc_helpers.S b/lib/aarch64/misc_helpers.S index e3b4ab58..e7b23313 100644 --- a/lib/aarch64/misc_helpers.S +++ b/lib/aarch64/misc_helpers.S @@ -28,8 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include +#include #include .globl enable_irq diff --git a/lib/aarch64/sysreg_helpers.S b/lib/aarch64/sysreg_helpers.S index 8e816f03..61468f95 100644 --- a/lib/aarch64/sysreg_helpers.S +++ b/lib/aarch64/sysreg_helpers.S @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include .globl read_vbar_el1 diff --git a/lib/aarch64/tlb_helpers.S b/lib/aarch64/tlb_helpers.S index 42449747..ec1558b0 100644 --- a/lib/aarch64/tlb_helpers.S +++ b/lib/aarch64/tlb_helpers.S @@ -28,7 +28,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include #include .globl tlbialle1 diff --git a/lib/aarch64/xlat_helpers.c b/lib/aarch64/xlat_helpers.c index 87d24ec9..d401ffc4 100644 --- a/lib/aarch64/xlat_helpers.c +++ b/lib/aarch64/xlat_helpers.c @@ -28,9 +28,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include #include +#include /******************************************************************************* * Helper to create a level 1/2 table descriptor which points to a level 2/3 diff --git a/lib/io_storage.c b/lib/io_storage.c index c3b94bb0..01ca1c68 100644 --- a/lib/io_storage.c +++ b/lib/io_storage.c @@ -28,11 +28,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ - -#include #include -#include #include +#include +#include #define MAX_DEVICES(plat_data) \ diff --git a/lib/locks/bakery/bakery_lock.c b/lib/locks/bakery/bakery_lock.c index 3cb9248e..6d4ab87b 100644 --- a/lib/locks/bakery/bakery_lock.c +++ b/lib/locks/bakery/bakery_lock.c @@ -28,11 +28,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include #include -#include - #include -#include +#include /* * Functions in this file implement Bakery Algorithm for mutual exclusion. diff --git a/lib/semihosting/semihosting.c b/lib/semihosting/semihosting.c index 3232cd54..1bce377c 100644 --- a/lib/semihosting/semihosting.c +++ b/lib/semihosting/semihosting.c @@ -29,10 +29,9 @@ */ #include -#include #include -#include #include +#include #ifndef SEMIHOSTING_SUPPORTED #define SEMIHOSTING_SUPPORTED 1 -- cgit