Skip to content

Commit

Permalink
watchdog: hpwdt (9/12): hpwdt_pretimeout reorganization
Browse files Browse the repository at this point in the history
Reorganize this function to remove excess indentation and highlight
the single return code. (No functional change).

Signed-off-by: dann frazier <dannf@hp.com>
Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
dann frazier authored and Wim Van Sebroeck committed Aug 13, 2010
1 parent aae67f3 commit 243066b
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions drivers/watchdog/hpwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,24 +465,26 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason,
static int die_nmi_called;

if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI)
return NOTIFY_OK;

if (hpwdt_nmi_sourcing) {
spin_lock_irqsave(&rom_lock, rom_pl);
if (!die_nmi_called)
asminline_call(&cmn_regs, cru_rom_addr);
die_nmi_called = 1;
spin_unlock_irqrestore(&rom_lock, rom_pl);
if (cmn_regs.u1.ral == 0) {
printk(KERN_WARNING "hpwdt: An NMI occurred, "
"but unable to determine source.\n");
} else {
if (allow_kdump)
hpwdt_stop();
panic("An NMI occurred, please see the Integrated "
"Management Log for details.\n");
}
goto out;

if (!hpwdt_nmi_sourcing)
goto out;

spin_lock_irqsave(&rom_lock, rom_pl);
if (!die_nmi_called)
asminline_call(&cmn_regs, cru_rom_addr);
die_nmi_called = 1;
spin_unlock_irqrestore(&rom_lock, rom_pl);
if (cmn_regs.u1.ral == 0) {
printk(KERN_WARNING "hpwdt: An NMI occurred, "
"but unable to determine source.\n");
} else {
if (allow_kdump)
hpwdt_stop();
panic("An NMI occurred, please see the Integrated "
"Management Log for details.\n");
}
out:
return NOTIFY_OK;
}

Expand Down

0 comments on commit 243066b

Please sign in to comment.