lkml.org 
[lkml]   [2019]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: mtrr: cyrix: Mark expected switch fall-through
On Mon, Aug 05, 2019 at 03:17:12PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> Fix the following warning (Building: i386_defconfig i386):
>
> arch/x86/kernel/cpu/mtrr/cyrix.c:99:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

> ---
> arch/x86/kernel/cpu/mtrr/cyrix.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/kernel/cpu/mtrr/cyrix.c b/arch/x86/kernel/cpu/mtrr/cyrix.c
> index 4296c702a3f7..72182809b333 100644
> --- a/arch/x86/kernel/cpu/mtrr/cyrix.c
> +++ b/arch/x86/kernel/cpu/mtrr/cyrix.c
> @@ -98,6 +98,7 @@ cyrix_get_free_region(unsigned long base, unsigned long size, int replace_reg)
> case 7:
> if (size < 0x40)
> break;
> + /* Else, fall through */
> case 6:
> case 5:
> case 4:
> --
> 2.22.0
>

--
Kees Cook

\
 
 \ /
  Last update: 2019-08-05 22:20    [W:0.032 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site