aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/misc.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-01-10 15:52:25 -0600
committerGustavo A. R. Silva <gustavo@embeddedor.com>2019-04-08 18:35:56 -0500
commite690c9e3f4fb2cc589414c5bf502dcfe04e685de (patch)
tree2dfca439baaf49dd2db944d0b9edbf4197a7ffa6 /fs/afs/misc.c
parentfs: mark expected switch fall-throughs (diff)
downloadlinux-dev-e690c9e3f4fb2cc589414c5bf502dcfe04e685de.tar.xz
linux-dev-e690c9e3f4fb2cc589414c5bf502dcfe04e685de.zip
afs: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in many cases I placed a /* Fall through */ comment at the bottom of the case, which what GCC is expecting to find. In other cases I had to tweak a bit the format of the comments. This patch suppresses ALL missing-break-in-switch false positives in fs/afs Addresses-Coverity-ID: 115042 ("Missing break in switch") Addresses-Coverity-ID: 115043 ("Missing break in switch") Addresses-Coverity-ID: 115045 ("Missing break in switch") Addresses-Coverity-ID: 1357430 ("Missing break in switch") Addresses-Coverity-ID: 115047 ("Missing break in switch") Addresses-Coverity-ID: 115050 ("Missing break in switch") Addresses-Coverity-ID: 115051 ("Missing break in switch") Addresses-Coverity-ID: 1467806 ("Missing break in switch") Addresses-Coverity-ID: 1467807 ("Missing break in switch") Addresses-Coverity-ID: 1467811 ("Missing break in switch") Addresses-Coverity-ID: 115041 ("Missing break in switch") Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Diffstat (limited to 'fs/afs/misc.c')
-rw-r--r--fs/afs/misc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/afs/misc.c b/fs/afs/misc.c
index bbb1fd51b019..7f2af061ea06 100644
--- a/fs/afs/misc.c
+++ b/fs/afs/misc.c
@@ -131,33 +131,42 @@ void afs_prioritise_error(struct afs_error *e, int error, u32 abort_code)
if (e->error == -ETIMEDOUT ||
e->error == -ETIME)
return;
+ /* Fall through */
case -ETIMEDOUT:
case -ETIME:
if (e->error == -ENOMEM ||
e->error == -ENONET)
return;
+ /* Fall through */
case -ENOMEM:
case -ENONET:
if (e->error == -ERFKILL)
return;
+ /* Fall through */
case -ERFKILL:
if (e->error == -EADDRNOTAVAIL)
return;
+ /* Fall through */
case -EADDRNOTAVAIL:
if (e->error == -ENETUNREACH)
return;
+ /* Fall through */
case -ENETUNREACH:
if (e->error == -EHOSTUNREACH)
return;
+ /* Fall through */
case -EHOSTUNREACH:
if (e->error == -EHOSTDOWN)
return;
+ /* Fall through */
case -EHOSTDOWN:
if (e->error == -ECONNREFUSED)
return;
+ /* Fall through */
case -ECONNREFUSED:
if (e->error == -ECONNRESET)
return;
+ /* Fall through */
case -ECONNRESET: /* Responded, but call expired. */
if (e->responded)
return;