diff options
author | dann frazier <dannf@hp.com> | 2010-07-27 19:50:49 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2010-08-13 16:54:48 -0400 |
commit | 243066bad7e4ff5072b4e67063c4298d5bbba9cd (patch) | |
tree | 3c72f59ae38d9785428f80e17022afa2091e9035 /drivers | |
parent | aae67f3602d8869c8ab1b34b6ba9206e9fff4b16 (diff) |
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: dann frazier <dannf@hp.com>
Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/hpwdt.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 554526cf3233..7ce73170fa37 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -465,24 +465,26 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, | |||
465 | static int die_nmi_called; | 465 | static int die_nmi_called; |
466 | 466 | ||
467 | if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI) | 467 | if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI) |
468 | return NOTIFY_OK; | 468 | goto out; |
469 | 469 | ||
470 | if (hpwdt_nmi_sourcing) { | 470 | if (!hpwdt_nmi_sourcing) |
471 | spin_lock_irqsave(&rom_lock, rom_pl); | 471 | goto out; |
472 | if (!die_nmi_called) | 472 | |
473 | asminline_call(&cmn_regs, cru_rom_addr); | 473 | spin_lock_irqsave(&rom_lock, rom_pl); |
474 | die_nmi_called = 1; | 474 | if (!die_nmi_called) |
475 | spin_unlock_irqrestore(&rom_lock, rom_pl); | 475 | asminline_call(&cmn_regs, cru_rom_addr); |
476 | if (cmn_regs.u1.ral == 0) { | 476 | die_nmi_called = 1; |
477 | printk(KERN_WARNING "hpwdt: An NMI occurred, " | 477 | spin_unlock_irqrestore(&rom_lock, rom_pl); |
478 | "but unable to determine source.\n"); | 478 | if (cmn_regs.u1.ral == 0) { |
479 | } else { | 479 | printk(KERN_WARNING "hpwdt: An NMI occurred, " |
480 | if (allow_kdump) | 480 | "but unable to determine source.\n"); |
481 | hpwdt_stop(); | 481 | } else { |
482 | panic("An NMI occurred, please see the Integrated " | 482 | if (allow_kdump) |
483 | "Management Log for details.\n"); | 483 | hpwdt_stop(); |
484 | } | 484 | panic("An NMI occurred, please see the Integrated " |
485 | "Management Log for details.\n"); | ||
485 | } | 486 | } |
487 | out: | ||
486 | return NOTIFY_OK; | 488 | return NOTIFY_OK; |
487 | } | 489 | } |
488 | 490 | ||