Commit 243066ba authored by dann frazier's avatar dann frazier Committed by Wim Van Sebroeck

watchdog: hpwdt (9/12): hpwdt_pretimeout reorganization

Reorganize this function to remove excess indentation and highlight
the single return code. (No functional change).
Signed-off-by: default avatardann frazier <dannf@hp.com>
Acked-by: default avatarThomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent aae67f36
...@@ -465,24 +465,26 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, ...@@ -465,24 +465,26 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason,
static int die_nmi_called; static int die_nmi_called;
if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI) if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI)
return NOTIFY_OK; goto out;
if (hpwdt_nmi_sourcing) { if (!hpwdt_nmi_sourcing)
spin_lock_irqsave(&rom_lock, rom_pl); goto out;
if (!die_nmi_called)
asminline_call(&cmn_regs, cru_rom_addr); spin_lock_irqsave(&rom_lock, rom_pl);
die_nmi_called = 1; if (!die_nmi_called)
spin_unlock_irqrestore(&rom_lock, rom_pl); asminline_call(&cmn_regs, cru_rom_addr);
if (cmn_regs.u1.ral == 0) { die_nmi_called = 1;
printk(KERN_WARNING "hpwdt: An NMI occurred, " spin_unlock_irqrestore(&rom_lock, rom_pl);
"but unable to determine source.\n"); if (cmn_regs.u1.ral == 0) {
} else { printk(KERN_WARNING "hpwdt: An NMI occurred, "
if (allow_kdump) "but unable to determine source.\n");
hpwdt_stop(); } else {
panic("An NMI occurred, please see the Integrated " if (allow_kdump)
"Management Log for details.\n"); hpwdt_stop();
} panic("An NMI occurred, please see the Integrated "
"Management Log for details.\n");
} }
out:
return NOTIFY_OK; return NOTIFY_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment