From 762c29164e2850d8c5e4c258cef0077b2584d111 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Fri, 27 Aug 2010 16:41:56 +0000 Subject: econet: kill unnecessary spin_lock_init() The spinlock aun_queue_lock is initialized statically. It is unnecessary to initialize by spin_lock_init() at module load time. This is detected by the semantic patch. // @def@ declarer name DEFINE_SPINLOCK; identifier spinlock; @@ DEFINE_SPINLOCK(spinlock); @@ identifier def.spinlock; @@ - spin_lock_init(&spinlock); // Signed-off-by: Akinobu Mita Cc: Julia Lawall Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller --- net/econet/af_econet.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'net/econet/af_econet.c') diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index dc54bd0d083..baa98fb8355 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c @@ -1009,7 +1009,6 @@ static int __init aun_udp_initialise(void) struct sockaddr_in sin; skb_queue_head_init(&aun_queue); - spin_lock_init(&aun_queue_lock); setup_timer(&ab_cleanup_timer, ab_cleanup, 0); ab_cleanup_timer.expires = jiffies + (HZ*2); add_timer(&ab_cleanup_timer); @@ -1167,7 +1166,6 @@ static int __init econet_proto_init(void) goto out; sock_register(&econet_family_ops); #ifdef CONFIG_ECONET_AUNUDP - spin_lock_init(&aun_queue_lock); aun_udp_initialise(); #endif #ifdef CONFIG_ECONET_NATIVE -- cgit v1.2.3