mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
Remove the unneeded void cast
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
32ee2ae407
commit
ef1a98dd00
@@ -70,7 +70,7 @@
|
||||
|
||||
#define SYS_restore_context (1)
|
||||
#define up_fullcontextrestore(restoreregs) \
|
||||
(void)sys_call1(SYS_restore_context, (uintptr_t)restoreregs)
|
||||
sys_call1(SYS_restore_context, (uintptr_t)restoreregs)
|
||||
|
||||
/* SYS call 2:
|
||||
*
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
#define SYS_switch_context (2)
|
||||
#define up_switchcontext(saveregs, restoreregs) \
|
||||
(void)sys_call2(SYS_switch_context, (uintptr_t)saveregs, (uintptr_t)restoreregs)
|
||||
sys_call2(SYS_switch_context, (uintptr_t)saveregs, (uintptr_t)restoreregs)
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
/* SYS call 3:
|
||||
@@ -88,7 +88,7 @@
|
||||
*/
|
||||
|
||||
#define SYS_syscall_return (3)
|
||||
#define up_syscall_return() (void)sys_call0(SYS_syscall_return)
|
||||
#define up_syscall_return() sys_call0(SYS_syscall_return)
|
||||
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
@@ -855,14 +855,14 @@ void up_serialinit(void)
|
||||
/* Register the console */
|
||||
|
||||
#ifdef HAVE_SERIAL_CONSOLE
|
||||
(void)uart_register("/dev/console", &CONSOLE_DEV);
|
||||
uart_register("/dev/console", &CONSOLE_DEV);
|
||||
#endif
|
||||
|
||||
/* Register all UARTs */
|
||||
|
||||
(void)uart_register("/dev/ttyS0", &TTYS0_DEV);
|
||||
uart_register("/dev/ttyS0", &TTYS0_DEV);
|
||||
#ifdef TTYS1_DEV
|
||||
(void)uart_register("/dev/ttyS1", &TTYS1_DEV);
|
||||
uart_register("/dev/ttyS1", &TTYS1_DEV);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -123,12 +123,12 @@ void up_timer_initialize(void)
|
||||
|
||||
up_clrpend_irq(BM3803_IRQ_TIMER1);
|
||||
#ifdef CONFIG_ARCH_IRQPRIO
|
||||
(void)up_prioritize_irq(BM3803_IRQ_TIMER1, CONFIG_BM3803_TIMER1PRIO);
|
||||
up_prioritize_irq(BM3803_IRQ_TIMER1, CONFIG_BM3803_TIMER1PRIO);
|
||||
#endif
|
||||
|
||||
/* Attach the timer interrupt vector */
|
||||
|
||||
(void)irq_attach(BM3803_IRQ_TIMER1, (xcpt_t)bm3803_timerisr, NULL);
|
||||
irq_attach(BM3803_IRQ_TIMER1, (xcpt_t)bm3803_timerisr, NULL);
|
||||
|
||||
/* And enable the timer interrupt */
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ int bm3803_oneshot_start(struct bm3803_oneshot_s *oneshot,
|
||||
/* Yes.. then cancel it */
|
||||
|
||||
tmrinfo("Already running... cancelling\n");
|
||||
(void)bm3803_oneshot_cancel(oneshot, NULL);
|
||||
bm3803_oneshot_cancel(oneshot, NULL);
|
||||
}
|
||||
|
||||
/* Save the new handler and its argument */
|
||||
|
||||
@@ -427,7 +427,7 @@ void bm3803_wdginitialize(const char *devpath)
|
||||
|
||||
/* Register the watchdog driver as /dev/watchdog0 */
|
||||
|
||||
(void)watchdog_register(devpath, (struct watchdog_lowerhalf_s *)priv);
|
||||
watchdog_register(devpath, (FAR struct watchdog_lowerhalf_s *)priv);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_WATCHDOG && CONFIG_BM3803_WDG */
|
||||
|
||||
@@ -847,14 +847,14 @@ void up_serialinit(void)
|
||||
/* Register the console */
|
||||
|
||||
#ifdef HAVE_SERIAL_CONSOLE
|
||||
(void)uart_register("/dev/console", &CONSOLE_DEV);
|
||||
uart_register("/dev/console", &CONSOLE_DEV);
|
||||
#endif
|
||||
|
||||
/* Register all UARTs */
|
||||
|
||||
(void)uart_register("/dev/ttyS0", &TTYS0_DEV);
|
||||
uart_register("/dev/ttyS0", &TTYS0_DEV);
|
||||
#ifdef TTYS1_DEV
|
||||
(void)uart_register("/dev/ttyS1", &TTYS1_DEV);
|
||||
uart_register("/dev/ttyS1", &TTYS1_DEV);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -124,12 +124,12 @@ void up_timer_initialize(void)
|
||||
|
||||
up_clrpend_irq(BM3823_IRQ_TIMER1);
|
||||
#ifdef CONFIG_ARCH_IRQPRIO
|
||||
(void)up_prioritize_irq(BM3823_IRQ_TIMER1, CONFIG_BM3823_TIMER1PRIO);
|
||||
up_prioritize_irq(BM3823_IRQ_TIMER1, CONFIG_BM3823_TIMER1PRIO);
|
||||
#endif
|
||||
|
||||
/* Attach the timer interrupt vector */
|
||||
|
||||
(void)irq_attach(BM3823_IRQ_TIMER1, (xcpt_t)bm3823_timerisr, NULL);
|
||||
irq_attach(BM3823_IRQ_TIMER1, (xcpt_t)bm3823_timerisr, NULL);
|
||||
|
||||
/* And enable the timer interrupt */
|
||||
|
||||
|
||||
@@ -67,13 +67,13 @@ static void _up_assert(int errorcode)
|
||||
{
|
||||
/* Flush any buffered SYSLOG data */
|
||||
|
||||
(void)syslog_flush();
|
||||
syslog_flush();
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (g_current_regs || running_task()->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
up_irq_save();
|
||||
for (; ; )
|
||||
{
|
||||
#if CONFIG_BOARD_RESET_ON_ASSERT >= 1
|
||||
@@ -136,7 +136,7 @@ void up_assert(const char *filename, int lineno)
|
||||
|
||||
/* Flush any buffered SYSLOG data (prior to the assertion) */
|
||||
|
||||
(void)syslog_flush();
|
||||
syslog_flush();
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
@@ -150,7 +150,7 @@ void up_assert(const char *filename, int lineno)
|
||||
|
||||
/* Flush any buffered SYSLOG data (from the above) */
|
||||
|
||||
(void)syslog_flush();
|
||||
syslog_flush();
|
||||
|
||||
#ifdef CONFIG_BOARD_CRASHDUMP
|
||||
board_crashdump(up_getsp(), running_task(), filename, lineno);
|
||||
@@ -159,7 +159,7 @@ void up_assert(const char *filename, int lineno)
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
/* Dump USB trace data */
|
||||
|
||||
(void)usbtrace_enumerate(assert_tracecallback, NULL);
|
||||
usbtrace_enumerate(assert_tracecallback, NULL);
|
||||
#endif
|
||||
|
||||
_up_assert(EXIT_FAILURE);
|
||||
|
||||
@@ -98,7 +98,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
|
||||
* thread at the head of the ready-to-run list.
|
||||
*/
|
||||
|
||||
(void)group_addrenv(NULL);
|
||||
group_addrenv(NULL);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -91,7 +91,7 @@ void up_sigdeliver(void)
|
||||
*/
|
||||
|
||||
sinfo("Resuming\n");
|
||||
(void)up_irq_save();
|
||||
up_irq_save();
|
||||
|
||||
/* Modify the saved return state with the actual saved values in the
|
||||
* TCB. This depends on the fact that nested signal handling is
|
||||
|
||||
Reference in New Issue
Block a user