Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d6d1035 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Catalin Marinas
Browse files

arm64: mark cpus_have_hwcap as __maybe_unused



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: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 37b01d53 ("arm64/HWCAP: Use system wide safe values")
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 2f34f173
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -679,7 +679,7 @@ static void cap_set_hwcap(const struct arm64_cpu_capabilities *cap)
}
}


/* Check if we have a particular HWCAP enabled */
/* 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;
	bool rc;