* [PATCH] net/ipv4: Remove unused variable in route.c
@ 2017-10-04 19:59 Tim Hansen
2017-10-06 4:17 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Tim Hansen @ 2017-10-04 19:59 UTC (permalink / raw)
To: davem; +Cc: kuznet, yoshfuji, netdev, linux-kernel, alexander.levin,
devtimhansen
int rc is unmodified after initalization in net/ipv4/route.c, this patch simply cleans up that variable and returns 0.
This was found with coccicheck M=net/ipv4/ on linus' tree.
Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
---
net/ipv4/route.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 94d4cd2..02b6be9 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3032,7 +3032,6 @@ struct ip_rt_acct __percpu *ip_rt_acct __read_mostly;
int __init ip_rt_init(void)
{
- int rc = 0;
int cpu;
ip_idents = kmalloc(IP_IDENTS_SZ * sizeof(*ip_idents), GFP_KERNEL);
@@ -3089,7 +3088,7 @@ int __init ip_rt_init(void)
#endif
register_pernet_subsys(&rt_genid_ops);
register_pernet_subsys(&ipv4_inetpeer_ops);
- return rc;
+ return 0;
}
#ifdef CONFIG_SYSCTL
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/ipv4: Remove unused variable in route.c
2017-10-04 19:59 [PATCH] net/ipv4: Remove unused variable in route.c Tim Hansen
@ 2017-10-06 4:17 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-10-06 4:17 UTC (permalink / raw)
To: devtimhansen; +Cc: kuznet, yoshfuji, netdev, linux-kernel, alexander.levin
From: Tim Hansen <devtimhansen@gmail.com>
Date: Wed, 4 Oct 2017 15:59:49 -0400
> int rc is unmodified after initalization in net/ipv4/route.c, this patch simply cleans up that variable and returns 0.
>
> This was found with coccicheck M=net/ipv4/ on linus' tree.
>
> Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-06 4:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 19:59 [PATCH] net/ipv4: Remove unused variable in route.c Tim Hansen
2017-10-06 4:17 ` David Miller
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).