From a1bd59de3504453ce554eeee095f00e5f45318d1 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Mon, 1 Jun 2015 09:50:33 -0400 Subject: [PATCH] Eliminate obsolete coding convention comments Gets rid of single-line comments required by a previous set of coding conventions. These comments provide no value to readers and just clutter things up. Change-Id: I2a08b12cf5026253de56979efdfc510e7e68defe Signed-off-by: Allan Stephens --- arch/arc/bsp/fatal_error.c | 2 -- arch/arm/bsp/sysFatalErrorHandler.c | 2 -- arch/arm/core/nanofatal.c | 4 ---- arch/arm/timer/systick.c | 6 ------ arch/x86/bsp/sysFatalErrorHandler.c | 2 -- arch/x86/core/excconnect.c | 2 -- arch/x86/core/gdt.c | 8 -------- arch/x86/core/nanoatomic_nolock.c | 2 -- arch/x86/core/nanocontext.c | 2 -- arch/x86/core/nanofatal.c | 3 --- arch/x86/include/gdt.h | 4 ---- arch/x86/include/nanok.h | 2 -- arch/x86/interrupt_controller/ioApicIntr.c | 6 ------ arch/x86/interrupt_controller/loApicIntr.c | 4 ---- arch/x86/timer/hpet.c | 3 --- arch/x86/timer/loApicTimer.c | 7 ------- doc/doxygen/irq_test_common_commented.h | 1 - doc/doxygen/phil_fiber_commented.c | 4 ---- doc/doxygen/phil_task_commented.c | 4 ---- drivers/interrupt_controller/i8259.c | 6 ------ drivers/pci/pci_config.c | 2 -- drivers/pci/pci_interface.c | 2 -- drivers/serial/k20UartDrv.c | 6 ------ drivers/serial/ns16550.c | 8 -------- drivers/timer/i8253.c | 8 -------- include/microkernel/cmdPkt.h | 4 ---- include/microkernel/ticks.h | 2 -- include/misc/dlist.h | 2 -- kernel/microkernel/cmdPkt.c | 2 -- kernel/microkernel/k_mbox.c | 2 -- kernel/microkernel/k_mutex.c | 2 -- kernel/microkernel/k_sema.c | 2 -- kernel/microkernel/movedata.c | 2 -- kernel/nanokernel/compiler_stack_protect.c | 1 - kernel/nanokernel/int_latency_bench.c | 8 -------- kernel/nanokernel/nanometrics.c | 2 -- kernel/nanokernel/version.c | 4 ---- misc/dlist.c | 2 -- samples/include/irq_test_common.h | 2 -- samples/include/tc_util.h | 4 ---- samples/microkernel/apps/philosophers/src/phil.h | 4 ---- .../microkernel/apps/philosophers/src/phil_fiber.c | 6 ------ .../microkernel/apps/philosophers/src/phil_task.c | 6 ------ .../microkernel/benchmark/boot_time/src/boot_time.c | 2 -- .../benchmark/footprint/src/microkernel_footprint.c | 8 -------- .../microkernel/test/test_critical/src/critical.c | 6 ------ samples/microkernel/test/test_events/src/events.c | 6 ------ .../microkernel/test/test_events/src/test_fiber.c | 4 ---- samples/microkernel/test/test_fifo/src/fifo.c | 6 ------ samples/microkernel/test/test_libs/src/libraries.c | 2 -- samples/microkernel/test/test_libs/src/main.c | 9 --------- samples/microkernel/test/test_mail/src/mail.c | 8 -------- samples/microkernel/test/test_mail/src/main.c | 8 -------- samples/microkernel/test/test_map/src/map.c | 8 -------- samples/microkernel/test/test_mutex/src/mutex.c | 6 ------ samples/microkernel/test/test_pipe/src/main.c | 8 -------- samples/microkernel/test/test_pipe/src/pipe.c | 11 ----------- samples/microkernel/test/test_pool/src/pool.c | 8 -------- samples/microkernel/test/test_sema/src/main.c | 8 -------- samples/microkernel/test/test_sema/src/sema.c | 3 --- samples/microkernel/test/test_sema/src/test_fiber.c | 3 --- .../microkernel/test/test_sprintf/src/test_sprintf.c | 6 ------ .../microkernel/test/test_stackprot/src/stackprot.c | 6 ------ .../test/test_static_idt/src/static_idt.c | 6 ------ samples/microkernel/test/test_task/src/task.c | 8 -------- samples/microkernel/test/test_task_irq/src/main.c | 2 -- samples/microkernel/test/test_timer/src/timer.c | 4 ---- samples/microkernel/test/test_xip/src/test_xip.c | 2 -- .../microkernel/test/test_xip/src/test_xip_helper.c | 2 -- .../benchmark/footprint/src/nanokernel_footprint.c | 6 ------ .../test/test_arm_m3_irq_vector_table/src/main.c | 2 -- samples/nanokernel/test/test_context/src/context.c | 8 -------- samples/nanokernel/test/test_fifo/src/fifo.c | 12 ------------ samples/nanokernel/test/test_lifo/src/lifo.c | 8 -------- samples/nanokernel/test/test_sema/src/sema.c | 8 -------- samples/nanokernel/test/test_stack/src/stack.c | 11 ----------- samples/nanokernel/test/test_timer/src/timer.c | 8 -------- 77 files changed, 370 deletions(-) diff --git a/arch/arc/bsp/fatal_error.c b/arch/arc/bsp/fatal_error.c index 44ccc17e795..f88d9cfd61f 100644 --- a/arch/arc/bsp/fatal_error.c +++ b/arch/arc/bsp/fatal_error.c @@ -35,8 +35,6 @@ DESCRIPTION This module provides the _SysFatalErrorHandler() routine for ARCv2 BSPs. */ -/* includes */ - #include #include #include diff --git a/arch/arm/bsp/sysFatalErrorHandler.c b/arch/arm/bsp/sysFatalErrorHandler.c index 8a6b3da7ca7..4a255dd23f5 100644 --- a/arch/arm/bsp/sysFatalErrorHandler.c +++ b/arch/arm/bsp/sysFatalErrorHandler.c @@ -35,8 +35,6 @@ DESCRIPTION This module provides the _SysFatalErrorHandler() routine for Cortex-M BSPs. */ -/* includes */ - #include #include #include diff --git a/arch/arm/core/nanofatal.c b/arch/arm/core/nanofatal.c index d254302078e..d6b778136ac 100644 --- a/arch/arm/core/nanofatal.c +++ b/arch/arm/core/nanofatal.c @@ -35,8 +35,6 @@ DESCRIPTION This module provides the _NanoFatalErrorHandler() routine for ARM Cortex-M. */ -/* includes */ - #include #include @@ -52,8 +50,6 @@ This module provides the _NanoFatalErrorHandler() routine for ARM Cortex-M. #define PR_EXC(...) #endif /* CONFIG_PRINTK */ -/* globals */ - /* * Define a default ESF for use with _NanoFatalErrorHandler() in the event * the caller does not have a NANO_ESF to pass diff --git a/arch/arm/timer/systick.c b/arch/arm/timer/systick.c index 83f18d41471..d4b6a10b229 100644 --- a/arch/arm/timer/systick.c +++ b/arch/arm/timer/systick.c @@ -82,8 +82,6 @@ static uint32_t clock_accumulated_count = 0; #include -/* defines */ - /* * When GDB_INFO is enabled, the handler installed in the vector table * (__systick), can be found in systick_gdb.s. In this case, the handler @@ -103,8 +101,6 @@ static uint32_t clock_accumulated_count = 0; #define IDLE_TICKLESS 1 /* tickless idle mode */ #endif /* CONFIG_TICKLESS_IDLE */ -/* globals */ - #ifdef CONFIG_INT_LATENCY_BENCHMARK extern uint32_t _hw_irq_to_c_handler_latency; #endif @@ -119,8 +115,6 @@ extern void _sys_power_save_idle_exit(int32_t ticks); extern int32_t _sys_idle_elapsed_ticks; #endif /* CONFIG_TICKLESS_IDLE */ -/* locals */ - #ifdef CONFIG_TICKLESS_IDLE static uint32_t __noinit default_load_value; /* default count */ static uint32_t idle_original_count = 0; diff --git a/arch/x86/bsp/sysFatalErrorHandler.c b/arch/x86/bsp/sysFatalErrorHandler.c index 6f0a34426c5..f8f1cada6f0 100644 --- a/arch/x86/bsp/sysFatalErrorHandler.c +++ b/arch/x86/bsp/sysFatalErrorHandler.c @@ -36,8 +36,6 @@ This module provides the _SysFatalErrorHandler() routine which is common to supported BSPs. */ -/* includes */ - #include #include #include diff --git a/arch/x86/core/excconnect.c b/arch/x86/core/excconnect.c index b416a95c578..1b8410c8ef9 100644 --- a/arch/x86/core/excconnect.c +++ b/arch/x86/core/excconnect.c @@ -81,8 +81,6 @@ The _EXC_STUB_SIZE macro is defined in arch/x86/include/nanok.h. #include -/* forward declarations */ - void _NanoCpuExcConnectAtDpl(unsigned int vector, void (*routine)(NANO_ESF * pEsf), NANO_EXC_STUB pExcStubMem, diff --git a/arch/x86/core/gdt.c b/arch/x86/core/gdt.c index 4d2d8f60ea1..68ba17460a9 100644 --- a/arch/x86/core/gdt.c +++ b/arch/x86/core/gdt.c @@ -36,8 +36,6 @@ This module contains routines for updating the global descriptor table (GDT) for the IA-32 architecture. */ -/* includes */ - #include #include #include @@ -46,8 +44,6 @@ for the IA-32 architecture. #include #include -/* defines */ - #if (CONFIG_NUM_GDT_SPARE_ENTRIES < 0) #error "**** CONFIG_NUM_GDT_SPARE_ENTRIES must be at least 0\n\n" #endif @@ -57,8 +53,6 @@ for the IA-32 architecture. #define MAX_GDT_ENTRIES \ (NUM_BASE_GDT_ENTRIES + CONFIG_NUM_GDT_SPARE_ENTRIES) -/* locals */ - /* * The RAM based global descriptor table. It is aligned on an 8 byte boundary * as the Intel manuals recommend this for best performance. @@ -91,8 +85,6 @@ static }, }; -/* globals */ - tGdtHeader _gdt = { sizeof(tGdtDesc[MAX_GDT_ENTRIES - CONFIG_NUM_GDT_SPARE_ENTRIES]) - 1, diff --git a/arch/x86/core/nanoatomic_nolock.c b/arch/x86/core/nanoatomic_nolock.c index 32b50ba7629..8b3b3b0932a 100644 --- a/arch/x86/core/nanoatomic_nolock.c +++ b/arch/x86/core/nanoatomic_nolock.c @@ -45,8 +45,6 @@ These operators are currently unavailable to user space applications as there is no requirement for this capability. */ -/* includes */ - #if defined(CONFIG_LOCK_INSTRUCTION_UNSUPPORTED) #include diff --git a/arch/x86/core/nanocontext.c b/arch/x86/core/nanocontext.c index 01c61a4d07b..7859acfa7bf 100644 --- a/arch/x86/core/nanocontext.c +++ b/arch/x86/core/nanocontext.c @@ -36,8 +36,6 @@ This module provides core nanokernel fiber related primitives for the IA-32 processor architecture. */ -/* includes */ - #ifdef CONFIG_MICROKERNEL #include #include diff --git a/arch/x86/core/nanofatal.c b/arch/x86/core/nanofatal.c index 2ec372ccc48..26c1f168ae1 100644 --- a/arch/x86/core/nanofatal.c +++ b/arch/x86/core/nanofatal.c @@ -35,7 +35,6 @@ DESCRIPTION This module provides the _NanoFatalErrorHandler() routine. */ -/* includes */ #include #include @@ -46,8 +45,6 @@ This module provides the _NanoFatalErrorHandler() routine. #include -/* globals */ - /* * Define a default ESF for use with _NanoFatalErrorHandler() in the event * the caller does not have a NANO_ESF to pass diff --git a/arch/x86/include/gdt.h b/arch/x86/include/gdt.h index abf2e766aa1..c8081b4b030 100644 --- a/arch/x86/include/gdt.h +++ b/arch/x86/include/gdt.h @@ -39,8 +39,6 @@ IA-32 architecture. #ifndef _GDT_H #define _GDT_H -/* includes */ - #include #ifndef _ASMLANGUAGE @@ -48,8 +46,6 @@ IA-32 architecture. #include #include -/* typedefs */ - /* a generic GDT entry structure definition */ typedef struct s_gdtDesc { diff --git a/arch/x86/include/nanok.h b/arch/x86/include/nanok.h index 20cdbe2a598..978f012e579 100644 --- a/arch/x86/include/nanok.h +++ b/arch/x86/include/nanok.h @@ -47,8 +47,6 @@ offsets.o module. #ifndef _NANOK_H #define _NANOK_H -/* includes */ - #include #include #include diff --git a/arch/x86/interrupt_controller/ioApicIntr.c b/arch/x86/interrupt_controller/ioApicIntr.c index 1c2052c4516..035ac97afb4 100644 --- a/arch/x86/interrupt_controller/ioApicIntr.c +++ b/arch/x86/interrupt_controller/ioApicIntr.c @@ -75,8 +75,6 @@ INCLUDE FILES: ioapic.h loapic.h SEE ALSO: loApicIntr.c */ -/* includes */ - #include #include @@ -88,8 +86,6 @@ SEE ALSO: loApicIntr.c #include /* public API declarations */ #include /* public API declarations and registers */ -/* defines */ - /* IO APIC direct register offsets */ #define IOAPIC_IND 0x00 /* Index Register */ @@ -196,8 +192,6 @@ SEE ALSO: loApicIntr.c #endif /* IOAPIC_MSI_REDIRECT */ -/* forward declarations */ - #ifndef XIOAPIC_DIRECT_ADDRESSING static uint32_t __IoApicGet(int32_t offset); static void __IoApicSet(int32_t offset, uint32_t value); diff --git a/arch/x86/interrupt_controller/loApicIntr.c b/arch/x86/interrupt_controller/loApicIntr.c index c80d60a1153..a6fc4e9ca0c 100644 --- a/arch/x86/interrupt_controller/loApicIntr.c +++ b/arch/x86/interrupt_controller/loApicIntr.c @@ -103,8 +103,6 @@ per priority level. INCLUDE FILES: loapic.h */ -/* includes */ - #include #include #include @@ -114,8 +112,6 @@ INCLUDE FILES: loapic.h #include #include /* public API declarations */ -/* defines */ - /* IA32_APIC_BASE MSR Bits */ #define LOAPIC_BASE_MASK 0xfffff000 /* LO APIC Base Addr mask */ diff --git a/arch/x86/timer/hpet.c b/arch/x86/timer/hpet.c index 99756f34aae..1dbab85be07 100644 --- a/arch/x86/timer/hpet.c +++ b/arch/x86/timer/hpet.c @@ -96,8 +96,6 @@ extern struct nano_stack _k_command_stack; #include -/* defines */ - /* HPET register offsets */ #define GENERAL_CAPS_REG 0 /* 64-bit register */ @@ -196,7 +194,6 @@ extern struct nano_stack _k_command_stack; #define HPET_COMP_DELAY 192 -/* locals */ #ifdef CONFIG_DYNAMIC_INT_STUBS static NANO_CPU_INT_STUB_DECL(_hpetIntStub); /* interrupt stub memory */ #else /* !CONFIG_DYNAMIC_INT_STUBS */ diff --git a/arch/x86/timer/loApicTimer.c b/arch/x86/timer/loApicTimer.c index 5d18d7eb376..6a104155c2e 100644 --- a/arch/x86/timer/loApicTimer.c +++ b/arch/x86/timer/loApicTimer.c @@ -43,8 +43,6 @@ divided by a value specified in the divide configuration register. After reset, the timer is initialized to zero. */ -/* includes */ - #include #include #include @@ -72,8 +70,6 @@ After reset, the timer is initialized to zero. #include -/* defines */ - /* Local APIC Timer Bits */ #define LOAPIC_TIMER_DIVBY_2 0x0 /* Divide by 2 */ @@ -112,13 +108,10 @@ After reset, the timer is initialized to zero. do {/* nothing */ \ } while (0) #endif /* !TIMER_SUPPORTS_TICKLESS */ -/* globals */ - #if defined(TIMER_SUPPORTS_TICKLESS) extern int32_t _sys_idle_elapsed_ticks; #endif /* TIMER_SUPPORTS_TICKLESS */ -/* locals */ #ifdef CONFIG_DYNAMIC_INT_STUBS static NANO_CPU_INT_STUB_DECL( _loapic_timer_irq_stub); /* interrupt stub memory for */ diff --git a/doc/doxygen/irq_test_common_commented.h b/doc/doxygen/irq_test_common_commented.h index 6ce853d1391..031ed45bec2 100644 --- a/doc/doxygen/irq_test_common_commented.h +++ b/doc/doxygen/irq_test_common_commented.h @@ -39,7 +39,6 @@ Interrupt stuff, abstracted across CPU architectures. #ifndef _IRQ_TEST_COMMON__H_ #define _IRQ_TEST_COMMON__H_ -/* defines */ #if defined(VXMICRO_ARCH_x86) #define IRQ_PRIORITY 3 diff --git a/doc/doxygen/phil_fiber_commented.c b/doc/doxygen/phil_fiber_commented.c index 841fc01ea89..3cbe0af3545 100644 --- a/doc/doxygen/phil_fiber_commented.c +++ b/doc/doxygen/phil_fiber_commented.c @@ -32,8 +32,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #ifdef CONFIG_NANOKERNEL /* For the nanokernel. */ #include @@ -46,8 +44,6 @@ #include //!< Used to be know as: irq_lock/irq_unlock -/* defines */ - #ifdef CONFIG_NANOKERNEL /* For the nanokernel. */ #define FORK(x) &forks[x] diff --git a/doc/doxygen/phil_task_commented.c b/doc/doxygen/phil_task_commented.c index ed0562b22ce..574b0d716cc 100644 --- a/doc/doxygen/phil_task_commented.c +++ b/doc/doxygen/phil_task_commented.c @@ -38,8 +38,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #ifdef CONFIG_NANOKERNEL #include #include "phil.h" @@ -48,8 +46,6 @@ #include "phil.h" #endif -/* defines */ - #define DEMO_DESCRIPTION \ "\x1b[2J\x1b[15;1H" \ "Demo Description\n" \ diff --git a/drivers/interrupt_controller/i8259.c b/drivers/interrupt_controller/i8259.c index 2f9857a5b72..d5f64bc8029 100644 --- a/drivers/interrupt_controller/i8259.c +++ b/drivers/interrupt_controller/i8259.c @@ -83,8 +83,6 @@ the last level acknowledged and serviced. * specific and implemented in assembler */ -/* includes */ - #include #include #include @@ -93,15 +91,11 @@ the last level acknowledged and serviced. #include #include -/* defines */ - #define OCW3_DEF 0x08 /* 3rd default control word */ #define OCW3_PCB 0x04 /* Polling Control Bit */ #define OCW3_ISR 0x03 /* Read in-service reg */ #define OCW3_IRR 0x02 /* Read inter request reg */ -/* globals */ - #ifndef CONFIG_SHUTOFF_PIC unsigned int _i8259_spurious_interrupt_count = 0; /* track # of spurious interrupts */ diff --git a/drivers/pci/pci_config.c b/drivers/pci/pci_config.c index 35b6a23e37c..0f59bf18276 100644 --- a/drivers/pci/pci_config.c +++ b/drivers/pci/pci_config.c @@ -37,8 +37,6 @@ This module implements the PCI config space access functions */ -/* includes */ - #include #include diff --git a/drivers/pci/pci_interface.c b/drivers/pci/pci_interface.c index 3641bbd59f0..0b2ee1f638d 100644 --- a/drivers/pci/pci_interface.c +++ b/drivers/pci/pci_interface.c @@ -37,8 +37,6 @@ This module implements the PCI H/W access functions. */ -/* includes */ - #include #include diff --git a/drivers/serial/k20UartDrv.c b/drivers/serial/k20UartDrv.c index 47fb2dd14e8..fddad4693d3 100644 --- a/drivers/serial/k20UartDrv.c +++ b/drivers/serial/k20UartDrv.c @@ -40,8 +40,6 @@ values in the uart_init_info structure before calling uart_init(). INCLUDE FILES: drivers/serial/k20_uart.h */ -/* includes */ - #include #include #include @@ -53,16 +51,12 @@ INCLUDE FILES: drivers/serial/k20_uart.h #include #include -/* typedefs */ - typedef struct { uint8_t *base; /* base address of registers */ uint8_t irq; /* interrupt request level */ uint8_t intPri; /* interrupt priority */ } _k20Uart_t; -/* locals */ - UART_PORTS_CONFIGURE(_k20Uart_t, uart); /******************************************************************************* diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 21da327ee19..f77280639cd 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -56,8 +56,6 @@ A board support package's board.h header must provide definitions for: INCLUDE FILES: drivers/uart.h */ -/* includes */ - #include #include #include @@ -71,8 +69,6 @@ INCLUDE FILES: drivers/uart.h #include #endif /* CONFIG_PCI */ -/* defines */ - /* register definitions */ #define REG_THR 0x00 /* Transmitter holding reg. */ @@ -228,8 +224,6 @@ INCLUDE FILES: drivers/uart.h } while (0) #endif /* VXMICRO_ARCH_Intel */ -/* typedefs */ - struct ns16550 { uint32_t port; /* base port number or MM base address */ uint8_t irq; /* interrupt request level */ @@ -237,8 +231,6 @@ struct ns16550 { uint8_t iirCache; /* cache of IIR since it clears when read */ }; -/* locals */ - #if !(defined(UART_PORTS_CONFIGURE)) && !(defined(CONFIG_PCI)) #error "CONFIG_PCI or UART_PORTS_CONFIGURE is needed" diff --git a/drivers/timer/i8253.c b/drivers/timer/i8253.c index b148b8996ac..5f551b33de5 100644 --- a/drivers/timer/i8253.c +++ b/drivers/timer/i8253.c @@ -49,8 +49,6 @@ An interrupt controller driver will not be utilized, so this driver will directly invoke the VIOAPIC APIs to configure/unmask the IRQ. */ -/* includes */ - #include #include #include @@ -84,8 +82,6 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ. #include -/* defines */ - #if defined(CONFIG_TICKLESS_IDLE) #define TIMER_SUPPORTS_TICKLESS #endif @@ -115,14 +111,10 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ. #define PIT_CNT2(base) PIT_ADRS(base, 0x02) /* counter/channel 2 */ #define PIT_CMD(base) PIT_ADRS(base, 0x03) /* control word */ -/* globals */ - #if defined(TIMER_SUPPORTS_TICKLESS) extern int32_t _sys_idle_elapsed_ticks; #endif -/* locals */ - /* interrupt stub memory for irq_connect() */ #ifndef CONFIG_DYNAMIC_INT_STUBS diff --git a/include/microkernel/cmdPkt.h b/include/microkernel/cmdPkt.h index 227067e2535..4b39077824b 100644 --- a/include/microkernel/cmdPkt.h +++ b/include/microkernel/cmdPkt.h @@ -37,8 +37,6 @@ extern "C" { #endif -/* includes */ - #include /* define size of command packet (without exposing its internal structure) */ @@ -72,8 +70,6 @@ extern "C" { #define CMD_PKT_SET(name) (*(struct cmd_pkt_set *)(name)) -/* typedefs */ - typedef uint32_t cmdPkt_t[CMD_PKT_SIZE_IN_WORDS]; struct cmd_pkt_set { diff --git a/include/microkernel/ticks.h b/include/microkernel/ticks.h index 00409bac363..a2641034a96 100644 --- a/include/microkernel/ticks.h +++ b/include/microkernel/ticks.h @@ -33,8 +33,6 @@ #ifndef TICKS_H #define TICKS_H -/* includes */ - #include #include diff --git a/include/misc/dlist.h b/include/misc/dlist.h index 804f93967ac..ecd2ff05843 100644 --- a/include/misc/dlist.h +++ b/include/misc/dlist.h @@ -39,8 +39,6 @@ linked list. #ifndef _DLIST_H #define _DLIST_H -/* typedefs */ - typedef struct dnode_s { union { struct dnode_s *head; /* ptr to head of list (dlist_t) */ diff --git a/kernel/microkernel/cmdPkt.c b/kernel/microkernel/cmdPkt.c index 8a60e7fbf31..247afc07ea5 100644 --- a/kernel/microkernel/cmdPkt.c +++ b/kernel/microkernel/cmdPkt.c @@ -52,8 +52,6 @@ corruption of command packets that are already in use. To this end, drivers that have an ISR component should use their own command packet set. */ -/* includes */ - #include #include #include diff --git a/kernel/microkernel/k_mbox.c b/kernel/microkernel/k_mbox.c index e3909dec148..aaec51c482e 100644 --- a/kernel/microkernel/k_mbox.c +++ b/kernel/microkernel/k_mbox.c @@ -30,8 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #include #include #include diff --git a/kernel/microkernel/k_mutex.c b/kernel/microkernel/k_mutex.c index 5710135769a..2c7c595aa89 100644 --- a/kernel/microkernel/k_mutex.c +++ b/kernel/microkernel/k_mutex.c @@ -55,8 +55,6 @@ levels (too high, or too low). NOMANUAL */ -/* includes */ - #include #include #include diff --git a/kernel/microkernel/k_sema.c b/kernel/microkernel/k_sema.c index 0a230cf5618..dc92800c2d3 100644 --- a/kernel/microkernel/k_sema.c +++ b/kernel/microkernel/k_sema.c @@ -30,8 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #include #include #include diff --git a/kernel/microkernel/movedata.c b/kernel/microkernel/movedata.c index a0af9e071fb..40b0c86e1da 100644 --- a/kernel/microkernel/movedata.c +++ b/kernel/microkernel/movedata.c @@ -30,8 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #include #include #include diff --git a/kernel/nanokernel/compiler_stack_protect.c b/kernel/nanokernel/compiler_stack_protect.c index c747637c484..56cc1efae6f 100644 --- a/kernel/nanokernel/compiler_stack_protect.c +++ b/kernel/nanokernel/compiler_stack_protect.c @@ -40,7 +40,6 @@ When this feature is enabled, the compiler generated code refers to function __stack_chk_fail and global variable __stack_chk_guard. */ -/* includes */ #include /* compiler specific configurations */ #if defined(CONFIG_STACK_CANARIES) diff --git a/kernel/nanokernel/int_latency_bench.c b/kernel/nanokernel/int_latency_bench.c index 8f2693c749d..0023e475afb 100644 --- a/kernel/nanokernel/int_latency_bench.c +++ b/kernel/nanokernel/int_latency_bench.c @@ -30,8 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #ifdef CONFIG_INT_LATENCY_BENCHMARK #include "toolchain.h" @@ -42,12 +40,8 @@ #include #include -/* defines */ - #define NB_CACHE_WARMING_DRY_RUN 7 -/* locals */ - /* * Timestamp corresponding to when interrupt were turned off. * A value of zero indicated interrupt are not currently locked. @@ -69,8 +63,6 @@ static uint32_t int_lock_unlock_nest = 0; /* indicate if the interrupt latency benchamrk is ready to be used */ static uint32_t int_latency_bench_ready = 0; -/* globals */ - /* min amount of time it takes from HW interrupt generation to 'C' handler */ uint32_t _hw_irq_to_c_handler_latency = ULONG_MAX; diff --git a/kernel/nanokernel/nanometrics.c b/kernel/nanokernel/nanometrics.c index a80c3c74a1c..112ec489f51 100644 --- a/kernel/nanokernel/nanometrics.c +++ b/kernel/nanokernel/nanometrics.c @@ -30,8 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #include #include #include diff --git a/kernel/nanokernel/version.c b/kernel/nanokernel/version.c index 92b5ba6612e..bdf9e4c1c3e 100644 --- a/kernel/nanokernel/version.c +++ b/kernel/nanokernel/version.c @@ -30,13 +30,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #include #include "version.h" /* generated by MAKE, at compile time */ -/* locals */ - static uint32_t kernel_version = KERNELVERSION; /******************************************************************************* diff --git a/misc/dlist.c b/misc/dlist.c index a0c00082a76..650f977d9f8 100644 --- a/misc/dlist.c +++ b/misc/dlist.c @@ -40,8 +40,6 @@ simplifies the adding and removing of nodes to/from the list. \NOMANUAL */ -/* includes */ - #include #include diff --git a/samples/include/irq_test_common.h b/samples/include/irq_test_common.h index a2805c01d60..a642f054195 100644 --- a/samples/include/irq_test_common.h +++ b/samples/include/irq_test_common.h @@ -39,8 +39,6 @@ Interrupt stuff, abstracted across CPU architectures. #ifndef _IRQ_TEST_COMMON__H_ #define _IRQ_TEST_COMMON__H_ -/* defines */ - #if defined(VXMICRO_ARCH_x86) #define IRQ_PRIORITY 3 #elif defined(VXMICRO_ARCH_arm) diff --git a/samples/include/tc_util.h b/samples/include/tc_util.h index 415370860fe..6b92cf541ba 100644 --- a/samples/include/tc_util.h +++ b/samples/include/tc_util.h @@ -33,8 +33,6 @@ #ifndef __TC_UTIL_H__ #define __TC_UTIL_H__ -/* includes */ - #if defined(CONFIG_NANOKERNEL) #include #else @@ -44,8 +42,6 @@ #include #include -/* defines */ - #define PRINT_DATA(fmt, ...) printk(fmt, ##__VA_ARGS__) #define PRINT_LINE \ diff --git a/samples/microkernel/apps/philosophers/src/phil.h b/samples/microkernel/apps/philosophers/src/phil.h index f5d64971447..143457c5836 100644 --- a/samples/microkernel/apps/philosophers/src/phil.h +++ b/samples/microkernel/apps/philosophers/src/phil.h @@ -29,16 +29,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #if defined(CONFIG_STDOUT_CONSOLE) #include #else #include #endif -/* defines */ - #define N_PHILOSOPHERS 6 /* * There are multiple tasks doing printfs and they may conflict. diff --git a/samples/microkernel/apps/philosophers/src/phil_fiber.c b/samples/microkernel/apps/philosophers/src/phil_fiber.c index 895cd537bcc..5c4c72df515 100644 --- a/samples/microkernel/apps/philosophers/src/phil_fiber.c +++ b/samples/microkernel/apps/philosophers/src/phil_fiber.c @@ -29,8 +29,6 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #ifdef CONFIG_NANOKERNEL #include #include "phil.h" @@ -41,8 +39,6 @@ #include /* irq_lock/irq_unlock */ -/* defines */ - #ifdef CONFIG_NANOKERNEL #define FORK(x) &forks[x] #define TAKE(x) nano_fiber_sem_take_wait(x) @@ -62,8 +58,6 @@ extern struct nano_sem forks[N_PHILOSOPHERS]; #else /* ! CONFIG_NANOKERNEL */ -/* globals */ - kmutex_t forks[] = {forkMutex0, forkMutex1, forkMutex2, forkMutex3, forkMutex4, forkMutex5}; #endif /* CONFIG_NANOKERNEL */ diff --git a/samples/microkernel/apps/philosophers/src/phil_task.c b/samples/microkernel/apps/philosophers/src/phil_task.c index cb9a069bf3b..fb0992cb2b8 100644 --- a/samples/microkernel/apps/philosophers/src/phil_task.c +++ b/samples/microkernel/apps/philosophers/src/phil_task.c @@ -30,8 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #ifdef CONFIG_NANOKERNEL #include #include @@ -41,8 +39,6 @@ #include "phil.h" #endif -/* defines */ - #define DEMO_DESCRIPTION \ "\x1b[2J\x1b[15;1H" \ "Demo Description\n" \ @@ -60,8 +56,6 @@ extern void philEntry(void); -/* globals */ - char __stack philStack[N_PHILOSOPHERS][STSIZE]; struct nano_sem forks[N_PHILOSOPHERS]; #endif /* CONFIG_NANOKERNEL */ diff --git a/samples/microkernel/benchmark/boot_time/src/boot_time.c b/samples/microkernel/benchmark/boot_time/src/boot_time.c index 1bab4bfeac4..a3d2d1af9e0 100644 --- a/samples/microkernel/benchmark/boot_time/src/boot_time.c +++ b/samples/microkernel/benchmark/boot_time/src/boot_time.c @@ -39,8 +39,6 @@ Measure boot time for both nanokernel and microkernel project which includes - from _start to idle (for microkernel) */ -/* includes */ - #ifdef CONFIG_NANOKERNEL #include #else diff --git a/samples/microkernel/benchmark/footprint/src/microkernel_footprint.c b/samples/microkernel/benchmark/footprint/src/microkernel_footprint.c index 46a365090a4..1b65510f4de 100644 --- a/samples/microkernel/benchmark/footprint/src/microkernel_footprint.c +++ b/samples/microkernel/benchmark/footprint/src/microkernel_footprint.c @@ -30,8 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* includes */ - #include #include @@ -41,8 +39,6 @@ #else -/* includes */ - #include #include #include @@ -55,8 +51,6 @@ #endif /* __GNUC__ */ #endif /* TEST_reg */ -/* defines */ - #define IRQ_PRIORITY 3 #define TEST_SOFT_INT 64 @@ -66,8 +60,6 @@ #define MESSAGE "Running regular microkernel configuration\n" #endif /* TEST_max */ -/* typedefs */ - typedef void* (*pfunc) (void*); /* variables */ diff --git a/samples/microkernel/test/test_critical/src/critical.c b/samples/microkernel/test/test_critical/src/critical.c index 967da786fdd..0d99e9a92d1 100644 --- a/samples/microkernel/test/test_critical/src/critical.c +++ b/samples/microkernel/test/test_critical/src/critical.c @@ -35,19 +35,13 @@ DESCRIPTION This module tests the task_offload_to_fiber() API. */ -/* includes */ - #include #include #include -/* defines */ - #define NUM_TICKS 500 #define TEST_TIMEOUT 2000 -/* locals */ - static uint32_t criticalVar = 0; static uint32_t altTaskIterations = 0; diff --git a/samples/microkernel/test/test_events/src/events.c b/samples/microkernel/test/test_events/src/events.c index 040f203a83b..29802c4162a 100644 --- a/samples/microkernel/test/test_events/src/events.c +++ b/samples/microkernel/test/test_events/src/events.c @@ -38,8 +38,6 @@ This modules tests the following event APIs: */ -/* includes */ - #include #include #include @@ -51,14 +49,10 @@ This modules tests the following event APIs: #include #include -/* typedefs */ - typedef struct { kevent_t event; } ISR_INFO; -/* locals */ - static int evidence = 0; static ISR_INFO isrInfo; diff --git a/samples/microkernel/test/test_events/src/test_fiber.c b/samples/microkernel/test/test_events/src/test_fiber.c index 49b3ac9d95d..10df2b44ae5 100644 --- a/samples/microkernel/test/test_events/src/test_fiber.c +++ b/samples/microkernel/test/test_events/src/test_fiber.c @@ -36,12 +36,10 @@ The module implements functions for the fiber that tests event signaling */ -/* includes */ #include #include #include -/* defines */ #define N_TESTS 10 /* number of tests to run */ #define FIBER_PRIORITY 6 #define FIBER_STACK_SIZE 1024 @@ -49,8 +47,6 @@ event signaling /* exports */ struct nano_sem fiberSem; /* semaphore that allows test control the fiber */ -/* locals */ - static char __stack fiberStack[FIBER_STACK_SIZE]; /* test fiber stack size */ /******************************************************************************* diff --git a/samples/microkernel/test/test_fifo/src/fifo.c b/samples/microkernel/test/test_fifo/src/fifo.c index 8c5d42be156..6e952fbb23d 100644 --- a/samples/microkernel/test/test_fifo/src/fifo.c +++ b/samples/microkernel/test/test_fifo/src/fifo.c @@ -45,14 +45,10 @@ Scenarios tested include: - Verify the return codes are correct for the APIs */ -/* includes */ - #include #include #include -/* defines */ - #define MULTIPLIER 100 /* Used to initialize myData */ #define NUM_OF_ELEMENT 5 /* Number of elements in myData array */ #define DEPTH_OF_FIFO_QUEUE 2 /* @@ -63,8 +59,6 @@ Scenarios tested include: #define SPECIAL_DATA 999 /* Special number to put in queue */ -/* locals */ - static int myData[NUM_OF_ELEMENT]; static int tcRC = TC_PASS; /* test case return code */ diff --git a/samples/microkernel/test/test_libs/src/libraries.c b/samples/microkernel/test/test_libs/src/libraries.c index f83a3416db7..6edb996eabf 100644 --- a/samples/microkernel/test/test_libs/src/libraries.c +++ b/samples/microkernel/test/test_libs/src/libraries.c @@ -41,8 +41,6 @@ NOT guarantee that ALL standards-defined functionality is present, nor does it guarantee that ALL functionality provided is working correctly. */ -/* includes */ - #include #include diff --git a/samples/microkernel/test/test_libs/src/main.c b/samples/microkernel/test/test_libs/src/main.c index 5b32fdf785d..3a977b52ef0 100644 --- a/samples/microkernel/test/test_libs/src/main.c +++ b/samples/microkernel/test/test_libs/src/main.c @@ -44,22 +44,16 @@ NOTE: At present only a single test task is used, but more tasks may be added in the future to enhance test coverage. */ -/* includes */ - #include #include #include -/* defines */ - #define NUM_TEST_TASKS 1 /* # of test tasks to monitor */ /* # ticks to wait for test completion */ #define TIMEOUT (60 * sys_clock_ticks_per_sec) -/* locals */ - /* * Note that semaphore group entries are arranged so that resultSems[TC_PASS] * refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL. @@ -67,9 +61,6 @@ in the future to enhance test coverage. static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST }; -/* globals */ - - /******************************************************************************* * * RegressionTaskEntry - entry point for RegressionTask diff --git a/samples/microkernel/test/test_mail/src/mail.c b/samples/microkernel/test/test_mail/src/mail.c index 3de36a61c2f..b7700c07299 100644 --- a/samples/microkernel/test/test_mail/src/mail.c +++ b/samples/microkernel/test/test_mail/src/mail.c @@ -58,28 +58,20 @@ are not (yet) tested include: to ensure higher priority tasks get preference. */ -/* includes */ - #include #include -/* defines */ - #define MSGSIZE 16 /* Standard message data size */ #define XFER_PRIO 5 /* standard message transfer priority */ #define MSG_INFO1 1234 /* Message info test value */ #define MSG_INFO2 666 /* Message info test value */ -/* locals */ - static char myData1[MSGSIZE] = "This is myData1"; static char myData2[MSGSIZE] = "This is myData2"; static char myData3[MSGSIZE] = "This is myData3"; static char myData4[MSGSIZE] = "This is myData4"; -/* globals */ - extern ktask_t msgSenderTask; extern ktask_t msgRcvrTask; diff --git a/samples/microkernel/test/test_mail/src/main.c b/samples/microkernel/test/test_mail/src/main.c index b3e1ce99aa6..034b8d538dd 100644 --- a/samples/microkernel/test/test_mail/src/main.c +++ b/samples/microkernel/test/test_mail/src/main.c @@ -42,20 +42,14 @@ these semaphores until it detects a failure or the completion of all test tasks, then announces the result of the test. */ -/* includes */ - #include #include -/* defines */ - #define NUM_TEST_TASKS 2 /* # of test tasks to monitor */ /* # ticks to wait for test completion */ #define TIMEOUT (60 * sys_clock_ticks_per_sec) -/* locals */ - /* * Note that semaphore group entries are arranged so that resultSems[TC_PASS] * refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL. @@ -63,8 +57,6 @@ then announces the result of the test. static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST }; -/* globals */ - ktask_t msgSenderTask = MSGSENDERTASK; ktask_t msgRcvrTask = MSGRCVRTASK; diff --git a/samples/microkernel/test/test_map/src/map.c b/samples/microkernel/test/test_map/src/map.c index d0692d8cc4b..7a06342e115 100644 --- a/samples/microkernel/test/test_map/src/map.c +++ b/samples/microkernel/test/test_map/src/map.c @@ -44,14 +44,10 @@ allocated, and is only released once. Using an invalid pointer will have unpredictable side effects. */ -/* includes */ - #include #include #include -/* defines */ - #define NUMBLOCKS 2 /* * Number of memory blocks. This number * has to be aligned with the number in VPF file @@ -59,12 +55,8 @@ unpredictable side effects. * test is 2 */ -/* locals */ - static int tcRC = TC_PASS; /* test case return code */ -/* forward declarations */ - int testMapGetAllBlocks(void **P); int testMapFreeAllBlocks(void **P); diff --git a/samples/microkernel/test/test_mutex/src/mutex.c b/samples/microkernel/test/test_mutex/src/mutex.c index dea0ca38c84..11220966265 100644 --- a/samples/microkernel/test/test_mutex/src/mutex.c +++ b/samples/microkernel/test/test_mutex/src/mutex.c @@ -65,20 +65,14 @@ Timeline : RegressionTask (@ priority 40) sleeps */ -/* includes */ - #include #include -/* defines */ - #define ONE_SECOND (sys_clock_ticks_per_sec) #define HALF_SECOND (sys_clock_ticks_per_sec / 2) #define THIRD_SECOND (sys_clock_ticks_per_sec / 3) #define FOURTH_SECOND (sys_clock_ticks_per_sec / 4) -/* locals */ - static int tcRC = TC_PASS; /* test case return code */ /******************************************************************************* diff --git a/samples/microkernel/test/test_pipe/src/main.c b/samples/microkernel/test/test_pipe/src/main.c index ce37a2cac56..4d2e6e9ac9c 100644 --- a/samples/microkernel/test/test_pipe/src/main.c +++ b/samples/microkernel/test/test_pipe/src/main.c @@ -42,20 +42,14 @@ these semaphores until it detects a failure or the completion of all test tasks, then announces the result of the test. */ -/* includes */ - #include #include -/* defines */ - #define NUM_TEST_TASKS 2 /* # of test tasks to monitor */ /* # ticks to wait for test completion */ #define TIMEOUT (60 * sys_clock_ticks_per_sec) -/* locals */ - /* * Note that semaphore group entries are arranged so that resultSems[TC_PASS] * refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL. @@ -63,8 +57,6 @@ then announces the result of the test. static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST }; -/* globals */ - ksem_t regSem = REGRESSION_SEM; ksem_t altSem = ALTERNATE_SEM; ksem_t counterSem = COUNTER_SEM; diff --git a/samples/microkernel/test/test_pipe/src/pipe.c b/samples/microkernel/test/test_pipe/src/pipe.c index ec239b32b9e..7c72d83e3e6 100644 --- a/samples/microkernel/test/test_pipe/src/pipe.c +++ b/samples/microkernel/test/test_pipe/src/pipe.c @@ -41,24 +41,18 @@ The following target pipe routine does not yet have a test case: task_pipe_put_async() */ -/* includes */ - #include #include #include #include #include -/* defines */ - #define ONE_SECOND (sys_clock_ticks_per_sec) #define IRQ_PRIORITY 3 #define PIPE_SIZE 256 /* This must match the value in the VPF file */ -/* typedefs */ - typedef struct { int size; /* number of bytes to send/receive */ K_PIPE_OPTION options; /* options for task_pipe_XXX() APIs */ @@ -66,9 +60,6 @@ typedef struct { int rcode; /* expected return code */ } SIZE_EXPECT; -/* locals */ - - static char txBuffer[PIPE_SIZE + 32]; static char rxBuffer[PIPE_SIZE + 32]; @@ -159,8 +150,6 @@ static SIZE_EXPECT timeout_cases[] = { {PIPE_SIZE + 1, _0_TO_N, 0, RC_FAIL} }; -/* globals */ - extern ksem_t regSem; extern ksem_t altSem; extern ksem_t counterSem; diff --git a/samples/microkernel/test/test_pool/src/pool.c b/samples/microkernel/test/test_pool/src/pool.c index 220a1d025d6..06bdabd8eed 100644 --- a/samples/microkernel/test/test_pool/src/pool.c +++ b/samples/microkernel/test/test_pool/src/pool.c @@ -38,16 +38,12 @@ This modules tests the following memory pool routines: task_mem_pool_free() */ -/* includes */ - #include #include #include #include #include -/* defines */ - #define ONE_SECOND (sys_clock_ticks_per_sec) #define TENTH_SECOND (sys_clock_ticks_per_sec / 10) @@ -55,8 +51,6 @@ This modules tests the following memory pool routines: #define DEFRAG_BLK_TEST 2222 -/* typedefs */ - typedef struct { struct k_block *block; /* pointer to block data */ kmemory_pool_t poolId; /* pool ID */ @@ -68,8 +62,6 @@ typedef struct { typedef int (*poolBlockGetFunc_t)(struct k_block *, kmemory_pool_t, int, int32_t); typedef int (*poolMoveBlockFunc_t)(struct k_block *, kmemory_pool_t); -/* locals */ - static volatile int evidence = 0; static struct k_block blockList[NUM_BLOCKS]; diff --git a/samples/microkernel/test/test_sema/src/main.c b/samples/microkernel/test/test_sema/src/main.c index 215c4c20ee4..8478294f639 100644 --- a/samples/microkernel/test/test_sema/src/main.c +++ b/samples/microkernel/test/test_sema/src/main.c @@ -42,8 +42,6 @@ these semaphores until it detects a failure or the completion of all test tasks, then announces the result of the test. */ -/* includes */ - #include #include #include @@ -58,12 +56,8 @@ then announces the result of the test. extern void testFiberInit(void); extern struct nano_sem fiberSem; /* semaphore that allows test control the fiber */ -/* defines */ - #define NUM_TEST_TASKS 4 /* # of test tasks to monitor */ -/* locals */ - static ksem_t testIsrInfo; static CMD_PKT_SET_INSTANCE(cmdPktSet, 2) @@ -75,8 +69,6 @@ static CMD_PKT_SET_INSTANCE(cmdPktSet, 2) static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST }; -/* globals */ - ksem_t simpleSem = SIMPLE_SEM; ksem_t altSem = ALTTASK_SEM; ksem_t hpSem = HIGH_PRI_SEM; diff --git a/samples/microkernel/test/test_sema/src/sema.c b/samples/microkernel/test/test_sema/src/sema.c index 4cf1433b565..c597c47b828 100644 --- a/samples/microkernel/test/test_sema/src/sema.c +++ b/samples/microkernel/test/test_sema/src/sema.c @@ -41,8 +41,6 @@ This modules tests the following semaphore routines: isr_sem_give(), fiber_sem_give() */ -/* includes */ - #include #include #include @@ -53,7 +51,6 @@ This modules tests the following semaphore routines: extern void trigger_isrSemaSignal(ksem_t semaphore); extern void releaseTestFiber(void); -/* defines */ #define N_TESTS 10 /* number of tests to run */ #define OBJ_TIMEOUT SECONDS(1) diff --git a/samples/microkernel/test/test_sema/src/test_fiber.c b/samples/microkernel/test/test_sema/src/test_fiber.c index 7f459704d4c..612408a4b28 100644 --- a/samples/microkernel/test/test_sema/src/test_fiber.c +++ b/samples/microkernel/test/test_sema/src/test_fiber.c @@ -36,12 +36,10 @@ The module implements functions for the fiber that tests semaphore signaling */ -/* includes */ #include #include #include -/* defines */ #define N_TESTS 10 /* number of tests to run */ #define FIBER_PRIORITY 6 #define FIBER_STACK_SIZE 1024 @@ -49,7 +47,6 @@ semaphore signaling /* exports */ struct nano_sem fiberSem; /* semaphore that allows test control the fiber */ -/* locals */ extern ksem_t simpleSem; extern ksem_t semList[]; diff --git a/samples/microkernel/test/test_sprintf/src/test_sprintf.c b/samples/microkernel/test/test_sprintf/src/test_sprintf.c index 02805f30384..42a19db6226 100644 --- a/samples/microkernel/test/test_sprintf/src/test_sprintf.c +++ b/samples/microkernel/test/test_sprintf/src/test_sprintf.c @@ -35,13 +35,9 @@ DESCRIPTION This module contains the code for testing sprintf() functionality. */ -/* includes */ - #include #include -/* defines */ - #define DEADBEEF 0xdeadbeef #define DEADBEEF_LHEX_ALT_STR "0xdeadbeef" @@ -68,8 +64,6 @@ This module contains the code for testing sprintf() functionality. #define PRINTF_MAX_STRING_LENGTH 200 -/* typedefs */ - typedef union { double d; struct { diff --git a/samples/microkernel/test/test_stackprot/src/stackprot.c b/samples/microkernel/test/test_stackprot/src/stackprot.c index cc49df06eb3..d1c6bac00db 100644 --- a/samples/microkernel/test/test_stackprot/src/stackprot.c +++ b/samples/microkernel/test/test_stackprot/src/stackprot.c @@ -46,20 +46,15 @@ DESCRIPTION prints out a short string couple times. */ -/* includes */ #include #ifdef CONFIG_MICROKERNEL #include -/* locals */ - #else #include -/* defines */ #define STACKSIZE 1024 -/* locals */ char __stack fiberStack[STACKSIZE]; #endif /* CONFIG_MICROKERNEL */ @@ -67,7 +62,6 @@ char __stack fiberStack[STACKSIZE]; static int count = 0; static int tcRC = TC_PASS; -/* forward declarations */ void check_input(const char *name, const char *input); /******************************************************************************* diff --git a/samples/microkernel/test/test_static_idt/src/static_idt.c b/samples/microkernel/test/test_static_idt/src/static_idt.c index 897c81fc0dc..8480e978692 100644 --- a/samples/microkernel/test/test_static_idt/src/static_idt.c +++ b/samples/microkernel/test/test_static_idt/src/static_idt.c @@ -35,8 +35,6 @@ DESCRIPTION Ensures interrupt and exception stubs are installed correctly. */ -/* includes */ - #include #include @@ -52,8 +50,6 @@ Ensures interrupt and exception stubs are installed correctly. #include #endif -/* defines */ - /* These vectors are somewhat arbitrary. We try and use unused vectors */ #define TEST_SOFT_INT 62 #define TEST_SPUR_INT 63 @@ -69,8 +65,6 @@ extern void *exc_divide_error_handlerStub; NANO_CPU_INT_REGISTER(nanoIntStub, TEST_SOFT_INT, 0); -/* locals */ - static volatile int excHandlerExecuted; static volatile int intHandlerExecuted; /* Assume the spurious interrupt handler will execute and abort the task/fiber */ diff --git a/samples/microkernel/test/test_task/src/task.c b/samples/microkernel/test/test_task/src/task.c index 55a67cb458e..64032dd2de4 100644 --- a/samples/microkernel/test/test_task/src/task.c +++ b/samples/microkernel/test/test_task/src/task.c @@ -38,8 +38,6 @@ This module tests the following task APIs: task_sleep(), task_yield() */ -/* includes */ - #include #include #include @@ -50,8 +48,6 @@ This module tests the following task APIs: #include #include -/* defines */ - #define RT_PRIO 10 /* RegressionTask prio - must match prj.vpf */ #define HT_PRIO 20 /* HelperTask prio - must match prj.vpf */ @@ -60,15 +56,11 @@ This module tests the following task APIs: #define CMD_TASKID 0 #define CMD_PRIORITY 1 -/* typedefs */ - typedef struct { int cmd; int data; } ISR_INFO; -/* locals */ - static vvfn _trigger_isrTaskCommand = (vvfn)sw_isr_trigger_0; static ISR_INFO isrInfo; diff --git a/samples/microkernel/test/test_task_irq/src/main.c b/samples/microkernel/test/test_task_irq/src/main.c index 963ed1a0f66..c87148518e7 100644 --- a/samples/microkernel/test/test_task_irq/src/main.c +++ b/samples/microkernel/test/test_task_irq/src/main.c @@ -48,8 +48,6 @@ /* # ticks to wait for test completion */ #define TIMEOUT (60 * sys_clock_ticks_per_sec) -/* locals */ - static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST }; static ksem_t rdySem = SEM_RDY; diff --git a/samples/microkernel/test/test_timer/src/timer.c b/samples/microkernel/test/test_timer/src/timer.c index b633b77104d..99300b3533c 100644 --- a/samples/microkernel/test/test_timer/src/timer.c +++ b/samples/microkernel/test/test_timer/src/timer.c @@ -39,8 +39,6 @@ This module tests the following ukernel timer routines: task_tick_delta(), task_tick_get_32() */ -/* includes */ - #include #include @@ -51,8 +49,6 @@ extern struct nano_lifo _k_timer_free; /* For white box testing only */ #define WITHIN_ERROR(var, target, epsilon) \ (((var) >= (target)) && ((var) <= (target) + (epsilon))) -/* locals */ - static ktimer_t pTimer[NTIMERS + 1]; /******************************************************************************* diff --git a/samples/microkernel/test/test_xip/src/test_xip.c b/samples/microkernel/test/test_xip/src/test_xip.c index f90dd380d1a..a4f0814e48f 100644 --- a/samples/microkernel/test/test_xip/src/test_xip.c +++ b/samples/microkernel/test/test_xip/src/test_xip.c @@ -38,8 +38,6 @@ working. However, the test does do some some testing on global variables for completeness sake. */ -/* includes */ - #include #include #include "test.h" diff --git a/samples/microkernel/test/test_xip/src/test_xip_helper.c b/samples/microkernel/test/test_xip/src/test_xip_helper.c index 550293587e4..83c8b151ce5 100644 --- a/samples/microkernel/test/test_xip/src/test_xip_helper.c +++ b/samples/microkernel/test/test_xip/src/test_xip_helper.c @@ -36,8 +36,6 @@ This module contains support code for the XIP regression test. */ -/* includes */ - #include #include "test.h" diff --git a/samples/nanokernel/benchmark/footprint/src/nanokernel_footprint.c b/samples/nanokernel/benchmark/footprint/src/nanokernel_footprint.c index 2f57cdee9d2..53556dbdcc0 100644 --- a/samples/nanokernel/benchmark/footprint/src/nanokernel_footprint.c +++ b/samples/nanokernel/benchmark/footprint/src/nanokernel_footprint.c @@ -37,8 +37,6 @@ volatile int i = 0; /* counter used by background task */ #ifndef TEST_min -/* includes */ - #include #include #include @@ -51,8 +49,6 @@ volatile int i = 0; /* counter used by background task */ #endif /* __GNUC__ */ #endif /* TEST_reg */ -/* defines */ - #define IRQ_PRIORITY 3 #define TEST_SOFT_INT 64 @@ -68,8 +64,6 @@ volatile int i = 0; /* counter used by background task */ #define MESSAGE "Running regular nanokernel configuration\n" #endif /* TEST_max */ -/* typedefs */ - typedef void* (*pfunc) (void*); /* variables */ diff --git a/samples/nanokernel/test/test_arm_m3_irq_vector_table/src/main.c b/samples/nanokernel/test/test_arm_m3_irq_vector_table/src/main.c index 138bce98ac3..5f4b7f2b111 100644 --- a/samples/nanokernel/test/test_arm_m3_irq_vector_table/src/main.c +++ b/samples/nanokernel/test/test_arm_m3_irq_vector_table/src/main.c @@ -39,8 +39,6 @@ semaphores. The ISRs are installed at build time, directly in the vector table. */ -/* includes */ - #if !defined(CONFIG_CPU_CORTEXM3) #error project can only run on Cortex-M3 #endif diff --git a/samples/nanokernel/test/test_context/src/context.c b/samples/nanokernel/test/test_context/src/context.c index d453ff140a2..0357996df72 100644 --- a/samples/nanokernel/test/test_context/src/context.c +++ b/samples/nanokernel/test/test_context/src/context.c @@ -41,8 +41,6 @@ This module tests the following CPU and context related routines: irq_enable(), irq_disable(), */ -/* includes */ - #include #include #include @@ -61,8 +59,6 @@ This module tests the following CPU and context related routines: #include #endif -/* defines */ - #define FIBER_STACKSIZE 2000 #define FIBER_PRIORITY 4 @@ -88,8 +84,6 @@ This module tests the following CPU and context related routines: #error Timer type is not defined for this BSP #endif -/* typedefs */ - typedef struct { int command; /* command to process */ int error; /* error value (if any) */ @@ -102,8 +96,6 @@ typedef struct { typedef int (* disable_interrupt_func)(int); typedef void (* enable_interrupt_func)(int); -/* locals */ - /* Cortex-M3 does not implement connecting non-IRQ exception handlers */ #if !defined(CONFIG_CPU_CORTEXM3) static NANO_CPU_EXC_STUB_DECL(nanoExcStub); diff --git a/samples/nanokernel/test/test_fifo/src/fifo.c b/samples/nanokernel/test/test_fifo/src/fifo.c index 87e0dc7d1bb..c3998ce2eec 100644 --- a/samples/nanokernel/test/test_fifo/src/fifo.c +++ b/samples/nanokernel/test/test_fifo/src/fifo.c @@ -61,8 +61,6 @@ the queue and puts and gets one last item to the queue. All these are run in ISR context. */ -/* includes */ - #include #include @@ -72,8 +70,6 @@ in ISR context. #include #include -/* defines */ - #define STACKSIZE 2048 #define NUM_FIFO_ELEMENT 4 #define INVALID_DATA NULL @@ -82,15 +78,11 @@ in ISR context. #define TCERR2 TC_ERROR("Didn't get back correct FIFO\n") #define TCERR3 TC_ERROR("The queue should be empty!\n") -/* typedefs */ - typedef struct { struct nano_fifo *channel; /* FIFO channel */ void *data; /* pointer to data to add */ } ISR_FIFO_INFO; -/* globals */ - char __stack fiberStack1[STACKSIZE]; char __stack fiberStack2[STACKSIZE]; char __stack fiberStack3[STACKSIZE]; @@ -132,15 +124,11 @@ void * const pPutList2[NUM_FIFO_ELEMENT] = { int retCode = TC_PASS; -/* locals */ - static ISR_FIFO_INFO isrFifoInfo = {&nanoFifoObj, NULL}; static void (*_trigger_nano_isr_fifo_put)(void) = (vvfn)sw_isr_trigger_0; static void (*_trigger_nano_isr_fifo_get)(void) = (vvfn)sw_isr_trigger_1; -/* forward declarations */ - void fiber1(void); void fiber2(void); void fiber3(void); diff --git a/samples/nanokernel/test/test_lifo/src/lifo.c b/samples/nanokernel/test/test_lifo/src/lifo.c index 241a53e4ab1..19161b05718 100644 --- a/samples/nanokernel/test/test_lifo/src/lifo.c +++ b/samples/nanokernel/test/test_lifo/src/lifo.c @@ -52,8 +52,6 @@ Scenario #3: These scenarios will be tested using a combinations of tasks, fibers and ISRs. */ -/* includes */ - #include #include @@ -63,13 +61,9 @@ These scenarios will be tested using a combinations of tasks, fibers and ISRs. #include #include -/* defines */ - #define FIBER_STACKSIZE 2000 #define FIBER_PRIORITY 4 -/* typedefs */ - typedef struct { struct nano_lifo *channel; /* LIFO channel */ void *data; /* pointer to data to add */ @@ -80,8 +74,6 @@ typedef struct { uint32_t data; /* miscellaneous data put on LIFO (not important) */ } LIFO_ITEM; -/* locals */ - /* Items to be added/removed from LIFO during the test */ static LIFO_ITEM lifoItem[4] = { {0, 1}, diff --git a/samples/nanokernel/test/test_sema/src/sema.c b/samples/nanokernel/test/test_sema/src/sema.c index c0c7b70caf3..9a68bd3e33a 100644 --- a/samples/nanokernel/test/test_sema/src/sema.c +++ b/samples/nanokernel/test/test_sema/src/sema.c @@ -50,8 +50,6 @@ Scenario #3: Multiple fibers pend on the same semaphore. */ -/* includes */ - #include #include @@ -61,13 +59,9 @@ Scenario #3: #include #include -/* defines */ - #define FIBER_STACKSIZE 2000 #define FIBER_PRIORITY 4 -/* typedefs */ - typedef struct { struct nano_sem *sem; /* ptr to semaphore */ int data; /* data */ @@ -80,8 +74,6 @@ typedef enum { STS_ISR_WOKE_TASK } SEM_TEST_STATE; -/* locals */ - static SEM_TEST_STATE semTestState; static ISR_SEM_INFO isrSemInfo; static struct nano_sem testSem; diff --git a/samples/nanokernel/test/test_stack/src/stack.c b/samples/nanokernel/test/test_stack/src/stack.c index d608c92a41b..8875d270846 100644 --- a/samples/nanokernel/test/test_stack/src/stack.c +++ b/samples/nanokernel/test/test_stack/src/stack.c @@ -60,8 +60,6 @@ it popped all data from queue1, push and pop one last item to the queue. All these are run in ISR context. */ -/* includes */ - #include #include @@ -71,7 +69,6 @@ these are run in ISR context. #include #include -/* defines */ #define STACKSIZE 2048 #define NUM_STACK_ELEMENT 4 #define STARTNUM 1 /* Used to compute data to put in the stack */ @@ -83,16 +80,12 @@ these are run in ISR context. #define TCERR2 TC_ERROR("Didn't get back correct data\n") #define TCERR3 TC_ERROR("The stack should be empty!\n") -/* typedefs */ - typedef struct { struct nano_stack *channel; /* STACK channel */ uint32_t data; /* data to add */ } ISR_STACK_INFO; -/* globals */ - char fiberStack1[STACKSIZE]; char fiberStack2[STACKSIZE]; char fiberStack3[STACKSIZE]; @@ -115,15 +108,11 @@ uint32_t stack2[NUM_STACK_ELEMENT]; void *timerData[1]; int retCode = TC_PASS; -/* locals */ - static ISR_STACK_INFO isrStackInfo = {&nanoStackObj, 0}; static void (*_trigger_nano_isr_stack_push)(void) = (vvfn)sw_isr_trigger_0; static void (*_trigger_nano_isr_stack_pop)(void) = (vvfn)sw_isr_trigger_1; -/* forward declarations */ - void initData(void); void fiber1(void); void fiber2(void); diff --git a/samples/nanokernel/test/test_timer/src/timer.c b/samples/nanokernel/test/test_timer/src/timer.c index b7f56fde8a6..6f9e9590875 100644 --- a/samples/nanokernel/test/test_timer/src/timer.c +++ b/samples/nanokernel/test/test_timer/src/timer.c @@ -39,13 +39,9 @@ This module tests the following timer related routines: nano_time_init(), nano_tick_get_32(), nano_cycle_get_32(), nano_tick_delta() */ -/* includes */ - #include #include -/* defines */ - #define TWO_SECONDS (2 * sys_clock_ticks_per_sec) #define SIX_SECONDS (6 * sys_clock_ticks_per_sec) @@ -59,15 +55,11 @@ This module tests the following timer related routines: #define FIBER2_STACKSIZE 2000 #define FIBER2_PRIORITY 10 -/* typedefs */ - typedef void (* timer_start_func)(struct nano_timer *, int); typedef void (* timer_stop_func)(struct nano_timer *); typedef void* (* timer_getw_func)(struct nano_timer *); typedef void* (* timer_get_func)(struct nano_timer *); -/* locals */ - static struct nano_timer timer; static struct nano_timer shortTimer; static struct nano_timer longTimer;