diff --git a/arch/avr/src/common/up_assert.c b/arch/avr/src/common/up_assert.c index 6849a00e78..2bba6afa40 100644 --- a/arch/avr/src/common/up_assert.c +++ b/arch/avr/src/common/up_assert.c @@ -60,6 +60,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* USB trace dumping */ #ifndef CONFIG_USBDEV_TRACE diff --git a/arch/hc/src/m9s12/m9s12_assert.c b/arch/hc/src/m9s12/m9s12_assert.c index 52bcb62a3f..4bad193009 100644 --- a/arch/hc/src/m9s12/m9s12_assert.c +++ b/arch/hc/src/m9s12/m9s12_assert.c @@ -93,11 +93,13 @@ static void up_stackdump(uint16_t sp, uint16_t stack_base) for (stack = sp; stack < stack_base; stack += 16) { - uint8_t *ptr = (uint8_t*)stack; + uint8_t *ptr = (uint8_t *)stack; + _alert("%04x: %02x %02x %02x %02x %02x %02x %02x %02x" " %02x %02x %02x %02x %02x %02x %02x %02x\n", - stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], - ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]); + stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], + ptr[5], ptr[6], ptr[7], ptr[8], ptr[9], ptr[10], + ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]); } } #else @@ -130,23 +132,22 @@ static inline void up_registerdump(void) _alert("SP:%02x%02x FRAME:%02x%02x TMP:%02x%02x Z:%02x%02x XY:%02x\n", regs[REG_SPH], regs[REG_SPL], regs[REG_FRAMEH], regs[REG_FRAMEL], regs[REG_TMPL], regs[REG_TMPH], regs[REG_ZL], regs[REG_ZH], - regs[REG_XY], regs[REG_XY+1]); + regs[REG_XY], regs[REG_XY + 1]); #if CONFIG_HCS12_MSOFTREGS > 2 # error "Need to save more registers" #elif CONFIG_HCS12_MSOFTREGS == 2 _alert("SOFTREGS: %02x%02x :%02x%02x\n", - regs[REG_SOFTREG1], regs[REG_SOFTREG1+1], - regs[REG_SOFTREG2], regs[REG_SOFTREG2+1]); + regs[REG_SOFTREG1], regs[REG_SOFTREG1 + 1], + regs[REG_SOFTREG2], regs[REG_SOFTREG2 + 1]); #elif CONFIG_HCS12_MSOFTREGS == 1 _alert("SOFTREGS: %02x%02x\n", - regs[REG_SOFTREG1], regs[REG_SOFTREG1+1]); + regs[REG_SOFTREG1], regs[REG_SOFTREG1 + 1]); #endif #ifndef CONFIG_HCS12_NONBANKED - _alert("PPAGE: %02x\n", regs[REG_PPAGE]); + _alert("PPAGE: %02x\n", regs[REG_PPAGE]); #endif - } } #else # define up_registerdump() @@ -295,19 +296,19 @@ static void _up_assert(int errorcode) if (g_current_regs || (running_task())->flink == NULL) { - up_irq_save(); - for (;;) - { + up_irq_save(); + for (; ; ) + { #if CONFIG_BOARD_RESET_ON_ASSERT >= 1 - board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); + board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); #endif #ifdef CONFIG_ARCH_LEDS - board_autoled_on(LED_PANIC); - up_mdelay(250); - board_autoled_off(LED_PANIC); - up_mdelay(250); + board_autoled_on(LED_PANIC); + up_mdelay(250); + board_autoled_off(LED_PANIC); + up_mdelay(250); #endif - } + } } else { diff --git a/arch/misoc/src/lm32/lm32_assert.c b/arch/misoc/src/lm32/lm32_assert.c index 85b970e50a..2f56aa75cc 100644 --- a/arch/misoc/src/lm32/lm32_assert.c +++ b/arch/misoc/src/lm32/lm32_assert.c @@ -94,19 +94,19 @@ static void _up_assert(int errorcode) if (g_current_regs || running_task()->flink == NULL) { - up_irq_save(); - for (; ; ) - { + up_irq_save(); + for (; ; ) + { #if CONFIG_BOARD_RESET_ON_ASSERT >= 1 - board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); + board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); #endif #ifdef CONFIG_ARCH_LEDS - board_autoled_on(LED_PANIC); - up_mdelay(250); - board_autoled_off(LED_PANIC); - up_mdelay(250); + board_autoled_on(LED_PANIC); + up_mdelay(250); + board_autoled_off(LED_PANIC); + up_mdelay(250); #endif - } + } } else { diff --git a/arch/misoc/src/minerva/minerva_assert.c b/arch/misoc/src/minerva/minerva_assert.c index fd806dd1ed..e67c13c90a 100644 --- a/arch/misoc/src/minerva/minerva_assert.c +++ b/arch/misoc/src/minerva/minerva_assert.c @@ -85,11 +85,11 @@ static void _up_assert(int errorcode) syslog_flush(); - /* Are we in an interrupt handler or the idle task? NOTE: You cannot use the - * PID to determine if this is an IDLE task. In the SMP case, there may be - * multiple IDLE tasks with different PIDs. The only consistent way to test - * for the IDLE task is to check it is at the end of the list (flink == - * NULL) + /* Are we in an interrupt handler or the idle task? NOTE: You cannot use + * the PID to determine if this is an IDLE task. In the SMP case, there + * may be multiple IDLE tasks with different PIDs. The only consistent + * way to test for the IDLE task is to check it is at the end of the list + * (flink == NULL) */ if (g_current_regs || running_task()->flink == NULL) diff --git a/arch/renesas/src/common/up_assert.c b/arch/renesas/src/common/up_assert.c index 69a6ef1894..6d9ad53908 100644 --- a/arch/renesas/src/common/up_assert.c +++ b/arch/renesas/src/common/up_assert.c @@ -90,19 +90,19 @@ static void _up_assert(int errorcode) if (g_current_regs || running_task()->flink == NULL) { - up_irq_save(); - for (;;) - { + up_irq_save(); + for (; ; ) + { #if CONFIG_BOARD_RESET_ON_ASSERT >= 1 - board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); + board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); #endif #ifdef CONFIG_ARCH_LEDS - board_autoled_on(LED_PANIC); - up_mdelay(250); - board_autoled_off(LED_PANIC); - up_mdelay(250); + board_autoled_on(LED_PANIC); + up_mdelay(250); + board_autoled_off(LED_PANIC); + up_mdelay(250); #endif - } + } } else { diff --git a/arch/x86/src/common/up_assert.c b/arch/x86/src/common/up_assert.c index 8b5e0d9659..0da152befb 100644 --- a/arch/x86/src/common/up_assert.c +++ b/arch/x86/src/common/up_assert.c @@ -60,6 +60,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* USB trace dumping */ #ifndef CONFIG_USBDEV_TRACE @@ -93,7 +94,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { - uint32_t *ptr = (uint32_t*)stack; + uint32_t *ptr = (uint32_t *)stack; _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); @@ -147,7 +148,7 @@ static void up_dumpstate(void) if (g_current_regs != NULL) { - up_registerdump((uint32_t*)g_current_regs); + up_registerdump((uint32_t *)g_current_regs); } else { @@ -256,19 +257,19 @@ static void _up_assert(int errorcode) if (g_current_regs || (running_task())->flink == NULL) { - up_irq_save(); - for (;;) - { + up_irq_save(); + for (; ; ) + { #if CONFIG_BOARD_RESET_ON_ASSERT >= 1 - board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); + board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); #endif #ifdef CONFIG_ARCH_LEDS - board_autoled_on(LED_PANIC); - up_mdelay(250); - board_autoled_off(LED_PANIC); - up_mdelay(250); + board_autoled_on(LED_PANIC); + up_mdelay(250); + board_autoled_off(LED_PANIC); + up_mdelay(250); #endif - } + } } else { diff --git a/drivers/usbdev/usbdev_trace.c b/drivers/usbdev/usbdev_trace.c index 9b45903134..202c22f548 100644 --- a/drivers/usbdev/usbdev_trace.c +++ b/drivers/usbdev/usbdev_trace.c @@ -118,11 +118,12 @@ static int usbtrace_syslog(const char *fmt, ...) * Name: usbtrace_enable * * Description: - * Enable/disable tracing per trace ID. The initial state is all IDs enabled. + * Enable/disable tracing per trace ID. The initial state is all IDs + * enabled. * * Input Parameters: - * idset - The bitset of IDs to be masked. TRACE_ALLIDS enables all IDS; zero - * masks all IDs. + * idset - The bitset of IDs to be masked. TRACE_ALLIDS enables all IDS; + * zero masks all IDs. * * Returned Value: * The previous idset value.