rds: Fix fall-through warnings for Clang
Subsystems (4)
PATCH RESEND 1/1 rds: Fix fall-through warnings for Clang
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.
--- net/rds/tcp_connect.c | 1 + net/rds/threads.c | 2 ++ 2 files changed, 3 insertions(+)
net/rds/tcp_connect.c +1 -0
@@ -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 ; }
net/rds/threads.c +2 -0
@@ -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 ; }
Signature · 1 line
2.27.0
Hi all,
Friendly ping: who can take this, please?
Thanks
--
Gustavo
Quoted 44 lines · Gustavo A. R. Silva
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.
--- net/rds/tcp_connect.c | 1 + net/rds/threads.c | 2 ++ 2 files changed, 3 insertions(+)net/rds/tcp_connect.c +1
-0@@ -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 ; }net/rds/threads.c +2
-0@@ -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 ; }
Haakon Bugge
Reviewed-bySorry for the delay.
Quoted 17 lines · Gustavo A. R. Silva
Hi all,
Friendly ping: who can take this, please?
Thanks
--
GustavoQuoted 6 lines · Gustavo A. R. Silva
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.
Thxs, Håkon
Quoted 38 lines
Quoted 38 lines
---
net/rds/tcp_connect.c| 1 +net/rds/threads.c| 2 ++2 files changed, 3 insertions(+)net/rds/tcp_connect.c +1
-0@@ -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 ; }net/rds/threads.c +2
-0@@ -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 ; }
Hi all,
If you don't mind, I'm taking this in my -next[1] branch for v5.14.
Thanks
--
Gustavo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp
Quoted 66 lines · Haakon Bugge
Sorry for the delay.
Quoted 17 lines · Gustavo A. R. Silva
Hi all,
Friendly ping: who can take this, please?
Thanks
--
GustavoQuoted 6 lines · Gustavo A. R. Silva
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.
Reviewed-by Håkon Bugge <[email protected]>Thxs, Håkon
Quoted 38 lines
Quoted 38 lines
---
net/rds/tcp_connect.c| 1 +net/rds/threads.c| 2 ++2 files changed, 3 insertions(+)net/rds/tcp_connect.c +1
-0@@ -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 ; }net/rds/threads.c +2
-0@@ -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 ; }