OSDN Git Service

FROMLIST: MIPS: math-emu: Mark fall throughs in switch statements with a comment
authorAleksandar Markovic <aleksandar.markovic@mips.com>
Thu, 2 Nov 2017 11:14:05 +0000 (12:14 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 5 Feb 2018 16:58:37 +0000 (08:58 -0800)
commitfcc1a32d69d5fc0e62583bf47ceaa8668d9911d6
treeb5e940042979eaa585c066244ce0a3e1523de463
parent4ca35deb836b3b6879016d864266932abe9dc704
FROMLIST: MIPS: math-emu: Mark fall throughs in switch statements with a comment

Mark intentional fall throughs in switch statements with a consistent
comment.

In most of the cases, a new comment line containing text "fall through"
is inserted. In some of the cases, existing comment contained a variation
of the text "fall through" (for example, "FALL THROUGH" or "drop through").
In such cases, the existing comment is modified to contain "fall through".
Lastly, in two cases, code segments were described in comments as "fall
througs", but were in reality "breaks out" of switch statement. In such
cases, existing comments are accordingly modified.

Apart from making code easier to follow and debug, this change enables
some static code analysers to interpret newly inserted comments as their
annotations (and, therefore, not issue warnings of type "fall through in
switch statement", which is desireable, since marked fallthroughs are
intentional).

Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
(cherry picked from: https://patchwork.linux-mips.org/patch/17588/)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
17 files changed:
arch/mips/math-emu/cp1emu.c
arch/mips/math-emu/dp_add.c
arch/mips/math-emu/dp_div.c
arch/mips/math-emu/dp_fmax.c
arch/mips/math-emu/dp_fmin.c
arch/mips/math-emu/dp_maddf.c
arch/mips/math-emu/dp_mul.c
arch/mips/math-emu/dp_sqrt.c
arch/mips/math-emu/dp_sub.c
arch/mips/math-emu/sp_add.c
arch/mips/math-emu/sp_div.c
arch/mips/math-emu/sp_fdp.c
arch/mips/math-emu/sp_fmax.c
arch/mips/math-emu/sp_fmin.c
arch/mips/math-emu/sp_maddf.c
arch/mips/math-emu/sp_mul.c
arch/mips/math-emu/sp_sub.c