From f21bb9862ef6753577baa1b6eab62179d5c7fff4 Mon Sep 17 00:00:00 2001 From: Chris Kay Date: Mon, 9 Mar 2020 16:35:12 +0000 Subject: misc: Clean up include directives This commit cleans up include directives across the project to reduce the number of implicit transitive dependencies in preparation for mass header changes in the logging patches later on. These changes were made using two tools: clang-include-fixer and include-what-you-use, which identify and remove headers that are unnecessary, and insert headers which are used but not referenced. Some manual tweaking was involved to handle special cases, like #ifdef'd includes. Includes have also been reordered and categorized according to their project locality, and non-module includes now use quotes rather than angle brackets. Change-Id: Id39dc473f44b73cb98f3b8949f9e768fd2ace6cd Signed-off-by: Chris Kay --- module/ddr_phy500/include/mod_ddr_phy500.h | 10 ++++++---- module/ddr_phy500/src/mod_ddr_phy500.c | 19 +++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'module/ddr_phy500') diff --git a/module/ddr_phy500/include/mod_ddr_phy500.h b/module/ddr_phy500/include/mod_ddr_phy500.h index ae8ed035..95363c91 100644 --- a/module/ddr_phy500/include/mod_ddr_phy500.h +++ b/module/ddr_phy500/include/mod_ddr_phy500.h @@ -1,4 +1,4 @@ - /* +/* * Arm SCP/MCP Software * Copyright (c) 2015-2020, Arm Limited and Contributors. All rights reserved. * @@ -10,12 +10,14 @@ #ifndef MOD_DDR_PHY500_H #define MOD_DDR_PHY500_H -#include -#include +#include + #include #include #include -#include + +#include +#include /*! * \addtogroup GroupModules Modules diff --git a/module/ddr_phy500/src/mod_ddr_phy500.c b/module/ddr_phy500/src/mod_ddr_phy500.c index e79a4732..9ad268cd 100644 --- a/module/ddr_phy500/src/mod_ddr_phy500.c +++ b/module/ddr_phy500/src/mod_ddr_phy500.c @@ -8,22 +8,25 @@ * DDR-PHY500 driver */ -#include -#include -#include -#include -#include -#include #include +#include #ifdef BUILD_HAS_MOD_DMC500 - #include +# include #endif #ifdef BUILD_HAS_MOD_DMC620 - #include +# include #endif +#include +#include +#include +#include +#include + +#include + static struct mod_log_api *log_api; /* -- cgit v1.2.3