* [PATCH] riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT
@ 2023-01-06 16:12 Masahiro Yamada
2023-01-07 3:13 ` Guo Ren
2023-01-24 22:40 ` patchwork-bot+linux-riscv
0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2023-01-06 16:12 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv
Cc: linux-kernel, Masahiro Yamada, Alexandre Ghiti, Anup Patel,
Atish Patra, Guo Ren, Jisheng Zhang, Myrtle Shah
Since commit 80b6093b55e3 ("kbuild: add -Wundef to KBUILD_CPPFLAGS
for W=1 builds"), building with W=1 detects misuse of #if.
$ make W=1 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- arch/riscv/kernel/
[snip]
AS arch/riscv/kernel/head.o
arch/riscv/kernel/head.S:329:5: warning: "CONFIG_RISCV_BOOT_SPINWAIT" is not defined, evaluates to 0 [-Wundef]
329 | #if CONFIG_RISCV_BOOT_SPINWAIT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG_RISCV_BOOT_SPINWAIT is a bool option. #ifdef should be used.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/riscv/kernel/head.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
index b865046e4dbb..4bf6c449d78b 100644
--- a/arch/riscv/kernel/head.S
+++ b/arch/riscv/kernel/head.S
@@ -326,7 +326,7 @@ clear_bss_done:
call soc_early_init
tail start_kernel
-#if CONFIG_RISCV_BOOT_SPINWAIT
+#ifdef CONFIG_RISCV_BOOT_SPINWAIT
.Lsecondary_start:
/* Set trap vector to spin forever to help debug */
la a3, .Lsecondary_park
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT
2023-01-06 16:12 [PATCH] riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT Masahiro Yamada
@ 2023-01-07 3:13 ` Guo Ren
2023-01-24 22:40 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: Guo Ren @ 2023-01-07 3:13 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv,
linux-kernel, Alexandre Ghiti, Anup Patel, Atish Patra,
Jisheng Zhang, Myrtle Shah
On Sat, Jan 7, 2023 at 12:12 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Since commit 80b6093b55e3 ("kbuild: add -Wundef to KBUILD_CPPFLAGS
> for W=1 builds"), building with W=1 detects misuse of #if.
>
> $ make W=1 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- arch/riscv/kernel/
> [snip]
> AS arch/riscv/kernel/head.o
> arch/riscv/kernel/head.S:329:5: warning: "CONFIG_RISCV_BOOT_SPINWAIT" is not defined, evaluates to 0 [-Wundef]
> 329 | #if CONFIG_RISCV_BOOT_SPINWAIT
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> CONFIG_RISCV_BOOT_SPINWAIT is a bool option. #ifdef should be used.
Fixes: 2ffc48fc7071 ("RISC-V: Move spinwait booting method to its own config")
Right?
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/riscv/kernel/head.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
> index b865046e4dbb..4bf6c449d78b 100644
> --- a/arch/riscv/kernel/head.S
> +++ b/arch/riscv/kernel/head.S
> @@ -326,7 +326,7 @@ clear_bss_done:
> call soc_early_init
> tail start_kernel
>
> -#if CONFIG_RISCV_BOOT_SPINWAIT
> +#ifdef CONFIG_RISCV_BOOT_SPINWAIT
> .Lsecondary_start:
> /* Set trap vector to spin forever to help debug */
> la a3, .Lsecondary_park
> --
> 2.34.1
>
--
Best Regards
Guo Ren
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT
2023-01-06 16:12 [PATCH] riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT Masahiro Yamada
2023-01-07 3:13 ` Guo Ren
@ 2023-01-24 22:40 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-01-24 22:40 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-riscv, paul.walmsley, palmer, aou, linux-kernel,
alexandre.ghiti, anup, atishp, guoren, jszhang, gatecat
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Sat, 7 Jan 2023 01:12:13 +0900 you wrote:
> Since commit 80b6093b55e3 ("kbuild: add -Wundef to KBUILD_CPPFLAGS
> for W=1 builds"), building with W=1 detects misuse of #if.
>
> $ make W=1 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- arch/riscv/kernel/
> [snip]
> AS arch/riscv/kernel/head.o
> arch/riscv/kernel/head.S:329:5: warning: "CONFIG_RISCV_BOOT_SPINWAIT" is not defined, evaluates to 0 [-Wundef]
> 329 | #if CONFIG_RISCV_BOOT_SPINWAIT
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [...]
Here is the summary with links:
- riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT
https://git.kernel.org/riscv/c/5b89c6f9b2df
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-24 22:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-06 16:12 [PATCH] riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT Masahiro Yamada
2023-01-07 3:13 ` Guo Ren
2023-01-24 22:40 ` patchwork-bot+linux-riscv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox