Re: [PATCH] net: netfilters: Remove unnecessary parenthesis

To: Arushi Singhal <arushisinghal19971997@xxxxxxxxx>
Subject: Re: [PATCH] net: netfilters: Remove unnecessary parenthesis
Cc: wensong@xxxxxxxxxxxx, Julian Anastasov <ja@xxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxxxxxx>, davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, outreachy-kernel@xxxxxxxxxxxxxxxx
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 4 Apr 2017 13:48:16 -0400
On Tue, Mar 28, 2017 at 06:56:48PM +0530, Arushi Singhal wrote:
> Rmoved parentheses on the right hand side of assignment, as they are
> not required. The following coccinelle script was used to fix this
> issue:
> @@
> local idexpression id;
> expression e;
> @@
> id =
> -(
> e
> -)
> Signed-off-by: Arushi Singhal <arushisinghal19971997@xxxxxxxxx>
> ---
>  net/netfilter/ipvs/ip_vs_proto_tcp.c   | 2 +-

grep seems to find some other instances of this problem for IPVS.
I would prefer if all of them were fixed.

$ grep -n "= *(.*);" net/netfilter/ipvs/*
After some manual filtering I see

net/netfilter/ipvs/ip_vs_ctl.c:113:     nomem = (availmem < 
net/netfilter/ipvs/ip_vs_ctl.c:279:     ahash ^= ((size_t) ipvs >> 8);
net/netfilter/ipvs/ip_vs_proto_tcp.c:490:       int on = (flags & 1);          
/* secure_tcp */
net/netfilter/ipvs/ip_vs_proto_tcp.c:498:       pd->tcp_state_table = (on ? 
tcp_states_dos : tcp_states);
net/netfilter/ipvs/ip_vs_sync.c:719:    s->v4.type = (cp->af == AF_INET6 ? 
net/netfilter/ipvs/ip_vs_sync.c:948:                    cp->timeout = (3*60*HZ)

As mentioned elsewhere: If you would like me to pick up patches for IPVS
then please post patches that only update IPVS files. I'm also happy for
Pablo to pick up patches that include both IPVS and non-IPVS Netfilter
updates of this nature.  Pablo can offer his own guidance here.

To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH] net: netfilters: Remove unnecessary parenthesis, Simon Horman <=