Fix spaces around parentheses

This commit deletes spaces after open parentheses '(' and spaces before
close paratheses ')'.

This modification were done with the following script:

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
	# fixing spaces after open parethesis
	for line in $(eval $checkpatch_script $file | grep "ERROR:SPACING: space prohibited after that open parenthesis '('" | cut -d":" -f2)
	do
		sed -i -r -e ''$line' { s/\([ \t]*/\(/g }' $file;
	done;

	# fixing spaces before close parethesis
	for line in $(eval $checkpatch_script $file | grep "ERROR:SPACING: space prohibited before that close parenthesis ')'" | cut -d":" -f2)
	do
		sed -i -r -e ''$line' { s/[ \t]*\)/\)/g }' $file;
	done;
done;

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Change-Id: I4482fc50ec45542afa2e60c5f2fef4e75fb24dd3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-15 13:20:08 -05:00 committed by Anas Nashif
parent 16a2c5800d
commit f7df273f8c
7 changed files with 23 additions and 23 deletions

View file

@ -178,14 +178,14 @@ static void _FpCtxSave(tCCS *ccs)
__asm volatile void _FpCtxSave(tCCS *ccs)
{
% mem ccs !"ax", "cx" movl ccs,
% eax leal __tCCS_preempFloatReg_OFFSET( % eax),
% eax leal __tCCS_preempFloatReg_OFFSET(% eax),
% ecx /* &preempFloatReg */
#ifdef CONFIG_SSE
testl $0x20,
__tCCS_flags_OFFSET( % eax) jz 0f fxsave( % ecx) jmp 1f 0
: fnsave( % ecx)1 :
__tCCS_flags_OFFSET(% eax) jz 0f fxsave(% ecx) jmp 1f 0
: fnsave(% ecx)1 :
#else
fnsave( % ecx)
fnsave(% ecx)
#endif /* CONFIG_SSE */
}
#endif
@ -227,7 +227,7 @@ __asm volatile void _FpCtxInit(tCCS *ccs)
#ifdef CONFIG_SSE
movl ccs,
% eax testl $0x20,
__tCCS_flags_OFFSET( % eax) jz 0f
__tCCS_flags_OFFSET(% eax) jz 0f
/* initialize SSE (since context uses it) */
ldmxcsr _Mxcsr

View file

@ -218,7 +218,7 @@ static inline uint64_t _NanoTscRead(void)
} rv;
/* rdtsc & cpuid clobbers eax, ebx, ecx and edx registers */
__asm__ volatile ( /* serialize */
__asm__ volatile (/* serialize */
"xorl %%eax,%%eax;\n\t"
"cpuid;\n\t"
:

View file

@ -58,7 +58,7 @@ done:
#endif /* CONFIG_UNALIGNED_WRITE_UNSUPPORTED */
}
__asm volatile void k_memset( void *_d, int _v, size_t _n)
__asm volatile void k_memset(void *_d, int _v, size_t _n)
{
#ifndef CONFIG_UNALIGNED_WRITE_UNSUPPORTED
% mem _d, _v, _n; lab unaligned, done

View file

@ -99,7 +99,7 @@ static inline uint32_t TIME_STAMP_DELTA_GET (uint32_t ts)
/* serialize so OS_GET_TIME() is not reordered */
#if defined(__GNUC__)
__asm__ __volatile__ ( /* serialize */ \
__asm__ __volatile__ (/* serialize */ \
"xorl %%eax,%%eax \n cpuid" \
::: "%eax", "%ebx", "%ecx", "%edx");
#elif defined(__DCC__)

View file

@ -153,7 +153,7 @@ int fillFIFO(kfifo_t queue, int numElements)
int result = TC_PASS; /* TC_PASS or TC_FAIL for this function */
int retValue; /* return value from task_fifo_xxx APIs */
for (int i = 0; i < numElements; i++ ) {
for (int i = 0; i < numElements; i++) {
retValue = task_fifo_put(queue, &myData[i]);
switch (retValue) {
case RC_OK:

View file

@ -229,10 +229,10 @@ void fiber1(void)
TC_PRINT("Test Fiber FIFO Get\n\n");
/* Get all FIFOs */
while ( (pData = nano_fiber_fifo_get(&nanoFifoObj)) != NULL )
while ((pData = nano_fiber_fifo_get(&nanoFifoObj)) != NULL)
{
TC_PRINT("FIBER FIFO Get: count = %d, ptr is %p\n", count, pData);
if( (count >= NUM_FIFO_ELEMENT) || (pData != pPutList1[count]) )
if((count >= NUM_FIFO_ELEMENT) || (pData != pPutList1[count]))
{
TCERR1(count);
retCode = TC_FAIL;
@ -396,10 +396,10 @@ void testIsrFifoFromTask(void)
_trigger_nano_isr_fifo_get();
pGetData = isrFifoInfo.data;
while ( pGetData != NULL )
while (pGetData != NULL)
{
TC_PRINT("Get from queue1: count = %d, ptr is %p\n", count, pGetData);
if ( (count >= NUM_FIFO_ELEMENT) || (pGetData != pPutList1[count]) )
if ((count >= NUM_FIFO_ELEMENT) || (pGetData != pPutList1[count]))
{
TCERR1(count);
retCode = TC_FAIL;
@ -432,7 +432,7 @@ void testIsrFifoFromTask(void)
else
{
TC_PRINT("\nTest ISR FIFO (invoked from Task) - put %p and get back %p\n",
pPutData, pGetData );
pPutData, pGetData);
}
TC_END(retCode, "%s - %s.\n", retCode == TC_PASS ? PASS : FAIL, __func__);
@ -729,10 +729,10 @@ void main(void)
TC_PRINT("Test Task FIFO Get\n");
/* Get all FIFOs */
while ( (pData = nano_task_fifo_get(&nanoFifoObj)) != NULL )
while ((pData = nano_task_fifo_get(&nanoFifoObj)) != NULL)
{
TC_PRINT("TASK FIFO Get: count = %d, ptr is %p\n", count, pData);
if ( (count >= NUM_FIFO_ELEMENT) || (pData != pPutList2[count]) )
if ((count >= NUM_FIFO_ELEMENT) || (pData != pPutList2[count]))
{
TCERR1(count);
retCode = TC_FAIL;

View file

@ -193,7 +193,7 @@ void isr_stack_pop(void *parameter)
{
ISR_STACK_INFO * pInfo = (ISR_STACK_INFO *) parameter;
if ( nano_isr_stack_pop (pInfo->channel, &(pInfo->data)) == 0 )
if (nano_isr_stack_pop (pInfo->channel, &(pInfo->data)) == 0)
{
/* the stack is empty, set data to INVALID_DATA */
pInfo->data = INVALID_DATA;
@ -220,10 +220,10 @@ void fiber1(void)
TC_PRINT("Test Fiber STACK Pop\n\n");
/* Get all data */
while ( nano_fiber_stack_pop(&nanoStackObj, &data) != 0 )
while (nano_fiber_stack_pop(&nanoStackObj, &data) != 0)
{
TC_PRINT("FIBER STACK Pop: count = %d, data is %d\n", count, data);
if( (count >= NUM_STACK_ELEMENT) || (data != myData[NUM_STACK_ELEMENT - 1 - count]) )
if((count >= NUM_STACK_ELEMENT) || (data != myData[NUM_STACK_ELEMENT - 1 - count]))
{
TCERR1(count);
retCode = TC_FAIL;
@ -383,10 +383,10 @@ void testIsrStackFromTask(void)
_trigger_nano_isr_stack_pop();
result = isrStackInfo.data;
while ( result != INVALID_DATA )
while (result != INVALID_DATA)
{
TC_PRINT(" Pop from queue1: count = %d, data is %d\n", count, result);
if ( (count >= NUM_STACK_ELEMENT) || ( result != myIsrData[NUM_STACK_ELEMENT - count - 1] ) )
if ((count >= NUM_STACK_ELEMENT) || (result != myIsrData[NUM_STACK_ELEMENT - count - 1]))
{
TCERR1(count);
retCode = TC_FAIL;
@ -594,10 +594,10 @@ void main(void)
TC_PRINT("Test Task STACK Pop\n");
/* Get all data */
while ( nano_task_stack_pop(&nanoStackObj, &data) != 0 )
while (nano_task_stack_pop(&nanoStackObj, &data) != 0)
{
TC_PRINT("TASK STACK Pop: count = %d, data is %d\n", count, data);
if ( (count >= NUM_STACK_ELEMENT) || ( data != myData[count] ) )
if ((count >= NUM_STACK_ELEMENT) || (data != myData[count]))
{
TCERR1(count);
retCode = TC_FAIL;