mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
Fix nxstyle complaints
This commit is contained in:
parent
d56c613b7d
commit
6eb6d31c32
8 changed files with 31 additions and 26 deletions
|
@ -59,6 +59,7 @@ static inline uint16_t avr_getsp(void)
|
|||
: "=r" (spl), "=r" (sph)
|
||||
:
|
||||
);
|
||||
|
||||
return (uint16_t)sph << 8 | spl;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ static inline uint32_t avr_getsp(void)
|
|||
: "=r" (retval)
|
||||
:
|
||||
);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ static inline uint16_t hc_getsp(void)
|
|||
__asm__
|
||||
(
|
||||
"\tsts %0\n"
|
||||
: "=m"(ret) :
|
||||
: "=m"(ret) :
|
||||
);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ static inline uint32_t misoc_getsp(void)
|
|||
return sp;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_tls_info
|
||||
*
|
||||
|
|
|
@ -90,7 +90,6 @@ static void _up_assert(int errorcode)
|
|||
|
||||
if (g_current_regs || running_task()->flink == NULL)
|
||||
{
|
||||
up_irq_save();
|
||||
for (; ; )
|
||||
{
|
||||
#if CONFIG_BOARD_RESET_ON_ASSERT >= 1
|
||||
|
|
|
@ -69,8 +69,8 @@ static uint8_t s_last_regs[XCPTCONTEXT_REGS];
|
|||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
static inline uint16_t m16c_getusersp(void)
|
||||
{
|
||||
uint8_t *ptr = (uint8_t*) g_current_regs;
|
||||
return (uint16_t)ptr[REG_SP] << 8 | ptr[REG_SP+1];
|
||||
uint8_t *ptr = (uint8_t *) g_current_regs;
|
||||
return (uint16_t)ptr[REG_SP] << 8 | ptr[REG_SP + 1];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -84,9 +84,10 @@ static void m16c_stackdump(uint16_t sp, uint16_t stack_base)
|
|||
|
||||
for (stack = sp & ~7; stack < stack_base; stack += 8)
|
||||
{
|
||||
uint8_t *ptr = (uint8_t*)stack;
|
||||
uint8_t *ptr = (uint8_t *)stack;
|
||||
_alert("%04x: %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]);
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4],
|
||||
ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +97,7 @@ static void m16c_stackdump(uint16_t sp, uint16_t stack_base)
|
|||
|
||||
static inline void m16c_registerdump(void)
|
||||
{
|
||||
uint8_t *ptr = (uint8_t*) g_current_regs;
|
||||
uint8_t *ptr = (uint8_t *) g_current_regs;
|
||||
|
||||
/* Are user registers available from interrupt processing? */
|
||||
|
||||
|
@ -110,17 +111,19 @@ static inline void m16c_registerdump(void)
|
|||
|
||||
/* Dump the interrupt registers */
|
||||
|
||||
_alert("PC: %02x%02x%02x FLG: %02x00%02x FB: %02x%02x SB: %02x%02x SP: %02x%02x\n",
|
||||
ptr[REG_FLGPCHI] & 0xff, ptr[REG_PC], ptr[REG_PC+1],
|
||||
_alert("PC: %02x%02x%02x FLG: %02x00%02x FB: %02x%02x SB: %02x%02x "
|
||||
"SP: %02x%02x\n",
|
||||
ptr[REG_FLGPCHI] & 0xff, ptr[REG_PC], ptr[REG_PC + 1],
|
||||
ptr[REG_FLGPCHI] >> 8, ptr[REG_FLG],
|
||||
ptr[REG_FB], ptr[REG_FB+1],
|
||||
ptr[REG_SB], ptr[REG_SB+1],
|
||||
ptr[REG_SP], ptr[REG_SP+1]);
|
||||
ptr[REG_FB], ptr[REG_FB + 1],
|
||||
ptr[REG_SB], ptr[REG_SB + 1],
|
||||
ptr[REG_SP], ptr[REG_SP + 1]);
|
||||
|
||||
_alert("R0: %02x%02x R1: %02x%02x R2: %02x%02x A0: %02x%02x A1: %02x%02x\n",
|
||||
ptr[REG_R0], ptr[REG_R0+1], ptr[REG_R1], ptr[REG_R1+1],
|
||||
ptr[REG_R2], ptr[REG_R2+1], ptr[REG_R3], ptr[REG_R3+1],
|
||||
ptr[REG_A0], ptr[REG_A0+1], ptr[REG_A1], ptr[REG_A1+1]);
|
||||
_alert("R0: %02x%02x R1: %02x%02x R2: %02x%02x A0: %02x%02x "
|
||||
"A1: %02x%02x\n",
|
||||
ptr[REG_R0], ptr[REG_R0 + 1], ptr[REG_R1], ptr[REG_R1 + 1],
|
||||
ptr[REG_R2], ptr[REG_R2 + 1], ptr[REG_R3], ptr[REG_R3 + 1],
|
||||
ptr[REG_A0], ptr[REG_A0 + 1], ptr[REG_A1], ptr[REG_A1 + 1]);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -159,13 +162,14 @@ void up_dumpstate(void)
|
|||
ustacksize = (uint16_t)rtcb->adj_stack_size;
|
||||
}
|
||||
|
||||
/* Get the limits on the interrupt stack memory. The near RAM memory map is as follows:
|
||||
/* Get the limits on the interrupt stack memory.
|
||||
* The near RAM memory map is as follows:
|
||||
*
|
||||
* 0x00400 - DATA Size: Determined by linker
|
||||
* BSS Size: Determined by linker
|
||||
* Interrupt stack Size: CONFIG_ARCH_INTERRUPTSTACK
|
||||
* Idle stack Size: CONFIG_IDLETHREAD_STACKSIZE
|
||||
* Heap Size: Everything remaining
|
||||
* 0x00400 - DATA Size: Determined by linker
|
||||
* BSS Size: Determined by linker
|
||||
* Interrupt stack Size: CONFIG_ARCH_INTERRUPTSTACK
|
||||
* Idle stack Size: CONFIG_IDLETHREAD_STACKSIZE
|
||||
* Heap Size: Everything remaining
|
||||
* 0x00bff - (end+1)
|
||||
*/
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ static void sh1_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]);
|
||||
|
@ -84,7 +84,7 @@ static void sh1_stackdump(uint32_t sp, uint32_t stack_base)
|
|||
|
||||
static inline void sh1_registerdump(void)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t*)g_current_regs;
|
||||
uint32_t *ptr = (uint32_t *)g_current_regs;
|
||||
|
||||
/* Are user registers available from interrupt processing? */
|
||||
|
||||
|
|
|
@ -111,7 +111,8 @@ uint32_t time_hard_mul(uint32_t a, uint32_t b, uint32_t *t);
|
|||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue