diff --git a/arch/x86/core/nanofloat.c b/arch/x86/core/nanofloat.c index a64cc1e2123..b6096da921f 100644 --- a/arch/x86/core/nanofloat.c +++ b/arch/x86/core/nanofloat.c @@ -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 diff --git a/include/nanokernel/x86/arch.h b/include/nanokernel/x86/arch.h index b656ec8e769..98d440fe7d7 100644 --- a/include/nanokernel/x86/arch.h +++ b/include/nanokernel/x86/arch.h @@ -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" : diff --git a/include/nanokernel/x86/k_mem-other.h b/include/nanokernel/x86/k_mem-other.h index a512efe4bbd..2a6fa54e702 100644 --- a/include/nanokernel/x86/k_mem-other.h +++ b/include/nanokernel/x86/k_mem-other.h @@ -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 diff --git a/samples/microkernel/benchmark/latency_measure/src/timestamp.h b/samples/microkernel/benchmark/latency_measure/src/timestamp.h index 7e89861be1f..788b2529cc6 100644 --- a/samples/microkernel/benchmark/latency_measure/src/timestamp.h +++ b/samples/microkernel/benchmark/latency_measure/src/timestamp.h @@ -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__) diff --git a/samples/microkernel/test/test_fifo/src/fifo.c b/samples/microkernel/test/test_fifo/src/fifo.c index c3599455788..3dfab5d481a 100644 --- a/samples/microkernel/test/test_fifo/src/fifo.c +++ b/samples/microkernel/test/test_fifo/src/fifo.c @@ -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: diff --git a/samples/nanokernel/test/test_fifo/src/fifo.c b/samples/nanokernel/test/test_fifo/src/fifo.c index 68ead02c097..58480058866 100644 --- a/samples/nanokernel/test/test_fifo/src/fifo.c +++ b/samples/nanokernel/test/test_fifo/src/fifo.c @@ -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; diff --git a/samples/nanokernel/test/test_stack/src/stack.c b/samples/nanokernel/test/test_stack/src/stack.c index 76781e4aaff..0e06da09b5e 100644 --- a/samples/nanokernel/test/test_stack/src/stack.c +++ b/samples/nanokernel/test/test_stack/src/stack.c @@ -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;