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
..
2022-10-12 16:36:19 +08:00
2023-10-17 16:33:39 +02:00
2022-06-03 20:09:28 +08:00
2022-12-14 08:41:53 +08:00
2022-06-03 20:09:28 +08:00
2023-09-06 22:53:55 +08:00
2022-10-12 16:36:19 +08:00
2022-10-12 16:36:14 +08:00
2023-11-03 15:44:25 -10:00
2023-06-29 20:58:44 +08:00