ANDROID: arm64: Suppress unused function error of cpus_have_cap()
Out-of-tree fips140 modules may include asm/alternative-macros.h but not
using any alternative_has_cap_*() macros, which results in the unused
function error of cpus_have_cap().
For example, asm/alternative-macros.h could be unintentionally included
through the following path:
linux/bitops.h
-> asm-generic/bitops/generic-non-atomic.h
-> asm/barrier.h
-> asm/alternative-macros.h
Add __maybe_unused to the forward declaration of cpus_have_cap() to
suppress the error.
Fixes: 059d29197b ("ANDROID: arm64: only permit certain alternatives in the FIPS140 module")
Bug: 383224684
Change-Id: I72d2b7e3b2923f29a5cdc524081cd785540db342
Signed-off-by: Jacky Liu <qsliu@google.com>
This commit is contained in:
@@ -302,7 +302,7 @@ l_yes:
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
static bool cpus_have_cap(unsigned int num);
|
||||
static bool __maybe_unused cpus_have_cap(unsigned int num);
|
||||
|
||||
/*
|
||||
* Return 'false' for all capabilities listed above, and use the slow path for
|
||||
|
||||
Reference in New Issue
Block a user