kernel SPIN_LOCK_UNLOCKED changed to __SPIN_LOCK_UNLOCKED()
Subsystems (3)
PATCH 1/1 kernel SPIN_LOCK_UNLOCKED changed to __SPIN_LOCK_UNLOCKED()
There are still some files containing .lock = SPIN_LOCK_UNLOCKED type assignments which should be converted to __SPIN_LOCK_UNLOCKED().
---
arch/arm/kernel/smp.c +1 -1
@@ -56,7 +56,7 @@ struct ipi_data { }; static DEFINE_PER_CPU(struct ipi_data, ipi_data) = { - .lock =SPIN_LOCK_UNLOCKED , + .lock =__SPIN_LOCK_UNLOCKED (ipi_data.lock), };enum ipi_msg_type {
arch/mips/kernel/vpe.c +2 -2
@@ -148,9 +148,9 @@ struct {spinlock_t tc_list_lock;struct list_head tc_list;/* Thread contexts */ } vpecontrol = { - .vpe_list_lock = SPIN_LOCK_UNLOCKED, + .vpe_list_lock = __SPIN_LOCK_UNLOCKED(vpecontrol.vpe_list_lock), .vpe_list = LIST_HEAD_INIT(vpecontrol.vpe_list), - .tc_list_lock = SPIN_LOCK_UNLOCKED, + .tc_list_lock = __SPIN_LOCK_UNLOCKED(vpecontrol.tc_list_lock), .tc_list =LIST_HEAD_INIT (vpecontrol.tc_list) };
kernel/cred.c +1 -1
@@ -35,7 +35,7 @@ static struct kmem_cache *cred_jar;static struct thread_group_cred init_tgcred = { .usage =ATOMIC_INIT (2 ), .tgid =0 , - .lock =SPIN_LOCK_UNLOCKED , + .lock =__SPIN_LOCK_UNLOCKED (init_tgcred.lock), };#endif
Signature · 3 lines
Atul Sowani ([email protected]) http://savannah.gnu.org/users/atul ------------------------------------------------------------------------
Quoted 36 lines · Atul Sowani
There are still some files containing .lock =
SPIN_LOCK_UNLOCKEDtype assignments which should be converted to__SPIN_LOCK_UNLOCKED().Signed-off-by Atul Sowani <[email protected]>---
diff -uprN
a/arch/arm/kernel/smp.cb/arch/arm/kernel/smp.carch/arm/kernel/smp.c +1
-1@@ -56,7 +56,7 @@ struct ipi_data { }; static DEFINE_PER_CPU(struct ipi_data, ipi_data) = { - .lock =SPIN_LOCK_UNLOCKED , + .lock =__SPIN_LOCK_UNLOCKED (ipi_data.lock), };enum ipi_msg_type {diff -uprN
a/arch/mips/kernel/vpe.cb/arch/mips/kernel/vpe.carch/mips/kernel/vpe.c +2
-2@@ -148,9 +148,9 @@ struct {spinlock_t tc_list_lock;struct list_head tc_list;/* Thread contexts */ } vpecontrol = { - .vpe_list_lock = SPIN_LOCK_UNLOCKED, + .vpe_list_lock = __SPIN_LOCK_UNLOCKED(vpecontrol.vpe_list_lock), .vpe_list = LIST_HEAD_INIT(vpecontrol.vpe_list), - .tc_list_lock = SPIN_LOCK_UNLOCKED, + .tc_list_lock = __SPIN_LOCK_UNLOCKED(vpecontrol.tc_list_lock), .tc_list =LIST_HEAD_INIT (vpecontrol.tc_list) };diff -uprN
a/kernel/cred.cb/kernel/cred.c
kernel/cred.c static struct kmem_cache *cred_jar; · line 41
Quoted 8 lines
kernel/cred.c +1
-1@@ -35,7 +35,7 @@ static struct kmem_cache *cred_jar;static struct thread_group_cred init_tgcred = { .usage =ATOMIC_INIT (2 ), .tgid =0 , - .lock =SPIN_LOCK_UNLOCKED , + .lock =__SPIN_LOCK_UNLOCKED (init_tgcred.lock), };#endif
Hi all,
I made original patch submission on 08.Nov.2010. I am wondering if this patch will be useful and is correct. Please comment.
Best regards,
Atul.
Signature · 3 lines
Atul Sowani (sowani at gmail.com) http://savannah.gnu.org/users/atul ------------------------------------------------------------------------
Russell King - ARM Linux
Acked-by Russell KingQuoted 13 lines · Atul Sowani
Quoted 12 lines · Atul Sowani
There are still some files containing .lock =
SPIN_LOCK_UNLOCKEDtype assignments which should be converted to__SPIN_LOCK_UNLOCKED().Signed-off-by Atul Sowani <[email protected]>---
diff -uprN
a/arch/arm/kernel/smp.cb/arch/arm/kernel/smp.carch/arm/kernel/smp.c +0
-0@@ -56,7 +56,7 @@ struct ipi_data { };
Quoted 3 lines
arch/arm/kernel/smp.c struct ipi_data { · line 59
Quoted 3 lines
arch/arm/kernel/smp.c +1
-1static DEFINE_PER_CPU(struct ipi_data, ipi_data) = { - .lock =SPIN_LOCK_UNLOCKED , + .lock =__SPIN_LOCK_UNLOCKED (ipi_data.lock),
No space between UNLOCKED and (.
Quoted 2 lines
I made original patch submission on 08.Nov.2010. I am wondering if this patch will be useful and is correct. Please comment.
This is the first I've seen of this patch. For the ARM part, with the above fixed: