lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] platform/x86: thinkpad acpi: Mark expected switc h fall-throughs
On Wed, Apr 24, 2019, at 16:05, Kees Cook wrote:
> On Wed, Apr 24, 2019 at 11:15 AM Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
> >
> > In preparation to enabling -Wimplicit-fallthrough, mark switch
> > cases where we are expecting to fall through.
> >
> > This patch fixes the following warnings:
> >
> > drivers/platform/x86/thinkpad_acpi.c: In function ‘thermal_get_sensor’:
> > drivers/platform/x86/thinkpad_acpi.c:6316:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> > if (idx >= 8 && idx <= 15) {
> > ^
> > drivers/platform/x86/thinkpad_acpi.c:6322:2: note: here
> > case TPACPI_THERMAL_TPEC_8:
> > ^~~~
> > drivers/platform/x86/thinkpad_acpi.c: In function ‘hotkey_notify’:
> > drivers/platform/x86/thinkpad_acpi.c:4208:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
> > if (tp_features.hotkey_wlsw &&
> > ^
> > drivers/platform/x86/thinkpad_acpi.c:4216:3: note: here
> > default:
> > ^~~~~~~
> >
> > Warning level 3 was used: -Wimplicit-fallthrough=3
> >
> > Notice that, in this particular case, the code comments are modified
> > in accordance with what GCC is expecting to find.
> >
> > This patch is part of the ongoing efforts to enable
> > -Wimplicit-fallthrough.
> >
> > Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>
> Reviewed-by: Kees Cook <keescook@chromium.org>

Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

\
 
 \ /
  Last update: 2019-04-25 03:04    [W:0.831 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site