From bb9ab0322e3faec2ef2b1417af6d35e2f997d257 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Mon, 1 Jun 2015 13:44:36 -0400 Subject: [PATCH] Eliminate unnecessary references to cpu.h and cputype.h Gets rid of places where there is no need to include these files at all, or places where these files are being indirectly included due to the inclusion of nanokernel.h. Change-Id: I7b58148af454b977830c00a6b519a78d0595603b Signed-off-by: Allan Stephens --- arch/arc/bsp/fatal_error.c | 2 -- arch/arc/core/fault.c | 2 -- arch/arm/bsp/sysFatalErrorHandler.c | 2 -- arch/arm/core/fault.c | 2 -- arch/arm/core/nanofatal.c | 2 -- arch/arm/fsl_frdm_k64f/system.c | 2 -- arch/arm/include/start_task_arch.h | 1 - arch/arm/ti_lm3s6965/system.c | 2 -- arch/arm/timer/systick.c | 2 -- arch/x86/bsp/sysFatalErrorHandler.c | 2 -- arch/x86/core/nanofatal.c | 2 -- arch/x86/generic_pc/system.c | 2 -- arch/x86/include/start_task_arch.h | 1 - arch/x86/quark/system.c | 2 -- arch/x86/timer/hpet.c | 2 -- arch/x86/timer/loApicTimer.c | 2 -- drivers/timer/i8253.c | 2 -- include/drivers/console/uart_console.h | 1 - include/linker-defs.h | 6 ------ include/microkernel/k_types.h | 2 +- kernel/microkernel/idle.c | 2 -- kernel/nanokernel/nano_init.c | 2 -- kernel/nanokernel/version.c | 2 +- 23 files changed, 2 insertions(+), 45 deletions(-) diff --git a/arch/arc/bsp/fatal_error.c b/arch/arc/bsp/fatal_error.c index f88d9cfd61f..6b2b5f8bfc6 100644 --- a/arch/arc/bsp/fatal_error.c +++ b/arch/arc/bsp/fatal_error.c @@ -35,9 +35,7 @@ DESCRIPTION This module provides the _SysFatalErrorHandler() routine for ARCv2 BSPs. */ -#include #include -#include #include #include #include "board.h" diff --git a/arch/arc/core/fault.c b/arch/arc/core/fault.c index fa07768c2e7..5615664178d 100644 --- a/arch/arc/core/fault.c +++ b/arch/arc/core/fault.c @@ -38,9 +38,7 @@ #include #include -#include #include -#include #include #ifdef CONFIG_PRINTK diff --git a/arch/arm/bsp/sysFatalErrorHandler.c b/arch/arm/bsp/sysFatalErrorHandler.c index 4a255dd23f5..fcab06f6692 100644 --- a/arch/arm/bsp/sysFatalErrorHandler.c +++ b/arch/arm/bsp/sysFatalErrorHandler.c @@ -35,9 +35,7 @@ DESCRIPTION This module provides the _SysFatalErrorHandler() routine for Cortex-M BSPs. */ -#include #include -#include #include #include #include "board.h" diff --git a/arch/arm/core/fault.c b/arch/arm/core/fault.c index a320e913a40..1270f1eb55c 100644 --- a/arch/arm/core/fault.c +++ b/arch/arm/core/fault.c @@ -38,9 +38,7 @@ Common fault handler for ARM Cortex-M processors. #include #include -#include #include -#include #include #ifdef CONFIG_PRINTK diff --git a/arch/arm/core/nanofatal.c b/arch/arm/core/nanofatal.c index d6b778136ac..105c9ce7047 100644 --- a/arch/arm/core/nanofatal.c +++ b/arch/arm/core/nanofatal.c @@ -38,9 +38,7 @@ This module provides the _NanoFatalErrorHandler() routine for ARM Cortex-M. #include #include -#include #include -#include #include #ifdef CONFIG_PRINTK diff --git a/arch/arm/fsl_frdm_k64f/system.c b/arch/arm/fsl_frdm_k64f/system.c index c900aff682c..686d57f52bc 100644 --- a/arch/arm/fsl_frdm_k64f/system.c +++ b/arch/arm/fsl_frdm_k64f/system.c @@ -37,8 +37,6 @@ for the fsl_frdm_k64f BSP. */ #include -#include -#include #include #include #include diff --git a/arch/arm/include/start_task_arch.h b/arch/arm/include/start_task_arch.h index a99b35e0ecf..f21b5e0f490 100644 --- a/arch/arm/include/start_task_arch.h +++ b/arch/arm/include/start_task_arch.h @@ -45,7 +45,6 @@ Currently empty, only here for abstraction. #include #include -#include #include #define _START_TASK_ARCH(pKproc, pOpt) \ diff --git a/arch/arm/ti_lm3s6965/system.c b/arch/arm/ti_lm3s6965/system.c index bf016b83079..46ac0590277 100644 --- a/arch/arm/ti_lm3s6965/system.c +++ b/arch/arm/ti_lm3s6965/system.c @@ -37,8 +37,6 @@ for the ti_lm3s6965 BSP. */ #include -#include -#include #include #include diff --git a/arch/arm/timer/systick.c b/arch/arm/timer/systick.c index d4b6a10b229..5f8c97d4d39 100644 --- a/arch/arm/timer/systick.c +++ b/arch/arm/timer/systick.c @@ -52,7 +52,6 @@ conjunction with a microkernel. */ #include -#include #include #include #include @@ -62,7 +61,6 @@ conjunction with a microkernel. #ifdef CONFIG_MICROKERNEL #include -#include extern struct nano_stack _k_command_stack; diff --git a/arch/x86/bsp/sysFatalErrorHandler.c b/arch/x86/bsp/sysFatalErrorHandler.c index f8f1cada6f0..73fcf776ff7 100644 --- a/arch/x86/bsp/sysFatalErrorHandler.c +++ b/arch/x86/bsp/sysFatalErrorHandler.c @@ -36,9 +36,7 @@ This module provides the _SysFatalErrorHandler() routine which is common to supported BSPs. */ -#include #include -#include #include #include diff --git a/arch/x86/core/nanofatal.c b/arch/x86/core/nanofatal.c index 26c1f168ae1..5bd19f2442b 100644 --- a/arch/x86/core/nanofatal.c +++ b/arch/x86/core/nanofatal.c @@ -38,9 +38,7 @@ This module provides the _NanoFatalErrorHandler() routine. #include #include -#include #include -#include #include #include diff --git a/arch/x86/generic_pc/system.c b/arch/x86/generic_pc/system.c index e41e6925c12..ff142a7f9ce 100644 --- a/arch/x86/generic_pc/system.c +++ b/arch/x86/generic_pc/system.c @@ -36,9 +36,7 @@ This module provides routines to initialize and support board-level hardware for the generic_pc BSP. */ -#include #include -#include #include "board.h" #include #include diff --git a/arch/x86/include/start_task_arch.h b/arch/x86/include/start_task_arch.h index 6ee518d121f..524e8cd165c 100644 --- a/arch/x86/include/start_task_arch.h +++ b/arch/x86/include/start_task_arch.h @@ -43,7 +43,6 @@ Intel-specific parts of start_task(). Only FP functionality currently. #include #include -#include #include extern void _StartTaskArch(struct k_proc *, unsigned int *); diff --git a/arch/x86/quark/system.c b/arch/x86/quark/system.c index 280798a1969..139f324d66b 100644 --- a/arch/x86/quark/system.c +++ b/arch/x86/quark/system.c @@ -39,9 +39,7 @@ Implementation Remarks: Handlers for the secondary serial port have not been added. */ -#include #include -#include #include #include #include "board.h" diff --git a/arch/x86/timer/hpet.c b/arch/x86/timer/hpet.c index 1dbab85be07..e44f9fd7b53 100644 --- a/arch/x86/timer/hpet.c +++ b/arch/x86/timer/hpet.c @@ -65,7 +65,6 @@ In a nanokernel-only system this device driver omits more complex capabilities */ #include -#include #include #include #include @@ -74,7 +73,6 @@ In a nanokernel-only system this device driver omits more complex capabilities #ifdef CONFIG_MICROKERNEL #include -#include extern struct nano_stack _k_command_stack; diff --git a/arch/x86/timer/loApicTimer.c b/arch/x86/timer/loApicTimer.c index 6a104155c2e..e0c33ec5147 100644 --- a/arch/x86/timer/loApicTimer.c +++ b/arch/x86/timer/loApicTimer.c @@ -44,7 +44,6 @@ After reset, the timer is initialized to zero. */ #include -#include #include #include #include @@ -53,7 +52,6 @@ After reset, the timer is initialized to zero. #ifdef CONFIG_MICROKERNEL #include -#include #endif /* CONFIG_MICROKERNEL */ /* diff --git a/drivers/timer/i8253.c b/drivers/timer/i8253.c index 5f551b33de5..2331a40bc9e 100644 --- a/drivers/timer/i8253.c +++ b/drivers/timer/i8253.c @@ -50,7 +50,6 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ. */ #include -#include #include #include #include @@ -60,7 +59,6 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ. #ifdef CONFIG_MICROKERNEL #include -#include #endif /* CONFIG_MICROKERNEL */ diff --git a/include/drivers/console/uart_console.h b/include/drivers/console/uart_console.h index 43a787745ee..93e150e719d 100644 --- a/include/drivers/console/uart_console.h +++ b/include/drivers/console/uart_console.h @@ -37,7 +37,6 @@ extern "C" { #endif -#include #include extern void uart_console_init(void); diff --git a/include/linker-defs.h b/include/linker-defs.h index d2e8e207770..9154990b57f 100644 --- a/include/linker-defs.h +++ b/include/linker-defs.h @@ -97,12 +97,6 @@ extern char __data_ram_start[]; extern int __data_num_words[]; #endif -/* C FILES: declaration defined by the linker script */ - -#ifdef VXMICRO_ARCH_x86 -#include -#endif /* VXMICRO_ARCH_x86 */ - /* end address of image. */ extern char _end[]; #define _END_VPAGE (VIRT_ADDR) _end diff --git a/include/microkernel/k_types.h b/include/microkernel/k_types.h index 068b28238cc..20f848857ee 100644 --- a/include/microkernel/k_types.h +++ b/include/microkernel/k_types.h @@ -33,7 +33,7 @@ #ifndef K_TYPES_H #define K_TYPES_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/kernel/microkernel/idle.c b/kernel/microkernel/idle.c index 68752e692c7..7a8f2f88261 100644 --- a/kernel/microkernel/idle.c +++ b/kernel/microkernel/idle.c @@ -281,9 +281,7 @@ unsigned char _sys_power_save_flag = 1; #if defined(CONFIG_ADVANCED_POWER_MANAGEMENT) -#include #include -#include #include #ifdef CONFIG_ADVANCED_IDLE #include diff --git a/kernel/nanokernel/nano_init.c b/kernel/nanokernel/nano_init.c index ec8ed293ddc..873d0600573 100644 --- a/kernel/nanokernel/nano_init.c +++ b/kernel/nanokernel/nano_init.c @@ -36,9 +36,7 @@ This module contains routines that are used to initialize the nanokernel. */ #include -#include #include -#include #include #include #include diff --git a/kernel/nanokernel/version.c b/kernel/nanokernel/version.c index bdf9e4c1c3e..6996dd667e9 100644 --- a/kernel/nanokernel/version.c +++ b/kernel/nanokernel/version.c @@ -30,7 +30,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include "version.h" /* generated by MAKE, at compile time */ static uint32_t kernel_version = KERNELVERSION;