mirror of
https://github.com/apache/nuttx.git
synced 2026-10-07 14:25:25 +00:00
riscv: Remove some unnecessary macro guards
If CONFIG_SMP is not enabled, riscv_cpuindex.c will not be compiled anyway. And for CONFIG_ARCH_FPU, if it's not enabled, riscv_fpucmp.c will not be compiled. So we can remove the unnecessary macro guard for up_cpu_index() and up_fpucmp(). Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
1eb151bef6
commit
d9b95c5ca0
2 changed files with 0 additions and 5 deletions
|
|
@ -51,9 +51,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
int up_cpu_index(void)
|
||||
{
|
||||
return (int)riscv_mhartid();
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_FPU
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
|
@ -63,4 +61,3 @@ bool up_fpucmp(const void *saveregs1, const void *saveregs2)
|
|||
return memcmp(®s1[INT_XCPT_REGS], ®s2[INT_XCPT_REGS],
|
||||
INT_REG_SIZE * FPU_XCPT_REGS) == 0;
|
||||
}
|
||||
#endif /* CONFIG_ARCH_FPU */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue