Files
linux/arch/sparc/kernel
Arnd Bergmann fc8b791121 arch: fix asm-offsets.c building with -Wmissing-prototypes
[ Upstream commit 4d86896793 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-05 20:16:47 +00:00
..
2018-01-22 08:17:15 -08:00
2018-01-22 08:17:15 -08:00
2018-05-09 06:54:27 +02:00
2022-09-29 19:21:10 -07:00
2021-09-15 13:42:33 -07:00
2020-08-23 17:36:59 -05:00
2020-08-20 13:12:58 +02:00
2022-09-29 19:21:10 -07:00
2022-09-29 19:21:10 -07:00
2021-12-13 12:04:45 -06:00