Skip to contentSkip to conversation

unified spinlock initialization arch/mips/kernel/irq.c

PATCH In review Amit Gud 2 participants 2 messages Jan 25, 2005

Subsystems (2)
lore
Share & tools
lore

Amit Gud

author
#0 lore raw

PATCH 1/1 unified spinlock initialization arch/mips/kernel/irq.c

Unify the spinlock initialization as far as possible.

Do consider applying.

arch/mips/kernel/irq.c +1 -1
@@ -125,7 +125,7 @@ void __init init_IRQ(void)
 		irq_desc[i].action  = NULL;
 		irq_desc[i].depth   = 1;
 		irq_desc[i].handler = &no_irq_type;
-		irq_desc[i].lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&irq_desc[i].lock);
 	}
 
 	arch_init_irq();
#1 lore raw
Quoted 3 lines · Amit Gud

Unify the spinlock initialization as far as possible.

Do consider applying.

Actually, 'handler' and 'lock' are initialised for you (see kernel/irq/handle.c) so I think those two lines can just be deleted. 'action' is also initialised to NULL implicitly, so that can go. I think setting 'status' and 'depth' like that is also unnecessary.

Quoted 19 lines
arch/mips/kernel/irq.c +1 -1
@@ -125,7 +125,7 @@ void __init init_IRQ(void)
 		irq_desc[i].action  = NULL;
 		irq_desc[i].depth   = 1;
 		irq_desc[i].handler = &no_irq_type;
-		irq_desc[i].lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&irq_desc[i].lock);
 	}
 
 	arch_init_irq();

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors