]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rds: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:38:47 +0000 (12:38 -0600)
committerGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 18 May 2021 01:00:27 +0000 (20:00 -0500)
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
net/rds/tcp_connect.c
net/rds/threads.c

index 4e64598176b0508a738e49e63fe2dd16b1bd7e0c..5461d77fff4f43995a97ace920fb8ddd2005adb6 100644 (file)
@@ -78,6 +78,7 @@ void rds_tcp_state_change(struct sock *sk)
        case TCP_CLOSE_WAIT:
        case TCP_CLOSE:
                rds_conn_path_drop(cp, false);
+               break;
        default:
                break;
        }
index 32dc50f0a303118a151dc6f451ae7debe4e301bb..1f424cbfcbb47d18245af0c2cce528324649baf2 100644 (file)
@@ -208,6 +208,7 @@ void rds_send_worker(struct work_struct *work)
                case -ENOMEM:
                        rds_stats_inc(s_send_delayed_retry);
                        queue_delayed_work(rds_wq, &cp->cp_send_w, 2);
+                       break;
                default:
                        break;
                }
@@ -232,6 +233,7 @@ void rds_recv_worker(struct work_struct *work)
                case -ENOMEM:
                        rds_stats_inc(s_recv_delayed_retry);
                        queue_delayed_work(rds_wq, &cp->cp_recv_w, 2);
+                       break;
                default:
                        break;
                }