Re: [net-next][PATCH] inet: Use switch case instead of multiple condition checks

2018-05-09 Thread Joe Perches
On Thu, 2018-05-10 at 13:37 +0800, Li RongQing wrote: > inet_csk_reset_xmit_timer uses multiple equality condition checks, > so it is better to use switch case instead of them [] > diff --git a/include/net/inet_connection_sock.h > b/include/net/inet_connection_sock.h [] > @@ -239,22 +239,31 @@ sta

Re: [net-next][PATCH] inet: Use switch case instead of multiple condition checks

2018-05-09 Thread Eric Dumazet
On 05/09/2018 10:37 PM, Li RongQing wrote: > inet_csk_reset_xmit_timer uses multiple equality condition checks, > so it is better to use switch case instead of them > Why is it better ? I prefer the concise form, and compiler really should not care.