From cbb07a595e66f4c171919ff6ba45b49af0e20648 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Thu, 1 Aug 2024 13:10:05 +0300 Subject: [PATCH] k230_start.c: Fix condition for k230_copy_init_data() Fixes regression from https://github.com/apache/nuttx/pull/12220 Error: chip/k230_start.c:80:13: error: 'k230_copy_init_data' defined but not used [-Werror=unused-function] 80 | static void k230_copy_init_data(void) | ^~~~~~~~~~~~~~~~~~~ --- arch/risc-v/src/k230/k230_start.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/risc-v/src/k230/k230_start.c b/arch/risc-v/src/k230/k230_start.c index 0925352b18..37a8e2ee36 100644 --- a/arch/risc-v/src/k230/k230_start.c +++ b/arch/risc-v/src/k230/k230_start.c @@ -117,7 +117,8 @@ void k230_start(int mhartid, const char *dtb) #ifdef CONFIG_RISCV_PERCPU_SCRATCH riscv_percpu_add_hart(mhartid); -#else +#endif +#ifndef CONFIG_BUILD_KERNEL k230_copy_init_data(); #endif }