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 <yonattan.a.louise.mendoza@intel.com>
Change-Id: Ic9bb67243f91fa3b5aca6288b306f9b4e8c816fe
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-15 13:34:59 -05:00 committed by Anas Nashif
commit d85179a0cb
7 changed files with 16 additions and 16 deletions

View file

@ -31,7 +31,7 @@
*/
/* includes */
#ifdef CONFIG_NANOKERNEL
#ifdef CONFIG_NANOKERNEL
#include <nanokernel.h>
#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

View file

@ -32,7 +32,7 @@
/* includes */
#ifdef CONFIG_NANOKERNEL
#ifdef CONFIG_NANOKERNEL
#include <nanokernel.h>
#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

View file

@ -41,7 +41,7 @@ Measure boot time for both nanokernel and microkernel project which includes
/* includes */
#ifdef CONFIG_NANOKERNEL
#ifdef CONFIG_NANOKERNEL
#include <nanokernel.h>
#else
#include <vxmicro.h>
@ -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];

View file

@ -74,7 +74,7 @@ void nanoTest (void)
printDashLine ();
}
#ifdef CONFIG_NANOKERNEL
#ifdef CONFIG_NANOKERNEL
/*******************************************************************************
*
* main - nanokernel-only testing entry point

View file

@ -38,7 +38,7 @@
#include "timestamp.h"
#include "utils.h"
#ifdef CONFIG_NANOKERNEL
#ifdef CONFIG_NANOKERNEL
#elif defined (CONFIG_MICROKERNEL)

View file

@ -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

View file

@ -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