ARM: 9302/1: traps: hide unused functions on NOMMU
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Jun 2023 18:28:39 +0000 (19:28 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 19 Jun 2023 08:35:50 +0000 (09:35 +0100)
commit4b026ca3e2eeceec1b8cbc9d2a5e01f345e19322
treef5f7a1e1b0ee5cb06bc364630bc4b3f1c55763d8
parenta9f8f2b2877ccb478e8e36607b00361cc5038eea
ARM: 9302/1: traps: hide unused functions on NOMMU

A couple of functions in this file are only used on MMU-enabled
builds, and never even declared otherwise, causing these build
warnings:

arch/arm/kernel/traps.c:759:6: error: no previous prototype for '__pte_error' [-Werror=missing-prototypes]
arch/arm/kernel/traps.c:764:6: error: no previous prototype for '__pmd_error' [-Werror=missing-prototypes]
arch/arm/kernel/traps.c:769:6: error: no previous prototype for '__pgd_error' [-Werror=missing-prototypes]

Protect these in an #ifdef to avoid the warnings and save a little
bit of .text space.

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/kernel/traps.c