linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* arm64: kernel/sys.c - silence initialization warnings.
@ 2021-03-12  9:55 Valdis Klētnieks
  2021-03-15 11:14 ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Valdis Klētnieks @ 2021-03-12  9:55 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel, linux-kernel

Building arch/arm64/kernel/sys.o with W=1 throws over 300 warnings:

/usr/src/linux-next/arch/arm64/kernel/sys.c:56:40: warning: initialized field overwritten [-Woverride-init]
   56 | #define __SYSCALL(nr, sym)      [nr] = __arm64_##sym,
      |                                        ^~~~~~~~
/usr/src/linux-next/include/uapi/asm-generic/unistd.h:29:37: note: in expansion of macro '__SYSCALL'
   29 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
      |                                     ^~~~~~~~~
/usr/src/linux-next/include/uapi/asm-generic/unistd.h:34:1: note: in expansion of macro '__SC_COMP'
   34 | __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
      | ^~~~~~~~~

We know that's pretty much the file's purpose in life, so tell the
build system to not remind us.  This makes the 1 other warning a
lot more noticeable. 

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>

diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index ed65576ce710..916b21d2b35b 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -8,6 +8,7 @@ CFLAGS_armv8_deprecated.o := -I$(src)
 CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
 CFLAGS_REMOVE_insn.o = $(CC_FLAGS_FTRACE)
 CFLAGS_REMOVE_return_address.o = $(CC_FLAGS_FTRACE)
+CFLAGS_sys.o += $(call cc-disable-warning, override-init)
 
 # Object file lists.
 obj-y			:= debug-monitors.o entry.o irq.o fpsimd.o		\


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-16  0:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12  9:55 arm64: kernel/sys.c - silence initialization warnings Valdis Klētnieks
2021-03-15 11:14 ` Catalin Marinas
2021-03-15 19:23   ` Christoph Hellwig
2021-03-16  0:30     ` Valdis Klētnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).