Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH RESEND][next] rds: Fix fall-through warnings for Clang
@ 2021-03-05  9:06 Gustavo A. R. Silva
  2021-04-20 20:10 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo A. R. Silva @ 2021-03-05  9:06 UTC (permalink / raw)
  To: Santosh Shilimkar, David S. Miller, Jakub Kicinski
  Cc: netdev, linux-rdma, rds-devel, linux-kernel, Gustavo A. R. Silva,
	linux-hardening

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
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 net/rds/tcp_connect.c | 1 +
 net/rds/threads.c     | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c
index 4e64598176b0..5461d77fff4f 100644
--- a/net/rds/tcp_connect.c
+++ b/net/rds/tcp_connect.c
@@ -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;
 	}
diff --git a/net/rds/threads.c b/net/rds/threads.c
index 32dc50f0a303..1f424cbfcbb4 100644
--- a/net/rds/threads.c
+++ b/net/rds/threads.c
@@ -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;
 		}
-- 
2.27.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND][next] rds: Fix fall-through warnings for Clang
  2021-03-05  9:06 [PATCH RESEND][next] rds: Fix fall-through warnings for Clang Gustavo A. R. Silva
@ 2021-04-20 20:10 ` Gustavo A. R. Silva
  2021-05-06  6:50   ` Haakon Bugge
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo A. R. Silva @ 2021-04-20 20:10 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Santosh Shilimkar, David S. Miller, Jakub Kicinski
  Cc: netdev, linux-rdma, rds-devel, linux-kernel, linux-hardening

Hi all,

Friendly ping: who can take this, please?

Thanks
--
Gustavo

On 3/5/21 03:06, Gustavo A. R. Silva wrote:
> 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
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
>  net/rds/tcp_connect.c | 1 +
>  net/rds/threads.c     | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c
> index 4e64598176b0..5461d77fff4f 100644
> --- a/net/rds/tcp_connect.c
> +++ b/net/rds/tcp_connect.c
> @@ -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;
>  	}
> diff --git a/net/rds/threads.c b/net/rds/threads.c
> index 32dc50f0a303..1f424cbfcbb4 100644
> --- a/net/rds/threads.c
> +++ b/net/rds/threads.c
> @@ -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;
>  		}
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND][next] rds: Fix fall-through warnings for Clang
  2021-04-20 20:10 ` Gustavo A. R. Silva
@ 2021-05-06  6:50   ` Haakon Bugge
  2021-05-18  1:01     ` Gustavo A. R. Silva
  0 siblings, 1 reply; 4+ messages in thread
From: Haakon Bugge @ 2021-05-06  6:50 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Gustavo A. R. Silva, Santosh Shilimkar, David S. Miller,
	Jakub Kicinski, netdev, OFED mailing list, rds-devel,
	linux-kernel, linux-hardening

Sorry for the delay.


> On 20 Apr 2021, at 22:10, Gustavo A. R. Silva <gustavo@embeddedor.com> wrote:
> 
> Hi all,
> 
> Friendly ping: who can take this, please?
> 
> Thanks
> --
> Gustavo
> 
> On 3/5/21 03:06, Gustavo A. R. Silva wrote:
>> 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
>> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>


Thxs, Håkon


>> ---
>> net/rds/tcp_connect.c | 1 +
>> net/rds/threads.c     | 2 ++
>> 2 files changed, 3 insertions(+)
>> 
>> diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c
>> index 4e64598176b0..5461d77fff4f 100644
>> --- a/net/rds/tcp_connect.c
>> +++ b/net/rds/tcp_connect.c
>> @@ -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;
>> 	}
>> diff --git a/net/rds/threads.c b/net/rds/threads.c
>> index 32dc50f0a303..1f424cbfcbb4 100644
>> --- a/net/rds/threads.c
>> +++ b/net/rds/threads.c
>> @@ -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;
>> 		}
>> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND][next] rds: Fix fall-through warnings for Clang
  2021-05-06  6:50   ` Haakon Bugge
@ 2021-05-18  1:01     ` Gustavo A. R. Silva
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2021-05-18  1:01 UTC (permalink / raw)
  To: Haakon Bugge
  Cc: Gustavo A. R. Silva, Santosh Shilimkar, David S. Miller,
	Jakub Kicinski, netdev, OFED mailing list, rds-devel,
	linux-kernel, linux-hardening

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

On 5/6/21 01:50, Haakon Bugge wrote:
> Sorry for the delay.
> 
> 
>> On 20 Apr 2021, at 22:10, Gustavo A. R. Silva <gustavo@embeddedor.com> wrote:
>>
>> Hi all,
>>
>> Friendly ping: who can take this, please?
>>
>> Thanks
>> --
>> Gustavo
>>
>> On 3/5/21 03:06, Gustavo A. R. Silva wrote:
>>> 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
>>> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> 
> Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
> 
> 
> Thxs, Håkon
> 
> 
>>> ---
>>> net/rds/tcp_connect.c | 1 +
>>> net/rds/threads.c     | 2 ++
>>> 2 files changed, 3 insertions(+)
>>>
>>> diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c
>>> index 4e64598176b0..5461d77fff4f 100644
>>> --- a/net/rds/tcp_connect.c
>>> +++ b/net/rds/tcp_connect.c
>>> @@ -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;
>>> 	}
>>> diff --git a/net/rds/threads.c b/net/rds/threads.c
>>> index 32dc50f0a303..1f424cbfcbb4 100644
>>> --- a/net/rds/threads.c
>>> +++ b/net/rds/threads.c
>>> @@ -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;
>>> 		}
>>>
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  9:06 [PATCH RESEND][next] rds: Fix fall-through warnings for Clang Gustavo A. R. Silva
2021-04-20 20:10 ` Gustavo A. R. Silva
2021-05-06  6:50   ` Haakon Bugge
2021-05-18  1:01     ` Gustavo A. R. Silva

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git