]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
arm64: entry: suppress W=1 prototype warnings
authorMark Rutland <mark.rutland@arm.com>
Mon, 14 Dec 2020 11:33:53 +0000 (11:33 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 15 Dec 2020 12:38:02 +0000 (12:38 +0000)
commitbf023e76a8c004fe38e90a3f4bbd5b47cadb741f
tree20a81e0d9a8b6e938ed1daba9d2a26d728c979b4
parent51550a483606e35c379f78d28a7827f50e8fc09c
arm64: entry: suppress W=1 prototype warnings

When building with W=1, GCC complains that we haven't defined prototypes
for a number of non-static functions in entry-common.c:

| arch/arm64/kernel/entry-common.c:203:25: warning: no previous prototype for 'el1_sync_handler' [-Wmissing-prototypes]
|   203 | asmlinkage void noinstr el1_sync_handler(struct pt_regs *regs)
|       |                         ^~~~~~~~~~~~~~~~
| arch/arm64/kernel/entry-common.c:377:25: warning: no previous prototype for 'el0_sync_handler' [-Wmissing-prototypes]
|   377 | asmlinkage void noinstr el0_sync_handler(struct pt_regs *regs)
|       |                         ^~~~~~~~~~~~~~~~
| arch/arm64/kernel/entry-common.c:447:25: warning: no previous prototype for 'el0_sync_compat_handler' [-Wmissing-prototypes]
|   447 | asmlinkage void noinstr el0_sync_compat_handler(struct pt_regs *regs)
|       |                         ^~~~~~~~~~~~~~~~~~~~~~~

... and so automated build systems using W=1 end up sending a number of
emails, despite this not being a real problem as the only callers are in
entry.S where prototypes cannot matter.

For similar cases in entry-common.c we added prototypes to
asm/exception.h, so let's do the same thing here for consistency.

Note that there are a number of other warnings printed with W=1, both
under arch/arm64 and in core code, and this patch only addresses the
cases in entry-common.c. Automated build systems typically filter these
warnings such that they're only reported when changes are made nearby,
so we don't need to solve them all at once.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201214113353.44417-1-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/exception.h