]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
inetpeer_gc_worker: trivial cleanup
authorxiao jin <jin.xiao@intel.com>
Fri, 25 Apr 2014 00:53:29 +0000 (08:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Apr 2014 16:52:28 +0000 (12:52 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inetpeer.c

index 48f4244651125fb4ef7bcfda155137f287b07c77..c98cf141f4ed66aa57595423baf83b6fa92e19da 100644 (file)
@@ -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);