]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
xen/arm: mm: Mark check_memory_layout_alignment_constraints as unused
authorJulien Grall <julien.grall@arm.com>
Wed, 27 Mar 2019 18:23:11 +0000 (18:23 +0000)
committerJulien Grall <julien.grall@arm.com>
Thu, 3 Oct 2019 10:46:42 +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/mm.c

index 9e0fdc39f9714c3e88bdfa2ec6ddddabfaf7cae8..be23acfe26fe02ad0ca2758f37b2200154b5b56d 100644 (file)
@@ -190,7 +190,8 @@ unsigned long total_pages;
 extern char __init_begin[], __init_end[];
 
 /* Checking VA memory layout alignment. */
-static inline void check_memory_layout_alignment_constraints(void) {
+static void __init __maybe_unused build_assertions(void)
+{
     /* 2MB aligned regions */
     BUILD_BUG_ON(XEN_VIRT_START & ~SECOND_MASK);
     BUILD_BUG_ON(FIXMAP_ADDR(0) & ~SECOND_MASK);