]> git.baikalelectronics.ru Git - kernel.git/commitdiff
arm64: mark cpus_have_hwcap as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Thu, 12 Nov 2015 14:20:16 +0000 (15:20 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 12 Nov 2015 15:18:01 +0000 (15:18 +0000)
cpus_have_hwcap() is defined as a 'static' function an only used in
one place that is inside of an #ifdef, so we get a warning when
the only user is disabled:

arch/arm64/kernel/cpufeature.c:699:13: warning: 'cpus_have_hwcap' defined but not used [-Wunused-function]

This marks the function as __maybe_unused, so the compiler knows that
it can drop the function definition without warning about it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8165b3a2566d ("arm64/HWCAP: Use system wide safe values")
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/cpufeature.c

index 504526fa81299eeb3a7c127e73a54c1a85a7383a..6ecb824817901414a7b1f320715a2d28094bd5d3 100644 (file)
@@ -679,7 +679,7 @@ static void cap_set_hwcap(const struct arm64_cpu_capabilities *cap)
 }
 
 /* Check if we have a particular HWCAP enabled */
-static bool cpus_have_hwcap(const struct arm64_cpu_capabilities *cap)
+static bool __maybe_unused cpus_have_hwcap(const struct arm64_cpu_capabilities *cap)
 {
        bool rc;