From d85179a0cb35bbf8cc5f6fdddbaaa3ff8379e580 Mon Sep 17 00:00:00 2001 From: Yonattan Louise Date: Wed, 15 Apr 2015 13:34:59 -0500 Subject: [PATCH] Fix spaces after #ifdef This commit deletes the exceeded spaces after #ifdef declaration on the line that the checkpatch script mark as having the SPACING error in order to complay with the defined coding style. The script used to perform this fixes was: checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 " cd $VXMICRO_BASE; for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*"); do for line in $(eval $checkpatch_script $file | grep "ERROR:SPACING: exactly one space required after that #ifdef" | cut -d":" -f2) do sed -i -r -e ''$line' { s/^#ifdef[ \t]*/#ifdef /g }' $file; done; done; Signed-off-by: Yonattan Louise Change-Id: Ic9bb67243f91fa3b5aca6288b306f9b4e8c816fe Signed-off-by: Anas Nashif --- samples/microkernel/apps/philosophers/src/phil_fiber.c | 8 ++++---- samples/microkernel/apps/philosophers/src/phil_task.c | 6 +++--- samples/microkernel/benchmark/boot_time/src/boot_time.c | 6 +++--- samples/microkernel/benchmark/latency_measure/src/main.c | 2 +- samples/microkernel/benchmark/latency_measure/src/utils.c | 2 +- samples/microkernel/test/test_fp_sharing/src/main.c | 6 +++--- samples/microkernel/test/test_static_idt/src/static_idt.c | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/samples/microkernel/apps/philosophers/src/phil_fiber.c b/samples/microkernel/apps/philosophers/src/phil_fiber.c index f2b4fc29633..8ea18235eb5 100644 --- a/samples/microkernel/apps/philosophers/src/phil_fiber.c +++ b/samples/microkernel/apps/philosophers/src/phil_fiber.c @@ -31,7 +31,7 @@ */ /* includes */ -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL #include #include "phil.h" #else /* ! CONFIG_NANOKERNEL */ @@ -43,7 +43,7 @@ /* defines */ -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL #define FORK(x) &forks[x] #define TAKE(x) nano_fiber_sem_take_wait(x) #define GIVE(x) nano_fiber_sem_give(x) @@ -57,7 +57,7 @@ #define PRINT(x,y) myPrint(x,y) -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL /* externs */ extern struct nano_sem forks[N_PHILOSOPHERS]; @@ -117,7 +117,7 @@ static void myDelay void philEntry (void) { -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL struct nano_sem *f1; /* fork #1 */ struct nano_sem *f2; /* fork #2 */ #else diff --git a/samples/microkernel/apps/philosophers/src/phil_task.c b/samples/microkernel/apps/philosophers/src/phil_task.c index 3ac0e8b8c11..bff0b4657f6 100644 --- a/samples/microkernel/apps/philosophers/src/phil_task.c +++ b/samples/microkernel/apps/philosophers/src/phil_task.c @@ -32,7 +32,7 @@ /* includes */ -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL #include #include "phil.h" #else @@ -51,7 +51,7 @@ "implementation demonstrates the usage of multiple (6) %s\n" \ "of differing priorities and the %s semaphores and timers." -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL #define STSIZE 1024 @@ -65,7 +65,7 @@ char philStack[N_PHILOSOPHERS][STSIZE]; struct nano_sem forks[N_PHILOSOPHERS]; #endif /* CONFIG_NANOKERNEL */ -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL /******************************************************************************* * * main - nanokernel entry point diff --git a/samples/microkernel/benchmark/boot_time/src/boot_time.c b/samples/microkernel/benchmark/boot_time/src/boot_time.c index 8057833f752..5b223752a64 100644 --- a/samples/microkernel/benchmark/boot_time/src/boot_time.c +++ b/samples/microkernel/benchmark/boot_time/src/boot_time.c @@ -41,7 +41,7 @@ Measure boot time for both nanokernel and microkernel project which includes /* includes */ -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL #include #else #include @@ -88,7 +88,7 @@ void bootTimeTask (void) TC_START ("Boot Time Measurement"); /* Only print lower 32bit of time result */ -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL TC_PRINT("NanoKernel Boot Result: Clock Frequency: %d MHz\n", CONFIG_CPU_CLOCK_FREQ_MHZ); #else /* CONFIG_MICROKERNEL */ @@ -119,7 +119,7 @@ void bootTimeTask (void) } -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL char fiberStack[512]; diff --git a/samples/microkernel/benchmark/latency_measure/src/main.c b/samples/microkernel/benchmark/latency_measure/src/main.c index 815c91c22b0..e7431db4957 100644 --- a/samples/microkernel/benchmark/latency_measure/src/main.c +++ b/samples/microkernel/benchmark/latency_measure/src/main.c @@ -74,7 +74,7 @@ void nanoTest (void) printDashLine (); } -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL /******************************************************************************* * * main - nanokernel-only testing entry point diff --git a/samples/microkernel/benchmark/latency_measure/src/utils.c b/samples/microkernel/benchmark/latency_measure/src/utils.c index 9b7103a148e..95862cf9854 100644 --- a/samples/microkernel/benchmark/latency_measure/src/utils.c +++ b/samples/microkernel/benchmark/latency_measure/src/utils.c @@ -38,7 +38,7 @@ #include "timestamp.h" #include "utils.h" -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL #elif defined (CONFIG_MICROKERNEL) diff --git a/samples/microkernel/test/test_fp_sharing/src/main.c b/samples/microkernel/test/test_fp_sharing/src/main.c index fe9aa14453b..f06da4c3e1c 100644 --- a/samples/microkernel/test/test_fp_sharing/src/main.c +++ b/samples/microkernel/test/test_fp_sharing/src/main.c @@ -320,7 +320,7 @@ void load_store_low(void) * RETURNS: N/A */ -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL void load_store_high(int unused1, int unused2) #else void load_store_high(void) @@ -334,7 +334,7 @@ void load_store_high(void) unsigned char *floatRegisterSetBytePtr = (unsigned char *)&floatRegisterSet; -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL ARG_UNUSED(unused1); ARG_UNUSED(unused2); @@ -397,7 +397,7 @@ void load_store_high(void) * to provide a "clean" FPU state to this context once the sleep ends. */ -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL nano_fiber_timer_start(&fiberTimer, 1); nano_fiber_timer_wait(&fiberTimer); #else 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 a52c6cfd5b4..c55e7b89421 100644 --- a/samples/microkernel/test/test_static_idt/src/static_idt.c +++ b/samples/microkernel/test/test_static_idt/src/static_idt.c @@ -70,7 +70,7 @@ static volatile int intHandlerExecuted; /* Assume the spurious interrupt handler will execute and abort the task/fiber */ static volatile int spurHandlerAbortedContext = 1; -#ifdef CONFIG_NANOKERNEL +#ifdef CONFIG_NANOKERNEL static char fiberStack[512]; #endif