lkml.org 
[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf/x86/intel: Mark expected switch fall-throughs
On Mon, Jun 24, 2019 at 11:19:13AM -0500, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> arch/x86/events/intel/core.c: In function ‘intel_pmu_init’:
> arch/x86/events/intel/core.c:4959:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
> pmem = true;
> ~~~~~^~~~~~
> arch/x86/events/intel/core.c:4960:2: note: here
> case INTEL_FAM6_SKYLAKE_MOBILE:
> ^~~~
> arch/x86/events/intel/core.c:5008:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
> pmem = true;
> ~~~~~^~~~~~
> arch/x86/events/intel/core.c:5009:2: note: here
> case INTEL_FAM6_ICELAKE_MOBILE:
> ^~~~
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

I still consider it an abomination that the C parser looks at comments
-- other than to delete them, but OK I suppose, I'll take it.

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