]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
xen/arm: traps: Mark check_stack_alignment_constraints as unused
authorJulien Grall <julien.grall@arm.com>
Tue, 26 Mar 2019 21:31:16 +0000 (21:31 +0000)
committerJulien Grall <julien.grall@arm.com>
Thu, 3 Oct 2019 10:46:45 +0000 (11:46 +0100)
Clang will throw an error if a function is unused unless you tell
to ignore it. This can be done using __maybe_unused.

While modifying the declaration, update it to match prototype of similar
functions (see build_assertions). This helps to understand that the sole
purpose of the function is to hold BUILD_BUG_ON().

Signed-off-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/traps.c

index a3b961bd0679f3f9e7f25855d2ce1aa7dcd289a5..a3deb59372a47bc22e8647b47b69271f8db27163 100644 (file)
@@ -54,7 +54,8 @@
  * that both the kernel half of struct cpu_user_regs (which is pushed in
  * entry.S) and struct cpu_info (which lives at the bottom of a Xen
  * stack) must be doubleword-aligned in size.  */
-static inline void check_stack_alignment_constraints(void) {
+static void __init __maybe_unused build_assertions(void)
+{
 #ifdef CONFIG_ARM_64
     BUILD_BUG_ON((sizeof (struct cpu_user_regs)) & 0xf);
     BUILD_BUG_ON((offsetof(struct cpu_user_regs, spsr_el1)) & 0xf);