Skip to content

Commit 2701f99

Browse files
committed
arch: mark z_prep_c as FUNC_NORETURN
z_prep_c does not return, mark it as such consistently across architectures. We had some arches do that, others not. This resolves a few coding guideline violations in arch code. Signed-off-by: Anas Nashif <[email protected]>
1 parent 42021e2 commit 2701f99

File tree

14 files changed

+14
-14
lines changed

14 files changed

+14
-14
lines changed

arch/arc/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ extern void arc_secureshield_init(void);
8282
* This routine prepares for the execution of and runs C code.
8383
*/
8484

85-
void z_prep_c(void)
85+
FUNC_NORETURN void z_prep_c(void)
8686
{
8787
#if defined(CONFIG_SOC_PREP_HOOK)
8888
soc_prep_hook();

arch/arm/core/cortex_a_r/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ extern FUNC_NORETURN void z_cstart(void);
9898
* This routine prepares for the execution of and runs C code.
9999
*
100100
*/
101-
void z_prep_c(void)
101+
FUNC_NORETURN void z_prep_c(void)
102102
{
103103
#if defined(CONFIG_SOC_PREP_HOOK)
104104
soc_prep_hook();

arch/arm/core/cortex_m/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ extern FUNC_NORETURN void z_cstart(void);
195195
* This routine prepares for the execution of and runs C code.
196196
*
197197
*/
198-
void z_prep_c(void)
198+
FUNC_NORETURN void z_prep_c(void)
199199
{
200200
#if defined(CONFIG_SOC_PREP_HOOK)
201201
soc_prep_hook();

arch/arm64/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ __weak void z_arm64_mm_init(bool is_primary_core) { }
3131
* This routine prepares for the execution of and runs C code.
3232
*
3333
*/
34-
void z_prep_c(void)
34+
FUNC_NORETURN void z_prep_c(void)
3535
{
3636
#if defined(CONFIG_SOC_PREP_HOOK)
3737
soc_prep_hook();

arch/mips/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void interrupt_init(void)
4545
* @return N/A
4646
*/
4747

48-
void z_prep_c(void)
48+
FUNC_NORETURN void z_prep_c(void)
4949
{
5050
#if defined(CONFIG_SOC_PREP_HOOK)
5151
soc_prep_hook();

arch/riscv/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void soc_interrupt_init(void);
3434
* This routine prepares for the execution of and runs C code.
3535
*/
3636

37-
void z_prep_c(void)
37+
FUNC_NORETURN void z_prep_c(void)
3838
{
3939
#if defined(CONFIG_SOC_PREP_HOOK)
4040
soc_prep_hook();

arch/rx/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ K_KERNEL_PINNED_STACK_ARRAY_DEFINE(z_initialization_process_stacks, CONFIG_MP_MA
3131
*
3232
* @return N/A
3333
*/
34-
void z_prep_c(void)
34+
FUNC_NORETURN void z_prep_c(void)
3535
{
3636
arch_bss_zero();
3737

arch/sparc/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* This routine prepares for the execution of and runs C code.
2121
*/
2222

23-
void z_prep_c(void)
23+
FUNC_NORETURN void z_prep_c(void)
2424
{
2525
#if defined(CONFIG_SOC_PREP_HOOK)
2626
soc_prep_hook();

arch/xtensa/core/prep_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ BUILD_ASSERT(CONFIG_DCACHE_LINE_SIZE == XCHAL_DCACHE_LINESIZE);
2929
* This routine prepares for the execution of and runs C code.
3030
*
3131
*/
32-
void z_prep_c(void)
32+
FUNC_NORETURN void z_prep_c(void)
3333
{
3434
#if defined(CONFIG_SOC_PREP_HOOK)
3535
soc_prep_hook();

soc/espressif/esp32/soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <zephyr/drivers/interrupt_controller/intc_esp32.h>
1717
#include <zephyr/sys/printk.h>
1818

19-
extern void z_prep_c(void);
19+
extern FUNC_NORETURN void z_prep_c(void);
2020
extern void esp_reset_reason_init(void);
2121

2222
void IRAM_ATTR __esp_platform_app_start(void)

0 commit comments

Comments
 (0)