[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230501223353.2833899-1-dfustini@baylibre.com>
Date: Mon, 1 May 2023 15:33:54 -0700
From: Drew Fustini <dfustini@...libre.com>
To: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Guo Ren <guoren@...nel.org>,
Li Zhengyu <lizhengyu3@...wei.com>,
Björn Töpel <bjorn@...osinc.com>,
Heiko Stuebner <heiko@...ech.de>,
Liao Chang <liaochang1@...wei.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Alexandre Ghiti <alexghiti@...osinc.com>,
Jisheng Zhang <jszhang@...nel.org>,
Arnd Bergmann <arnd@...db.de>, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org
Cc: Drew Fustini <dfustini@...libre.com>,
Conor Dooley <conor.dooley@...rochip.com>,
kernel test robot <lkp@...el.com>,
Guo Ren <guoren@...ux.alibaba.com>
Subject: [PATCH] riscv: compat_syscall_table: Fixup compile warning
From: Guo Ren <guoren@...ux.alibaba.com>
../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)
Fixes: 59c10c52f573 ("riscv: compat: syscall: Add compat_sys_call_table implementation")
Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>
Reported-by: kernel test robot <lkp@...el.com>
Tested-by: Jisheng Zhang <jszhang@...nel.org>
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
Signed-off-by: Guo Ren <guoren@...nel.org>
Signed-off-by: Drew Fustini <dfustini@...libre.com>
---
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/20221130034059.826599-4-guoren@kernel.org/
[2] https://lore.kernel.org/lkml/20230222033021.983168-1-guoren@kernel.org/
arch/riscv/kernel/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index 0fee73a20c87..c2ff6440767c 100644
--- a/arch/riscv/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
@@ -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)
--
2.34.1
Powered by blists - more mailing lists