riscv: compat_syscall_table: Fixup compile warning
PATCH 1/1 riscv: compat_syscall_table: Fixup compile warning
From: Guo Ren <[email protected]>
../arch/riscv/kernel/compat_syscall_table.c:12:41: warning: initialized field overwritten [-Woverride-init]
12 | #define __SYSCALL(nr, call) [nr] = (call),
| ^../include/uapi/asm-generic/unistd.h:567:1: note: in expansion of macro '__SYSCALL'
567 | __SYSCALL(__NR_semget, sys_semget)
---
This fix was in the v9 of "riscv: Add GENERIC_ENTRY support and related features" [1] but was dropped in v10 [2] with the prospect that it would be submitted separately. That seems to have not happened so I am submitting it now. I want to silence the riscv warnings when using W=1. With this patch applied to riscv/for-next, I no longer see any warnings for riscv.
[1] https://lore.kernel.org/linux-riscv/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/
arch/riscv/kernel/Makefile | 1 + 1 file changed, 1 insertion(+)
arch/riscv/kernel/Makefile +1 -0
@@ -9,6 +9,7 @@ CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE) endif CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,) +CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,) ifdef CONFIG_KEXEC AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
Signature · 1 line
2.34.1
Palmer Dabbelt
AppliedQuoted 9 lines · Drew Fustini
../arch/riscv/kernel/compat_syscall_table.c:12:41: warning: initialized field overwritten [-Woverride-init]
12 | #define__SYSCALL(nr, call)[nr] = (call),
| ^../include/uapi/asm-generic/unistd.h:567:1: note: in expansion of macro '__SYSCALL'
567 |__SYSCALL(__NR_semget, sys_semget)[...]
Applied, thanks!
[1/1] riscv: compat_syscall_table: Fixup compile warning
https://git.kernel.org/palmer/c/f9c4bbddece7
Best regards,
Signature · 1 line
Palmer Dabbelt <[email protected]>
This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt <[email protected]>:
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <[email protected]>:
Quoted 11 lines · On Mon, 1 May 2023 15:33:54 -0700 you wrote:
From: Guo Ren <[email protected]>
../arch/riscv/kernel/compat_syscall_table.c:12:41: warning: initialized field overwritten [-Woverride-init]
12 | #define__SYSCALL(nr, call)[nr] = (call),
| ^../include/uapi/asm-generic/unistd.h:567:1: note: in expansion of macro '__SYSCALL'
567 |__SYSCALL(__NR_semget, sys_semget)[...]
Here is the summary with links:
- riscv: compat_syscall_table: Fixup compile warning
https://git.kernel.org/riscv/c/f9c4bbddece7
You are awesome, thank you!
Signature · 9 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv