Skip to contentSkip to conversation

net: netfilter: remove unused variable

PATCH In review Arushi Singhal 3 participants 4 messages Mar 29, 2017 – Mar 30, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: netfilter: remove unused variable

This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it:

@@
identifier len,f;
@@

-int len;
... when != len
when strict
-len =
+return

        f(...);

-return len;

---
changes in v2
- remove extra blank line.

 net/netfilter/ipvs/ip_vs_ftp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/netfilter/ipvs/ip_vs_ftp.c +1 -4
index d30c327bb578..c93c93762354 100644
@@ -482,11 +482,8 @@ static struct pernet_operations ip_vs_ftp_ops = {
 
 static int __init ip_vs_ftp_init(void)
 {
-	int rv;
-
-	rv = register_pernet_subsys(&ip_vs_ftp_ops);
 	/* rcu_barrier() is called by netns on error */
-	return rv;
+	return register_pernet_subsys(&ip_vs_ftp_ops);
 }
 
 /*
Signature · 1 line
2.11.0
maintainer
#1 lore raw
Quoted 16 lines · Arushi Singhal

This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it:

@@
identifier len,f;
@@

(quoted diff) +1 -3
-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;
Quoted 1 line

Applied with patch prefix updated to "ipvs:".

#2 lore raw
Quoted 17 lines · Simon Horman
Quoted 16 lines · Arushi Singhal

This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it:

@@
identifier len,f;
@@

(quoted diff) +1 -3
-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;
Quoted 4 lines
Quoted 1 line

Applied with patch prefix updated to "ipvs:".

Hi
Thanks
How can I see my accepted patches of netfilter.
Thanks
Arushi

#3 lore raw
Quoted 19 lines · Arushi Singhal
Quoted 17 lines · Simon Horman
Quoted 16 lines · Arushi Singhal

This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it:

@@
identifier len,f;
@@

(quoted diff) +1 -3
-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applied with patch prefix updated to "ipvs:".

Hi
Thanks
How can I see my accepted patches of netfilter.

You can use links from patchwork:

http://patchwork.ozlabs.org/project/netfilter-devel/