Commit-ID: e4a0bd0308f05c1354d28feec8439e869eae6372 Gitweb: https://git.kernel.org/tip/e4a0bd0308f05c1354d28feec8439e869eae6372 Author: Louis Taylor <lo...@kragniz.eu> AuthorDate: Sat, 2 Mar 2019 18:49:29 +0000 Committer: Thomas Gleixner <t...@linutronix.de> CommitDate: Wed, 6 Mar 2019 22:55:30 +0100
x86/boot/KASLR: Always return a value from process_mem_region When compiling with -Wreturn-type, clang warns: arch/x86/boot/compressed/kaslr.c:704:1: warning: control may reach end of non-void function [-Wreturn-type] This function's return statement should have been placed outside the ifdeffed region. Move it there. Fixes: 690eaa532057 ("x86/boot/KASLR: Limit KASLR to extract the kernel in immovable memory only") Signed-off-by: Louis Taylor <lo...@kragniz.eu> Signed-off-by: Thomas Gleixner <t...@linutronix.de> Reviewed-by: Nathan Chancellor <natechancel...@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulni...@google.com> Cc: b...@alien8.de Cc: h...@zytor.com Cc: fanc.f...@cn.fujitsu.com Cc: b...@redhat.com Cc: kirill.shute...@linux.intel.com Cc: jf...@chromium.org Link: https://lkml.kernel.org/r/20190302184929.28971-1-lo...@kragniz.eu --- arch/x86/boot/compressed/kaslr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index fa0332dda9f2..2e53c056ba20 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -697,8 +697,8 @@ static bool process_mem_region(struct mem_vector *region, return 1; } } - return 0; #endif + return 0; } #ifdef CONFIG_EFI