lkml.org 
[lkml]   [2019]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] x86/KASLR: always return a value from process_mem_region
Louis,

On Sat, 2 Mar 2019, Louis Taylor wrote:

> 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 probably have been placed
> outside the #endif, so move it there
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/360
> Signed-off-by: Louis Taylor <louis@kragniz.eu>

This lacks a

Fixes: commitsha1 (".....")

tag

> 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;
> }

This does not longer apply to mainline because the function does not longer
have a return value. So if that's important, you need to hash that out with
the stable folks.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-03-06 21:03    [W:0.088 / U:1.616 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site