From 82a6fedb6ea53c9f3eb00ab1e0b839d3fcfe5fc2 Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Fri, 13 Jan 2017 16:09:57 +0100 Subject: [PATCH] arm64: kernel: Fix build warning * Issue: After da643dc .enable expects an int -> Change cpu_enable_uao protype to int Change-Id: I581a1afd13cd90637e6a7a315ede2af8950b401f Signed-off-by: Luca Stefani --- arch/arm64/include/asm/processor.h | 2 +- arch/arm64/mm/fault.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 83d0aa97b577..4be934fde409 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -191,6 +191,6 @@ static inline void spin_lock_prefetch(const void *ptr) #endif int cpu_enable_pan(void *__unused); -void cpu_enable_uao(void *__unused); +int cpu_enable_uao(void *__unused); #endif /* __ASM_PROCESSOR_H */ diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 2c0a80ca3536..2581ede3075a 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -658,8 +658,9 @@ int cpu_enable_pan(void *__unused) * We need to enable the feature at runtime (instead of adding it to * PSR_MODE_EL1h) as the feature may not be implemented by the cpu. */ -void cpu_enable_uao(void *__unused) +int cpu_enable_uao(void *__unused) { asm(SET_PSTATE_UAO(1)); + return 0; } #endif /* CONFIG_ARM64_UAO */ -- 2.11.0