summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/cpu_errata.c
diff options
context:
space:
mode:
authorWill Deacon2018-03-27 12:51:12 +0200
committerWill Deacon2018-03-27 12:51:12 +0200
commit12eb369125abe92bfc55e9ce198200f5807b63ff (patch)
tree2bd72a29d66bf9de8452a6e4415981c7f60b15ef /arch/arm64/kernel/cpu_errata.c
parentarm64: Add work around for Arm Cortex-A55 Erratum 1024718 (diff)
downloadkernel-qcow2-linux-12eb369125abe92bfc55e9ce198200f5807b63ff.tar.gz
kernel-qcow2-linux-12eb369125abe92bfc55e9ce198200f5807b63ff.tar.xz
kernel-qcow2-linux-12eb369125abe92bfc55e9ce198200f5807b63ff.zip
arm64: cpufeature: Avoid warnings due to unused symbols
An allnoconfig build complains about unused symbols due to functions that are called via conditional cpufeature and cpu_errata table entries. Annotate these as __maybe_unused if they are likely to be generic, or predicate their compilation on the same option as the table entry if they are specific to a given alternative. Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/cpu_errata.c')
-rw-r--r--arch/arm64/kernel/cpu_errata.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index 6de823a1be10..4613e4d75c73 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -285,8 +285,8 @@ qcom_enable_link_stack_sanitization(const struct arm64_cpu_capabilities *entry)
* of call backs, sharing the same capability bit.
* Iterate over each entry to see if at least one matches.
*/
-static bool multi_entry_cap_matches(const struct arm64_cpu_capabilities *entry,
- int scope)
+static bool __maybe_unused
+multi_entry_cap_matches(const struct arm64_cpu_capabilities *entry, int scope)
{
const struct arm64_cpu_capabilities *caps;
@@ -301,7 +301,7 @@ static bool multi_entry_cap_matches(const struct arm64_cpu_capabilities *entry,
* Take appropriate action for all matching entries in the shared capability
* entry.
*/
-static void
+static void __maybe_unused
multi_entry_cap_cpu_enable(const struct arm64_cpu_capabilities *entry)
{
const struct arm64_cpu_capabilities *caps;