* [PATCH] econet: kill unnecessary spin_lock_init()
@ 2010-08-28 2:41 Akinobu Mita
2010-08-28 22:37 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2010-08-28 2:41 UTC (permalink / raw)
To: kernel-janitors; +Cc: Akinobu Mita, Julia Lawall, David S. Miller, netdev
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.
// <smpl>
@def@
declarer name DEFINE_SPINLOCK;
identifier spinlock;
@@
DEFINE_SPINLOCK(spinlock);
@@
identifier def.spinlock;
@@
- spin_lock_init(&spinlock);
// </smpl>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
---
net/econet/af_econet.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index dc54bd0..baa98fb 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
--
1.6.0.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] econet: kill unnecessary spin_lock_init()
2010-08-28 2:41 [PATCH] econet: kill unnecessary spin_lock_init() Akinobu Mita
@ 2010-08-28 22:37 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-08-28 22:37 UTC (permalink / raw)
To: akinobu.mita; +Cc: kernel-janitors, julia, netdev
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Sat, 28 Aug 2010 11:41:56 +0900
> 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.
...
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Julia Lawall <julia@diku.dk>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: netdev@vger.kernel.org
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-28 22:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-28 2:41 [PATCH] econet: kill unnecessary spin_lock_init() Akinobu Mita
2010-08-28 22:37 ` 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).