* [PATCH] riscv: Remove unused GENERATING_ASM_OFFSETS
@ 2024-08-16 10:19 Chunyan Zhang
2024-08-16 12:30 ` Alexandre Ghiti
2024-10-24 18:10 ` patchwork-bot+linux-riscv
0 siblings, 2 replies; 4+ messages in thread
From: Chunyan Zhang @ 2024-08-16 10:19 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: linux-riscv, linux-kernel, Chunyan Zhang
The macro is not used in the current version of kernel, it looks like
can be removed to avoid a build warning:
../arch/riscv/kernel/asm-offsets.c: At top level:
../arch/riscv/kernel/asm-offsets.c:7: warning: macro "GENERATING_ASM_OFFSETS" is not used [-Wunused-macros]
7 | #define GENERATING_ASM_OFFSETS
Fixes: 9639a44394b9 ("RISC-V: Provide a cleaner raw_smp_processor_id()")
Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
---
arch/riscv/kernel/asm-offsets.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/riscv/kernel/asm-offsets.c b/arch/riscv/kernel/asm-offsets.c
index b09ca5f944f7..cb09f0c4f62c 100644
--- a/arch/riscv/kernel/asm-offsets.c
+++ b/arch/riscv/kernel/asm-offsets.c
@@ -4,8 +4,6 @@
* Copyright (C) 2017 SiFive
*/
-#define GENERATING_ASM_OFFSETS
-
#include <linux/kbuild.h>
#include <linux/mm.h>
#include <linux/sched.h>
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] riscv: Remove unused GENERATING_ASM_OFFSETS
2024-08-16 10:19 [PATCH] riscv: Remove unused GENERATING_ASM_OFFSETS Chunyan Zhang
@ 2024-08-16 12:30 ` Alexandre Ghiti
2024-09-06 1:34 ` Chunyan Zhang
2024-10-24 18:10 ` patchwork-bot+linux-riscv
1 sibling, 1 reply; 4+ messages in thread
From: Alexandre Ghiti @ 2024-08-16 12:30 UTC (permalink / raw)
To: Chunyan Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: linux-riscv, linux-kernel, Chunyan Zhang
Hi Chunyan,
On 16/08/2024 12:19, Chunyan Zhang wrote:
> The macro is not used in the current version of kernel, it looks like
> can be removed to avoid a build warning:
>
> ../arch/riscv/kernel/asm-offsets.c: At top level:
> ../arch/riscv/kernel/asm-offsets.c:7: warning: macro "GENERATING_ASM_OFFSETS" is not used [-Wunused-macros]
> 7 | #define GENERATING_ASM_OFFSETS
So this warning never shows up in a "normal" kernel compilation, but it
happens when using W=2 (with quite a lot of other warnings).
This unused define indeed seems completely useless, I guess not all
unused defines fall into this category and we should be careful when
removing them, but for this one it makes sense so:
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Thanks,
Alex
>
> Fixes: 9639a44394b9 ("RISC-V: Provide a cleaner raw_smp_processor_id()")
> Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
> ---
> arch/riscv/kernel/asm-offsets.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/riscv/kernel/asm-offsets.c b/arch/riscv/kernel/asm-offsets.c
> index b09ca5f944f7..cb09f0c4f62c 100644
> --- a/arch/riscv/kernel/asm-offsets.c
> +++ b/arch/riscv/kernel/asm-offsets.c
> @@ -4,8 +4,6 @@
> * Copyright (C) 2017 SiFive
> */
>
> -#define GENERATING_ASM_OFFSETS
> -
> #include <linux/kbuild.h>
> #include <linux/mm.h>
> #include <linux/sched.h>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] riscv: Remove unused GENERATING_ASM_OFFSETS
2024-08-16 12:30 ` Alexandre Ghiti
@ 2024-09-06 1:34 ` Chunyan Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Chunyan Zhang @ 2024-09-06 1:34 UTC (permalink / raw)
To: Palmer Dabbelt
Cc: Chunyan Zhang, Paul Walmsley, Albert Ou, linux-riscv,
linux-kernel, Alexandre Ghiti
On Fri, 16 Aug 2024 at 20:30, Alexandre Ghiti <alex@ghiti.fr> wrote:
>
> Hi Chunyan,
>
> On 16/08/2024 12:19, Chunyan Zhang wrote:
> > The macro is not used in the current version of kernel, it looks like
> > can be removed to avoid a build warning:
> >
> > ../arch/riscv/kernel/asm-offsets.c: At top level:
> > ../arch/riscv/kernel/asm-offsets.c:7: warning: macro "GENERATING_ASM_OFFSETS" is not used [-Wunused-macros]
> > 7 | #define GENERATING_ASM_OFFSETS
>
> So this warning never shows up in a "normal" kernel compilation, but it
> happens when using W=2 (with quite a lot of other warnings).
>
> This unused define indeed seems completely useless, I guess not all
> unused defines fall into this category and we should be careful when
> removing them, but for this one it makes sense so:
>
> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
I think this should be ready to be merged.
Palmer, would you please pick this up to your tree? Or I can resend
the patch if that's more convenient for you.
Thanks,
Chunyan
>
> Thanks,
>
> Alex
>
>
> >
> > Fixes: 9639a44394b9 ("RISC-V: Provide a cleaner raw_smp_processor_id()")
> > Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
> > ---
> > arch/riscv/kernel/asm-offsets.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/arch/riscv/kernel/asm-offsets.c b/arch/riscv/kernel/asm-offsets.c
> > index b09ca5f944f7..cb09f0c4f62c 100644
> > --- a/arch/riscv/kernel/asm-offsets.c
> > +++ b/arch/riscv/kernel/asm-offsets.c
> > @@ -4,8 +4,6 @@
> > * Copyright (C) 2017 SiFive
> > */
> >
> > -#define GENERATING_ASM_OFFSETS
> > -
> > #include <linux/kbuild.h>
> > #include <linux/mm.h>
> > #include <linux/sched.h>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] riscv: Remove unused GENERATING_ASM_OFFSETS
2024-08-16 10:19 [PATCH] riscv: Remove unused GENERATING_ASM_OFFSETS Chunyan Zhang
2024-08-16 12:30 ` Alexandre Ghiti
@ 2024-10-24 18:10 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-10-24 18:10 UTC (permalink / raw)
To: Chunyan Zhang
Cc: linux-riscv, paul.walmsley, palmer, aou, linux-kernel, zhang.lyra
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Fri, 16 Aug 2024 18:19:12 +0800 you wrote:
> The macro is not used in the current version of kernel, it looks like
> can be removed to avoid a build warning:
>
> ../arch/riscv/kernel/asm-offsets.c: At top level:
> ../arch/riscv/kernel/asm-offsets.c:7: warning: macro "GENERATING_ASM_OFFSETS" is not used [-Wunused-macros]
> 7 | #define GENERATING_ASM_OFFSETS
>
> [...]
Here is the summary with links:
- riscv: Remove unused GENERATING_ASM_OFFSETS
https://git.kernel.org/riscv/c/cb873b28bc2a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-24 18:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-16 10:19 [PATCH] riscv: Remove unused GENERATING_ASM_OFFSETS Chunyan Zhang
2024-08-16 12:30 ` Alexandre Ghiti
2024-09-06 1:34 ` Chunyan Zhang
2024-10-24 18:10 ` 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