linux/arch
Arnd Bergmann 4d86896793 arch: fix asm-offsets.c building with -Wmissing-prototypes
When -Wmissing-prototypes is enabled, the some asm-offsets.c files fail
to build, even when this warning is disabled in the Makefile for normal
files:

arch/sparc/kernel/asm-offsets.c:22:5: error: no previous prototype for 'sparc32_foo' [-Werror=missing-prototypes]
arch/sparc/kernel/asm-offsets.c:48:5: error: no previous prototype for 'foo' [-Werror=missing-prototypes]

Address this by making use of the same trick as x86, marking these
functions as 'static __used' to avoid the need for a prototype
by not drop them in dead-code elimination.

Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/lkml/CAK7LNARfEmFk0Du4Hed19eX_G6tUC5wG0zP+L1AyvdpOF4ybXQ@mail.gmail.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-11-23 11:32:31 +01:00
..
alpha arch: fix asm-offsets.c building with -Wmissing-prototypes 2023-11-23 11:32:31 +01:00
arc kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
arm arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
arm64 arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
csky arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
hexagon TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
loongarch arch: fix asm-offsets.c building with -Wmissing-prototypes 2023-11-23 11:32:31 +01:00
m68k Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
microblaze asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
mips Probes fixes for v6.7-rc1: 2023-11-10 16:35:04 -08:00
nios2 vgacon, arch/*: remove unused screen_info definitions 2023-10-17 10:17:02 +02:00
openrisc OpenRISC updates for 6.6 2023-09-05 10:09:31 -07:00
parisc parisc: Prevent booting 64-bit kernels on PA1.x machines 2023-11-10 16:17:32 +01:00
powerpc arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
riscv arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
s390 arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
sh kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
sparc arch: fix asm-offsets.c building with -Wmissing-prototypes 2023-11-23 11:32:31 +01:00
um um,ethertap: Replace deprecated strncpy() with strscpy() 2023-09-29 11:37:50 -07:00
x86 arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
xtensa TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
.gitignore
Kconfig arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00