* [PATCH v2] net: netfilter: Remove multiple assignment.
@ 2017-03-27 22:33 Arushi Singhal
2017-04-06 19:35 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Arushi Singhal @ 2017-03-27 22:33 UTC (permalink / raw)
To: pablo
Cc: Jozsef Kadlecsik, davem, netfilter-devel, coreteam, netdev,
linux-kernel, outreachy-kernel
This patch removes multiple assignments to follow the kernel coding
style as also reported by checkpatch.pl.
Done using coccinelle.
@@
identifier i1,i2;
constant c;
@@
- i1=i2=c;
+ i1=c;
+ i2=i1;
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
changes in v2
-Make the commit message more clear and appropriate.
net/netfilter/nf_conntrack_proto_sctp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index 33279aab583d..723386bcc2cb 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -346,7 +346,8 @@ static int sctp_packet(struct nf_conn *ct,
goto out;
}
- old_state = new_state = SCTP_CONNTRACK_NONE;
+ old_state = SCTP_CONNTRACK_NONE;
+ new_state = old_state;
spin_lock_bh(&ct->lock);
for_each_sctp_chunk (skb, sch, _sch, offset, dataoff, count) {
/* Special cases of Verification tag check (Sec 8.5.1) */
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] net: netfilter: Remove multiple assignment.
2017-03-27 22:33 [PATCH v2] net: netfilter: Remove multiple assignment Arushi Singhal
@ 2017-04-06 19:35 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-04-06 19:35 UTC (permalink / raw)
To: Arushi Singhal
Cc: Jozsef Kadlecsik, davem, netfilter-devel, coreteam, netdev,
linux-kernel, outreachy-kernel
Hi Arushi,
On Tue, Mar 28, 2017 at 04:03:27AM +0530, Arushi Singhal wrote:
> This patch removes multiple assignments to follow the kernel coding
> style as also reported by checkpatch.pl.
> Done using coccinelle.
> @@
> identifier i1,i2;
> constant c;
> @@
> - i1=i2=c;
> + i1=c;
> + i2=i1;
I see more multiple assignments like this under:
net/netfilter/
net/ipv4/netfilter/
net/ipv6/netfilter/
net/bridge/netfilter/
So I would prefer whether fix them all or none.
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-06 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 22:33 [PATCH v2] net: netfilter: Remove multiple assignment Arushi Singhal
2017-04-06 19:35 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).