* [PATCH] inetpeer_gc_worker: trivial cleanup
@ 2014-04-25 0:53 xiao jin
2014-04-26 16:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: xiao jin @ 2014-04-25 0:53 UTC (permalink / raw)
To: davem, kuznet, jmorris, yoshfuji, kaber, trivial, netdev, linux-kernel
Cc: david.a.cohen, xiao jin
Do not initialize list twice.
list_replace_init() already takes care of initializing list.
We don't need to initialize it with LIST_HEAD() beforehand.
Signed-off-by: xiao jin <jin.xiao@intel.com>
Reviewed-by: David Cohen <david.a.cohen@linux.intel.com>
---
net/ipv4/inetpeer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index 48f4244..c98cf14 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -120,7 +120,7 @@ int inet_peer_maxttl __read_mostly = 10 * 60 * HZ; /* usual time to live: 10 min
static void inetpeer_gc_worker(struct work_struct *work)
{
struct inet_peer *p, *n, *c;
- LIST_HEAD(list);
+ struct list_head list;
spin_lock_bh(&gc_lock);
list_replace_init(&gc_list, &list);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] inetpeer_gc_worker: trivial cleanup
2014-04-25 0:53 [PATCH] inetpeer_gc_worker: trivial cleanup xiao jin
@ 2014-04-26 16:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-04-26 16:53 UTC (permalink / raw)
To: jin.xiao
Cc: kuznet, jmorris, yoshfuji, kaber, trivial, netdev, linux-kernel,
david.a.cohen
From: xiao jin <jin.xiao@intel.com>
Date: Fri, 25 Apr 2014 08:53:29 +0800
> Do not initialize list twice.
> list_replace_init() already takes care of initializing list.
> We don't need to initialize it with LIST_HEAD() beforehand.
>
> Signed-off-by: xiao jin <jin.xiao@intel.com>
> Reviewed-by: David Cohen <david.a.cohen@linux.intel.com>
Also applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-26 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25 0:53 [PATCH] inetpeer_gc_worker: trivial cleanup xiao jin
2014-04-26 16:53 ` David Miller
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.