lkml.org 
[lkml]   [2019]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] clk: samsung: s3c2443: Mark expected switch fall-through
On Thu, Feb 21, 2019 at 1:43 PM Stephen Boyd <sboyd@kernel.org> wrote:
> Ok, thanks for the background. Looks like the perf tool already
> introduced the #define __fallthrough that they use for this purpose.
> Maybe they're hoping that it will be formalized.

Yeah, GCC has an extension for it (but it's not yet part of the C
standard -- though there are open bugs against Clang to support it).
Our adoption of the markings, thanks to Gustavo's work, has rapidly
increased lately too (we started with something like 2400 instances
and we were gaining about as many each cycle as we removed). 5.1,
though, is closing in on _0_ instances. My thinking is that once we're
to the point where we can globally enable -Wimplicit-fallthrough, then
we can depend on the compiler to enforce this (instead continuing to
depend on external tracking in Coverity and the like). It was a bit of
a chicken-and-egg and I was afraid we were going to be left with this
"partial adoption" for a long time. But we're nearly to the point
where I would be happy doing a tree-wide replacement to __fallthrough
(which should be mechanically easy).

--
Kees Cook

\
 
 \ /
  Last update: 2019-02-21 23:24    [W:0.079 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site