Skip to contentSkip to conversation

ARM: reboot: remove duplicated local_irq_disable()

PATCH In review Jisheng Zhang 2 participants 3 messages Mar 30, 2016 – Apr 28, 2016 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: reboot: remove duplicated local_irq_disable()

Once entering machine_halt() and machine_restart(), local_irq_disable() is called, and local irq is kept disabled, so the local_irq_disable() at the end of these two functions are not necessary, remove it.

---

Since v1:
- correct typo in commit msg

 arch/arm/kernel/reboot.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/kernel/reboot.c +0 -3
index 71a2ff9..3fa867a 100644
@@ -104,8 +104,6 @@ void machine_halt(void)
 {
 	local_irq_disable();
 	smp_send_stop();
-
-	local_irq_disable();
 	while (1);
 }
 
@@ -150,6 +148,5 @@ void machine_restart(char *cmd)
 
 	/* Whoops - the platform was unable to reboot. Tell the user! */
 	printk("Reboot failed -- System halted\n");
-	local_irq_disable();
 	while (1);
 }
Signature · 1 line
2.8.0.rc3
#1 lore raw

Dear Russell,

Quoted 3 lines · On Wed, 30 Mar 2016 14:45:08 +0800 Jisheng Zhang wrote:

Once entering machine_halt() and machine_restart(), local_irq_disable() is called, and local irq is kept disabled, so the local_irq_disable() at the end of these two functions are not necessary, remove it.

Could I put the patch in your patch tracking system?

Thanks,
Jisheng

Quoted 30 lines

---

Since v1:
- correct typo in commit msg

 arch/arm/kernel/reboot.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/kernel/reboot.c +0 -3
index 71a2ff9..3fa867a 100644
@@ -104,8 +104,6 @@ void machine_halt(void)
 {
 	local_irq_disable();
 	smp_send_stop();
-
-	local_irq_disable();
 	while (1);
 }
 
@@ -150,6 +148,5 @@ void machine_restart(char *cmd)
 
 	/* Whoops - the platform was unable to reboot. Tell the user! */
 	printk("Reboot failed -- System halted\n");
-	local_irq_disable();
 	while (1);
 }
#2 lore raw
Quoted 9 lines · Jisheng Zhang

Dear Russell,

Quoted 3 lines · On Wed, 30 Mar 2016 14:45:08 +0800 Jisheng Zhang wrote:

Once entering machine_halt() and machine_restart(), local_irq_disable() is called, and local irq is kept disabled, so the local_irq_disable() at the end of these two functions are not necessary, remove it.

Could I put the patch in your patch tracking system?

Yes please. Thanks.

Signature · 3 lines
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.