All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ipv6: Removed unnecessary parenthesis
@ 2017-03-29  9:02 Arushi Singhal
  2017-04-07 16:31 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Arushi Singhal @ 2017-03-29  9:02 UTC (permalink / raw)
  To: pablo
  Cc: Jozsef Kadlecsik, David S. Miller, Alexey Kuznetsov,
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy,
	netfilter-devel, coreteam, netdev, linux-kernel

Removed 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@gmail.com>
---
 net/ipv6/netfilter/nf_conntrack_reasm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index fdde76e8a16a..34dfdc2fb2bc 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -387,9 +387,9 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *prev,  struct net_devic
 		return false;
 
 	/* Unfragmented part is taken from the first segment. */
-	payload_len = ((head->data - skb_network_header(head)) -
+	payload_len = (head->data - skb_network_header(head)) -
 		       sizeof(struct ipv6hdr) + fq->q.len -
-		       sizeof(struct frag_hdr));
+		       sizeof(struct frag_hdr);
 	if (payload_len > IPV6_MAXPLEN) {
 		net_dbg_ratelimited("nf_ct_frag6_reasm: payload len = %d\n",
 				    payload_len);
-- 
2.11.0

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

* Re: [PATCH] net: ipv6: Removed unnecessary parenthesis
  2017-03-29  9:02 [PATCH] net: ipv6: Removed unnecessary parenthesis Arushi Singhal
@ 2017-04-07 16:31 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2017-04-07 16:31 UTC (permalink / raw)
  To: Arushi Singhal
  Cc: Jozsef Kadlecsik, David S. Miller, Alexey Kuznetsov,
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy,
	netfilter-devel, coreteam, netdev, linux-kernel

On Wed, Mar 29, 2017 at 02:32:43PM +0530, Arushi Singhal wrote:
> Removed 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
> -)

You sent me two patches for this:

http://patchwork.ozlabs.org/patch/744661/
http://patchwork.ozlabs.org/patch/744702/

The follow up one does not indicate v2, so I'm confused. I'm not sure
this is a resend or just a new version.

Another question that is not clear from your description is if you had
a look at the entire tree to find more spots like this, or you just
found this one and update it.

Ideally, it would be better to fix everything in one go, so we don't
have to deal with oneliner patches that just fix one single spot.

Thanks!

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

* [PATCH] net: ipv6: Removed unnecessary parenthesis
@ 2017-03-29 10:17 Arushi Singhal
  0 siblings, 0 replies; 3+ messages in thread
From: Arushi Singhal @ 2017-03-29 10:17 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: Pablo Neira Ayuso, Jozsef Kadlecsik, David S. Miller,
	Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
	Patrick McHardy, netfilter-devel, coreteam, netdev, linux-kernel

Removed 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@gmail.com>
---
 net/ipv6/netfilter/nf_conntrack_reasm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index fdde76e8a16a..34dfdc2fb2bc 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -387,9 +387,9 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *prev,  struct net_devic
 		return false;
 
 	/* Unfragmented part is taken from the first segment. */
-	payload_len = ((head->data - skb_network_header(head)) -
+	payload_len = (head->data - skb_network_header(head)) -
 		       sizeof(struct ipv6hdr) + fq->q.len -
-		       sizeof(struct frag_hdr));
+		       sizeof(struct frag_hdr);
 	if (payload_len > IPV6_MAXPLEN) {
 		net_dbg_ratelimited("nf_ct_frag6_reasm: payload len = %d\n",
 				    payload_len);
-- 
2.11.0



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

end of thread, other threads:[~2017-04-07 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29  9:02 [PATCH] net: ipv6: Removed unnecessary parenthesis Arushi Singhal
2017-04-07 16:31 ` Pablo Neira Ayuso
2017-03-29 10:17 Arushi Singhal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.