diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-03 04:09:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-03 04:09:03 -0400 |
commit | a454ab3110175d710f4f9a96226a26ce4d5d5de2 (patch) | |
tree | 5244b639232b2fe7d9c8806ed784881042967607 /arch/x86/mm/fault.c | |
parent | 9518e0e4350a5ea8ca200ce320b28d6284a7b0ce (diff) |
x86, mm: fault.c, use printk_once() in is_errata93()
Andrew pointed out that the 'once' variable has a needlessly
function-global scope. We can in fact eliminate it completely,
via the use of printk_once().
[ Impact: cleanup ]
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 24a36a6426ab..b9ca6d767dbb 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -514,8 +514,6 @@ bad: | |||
514 | static int is_errata93(struct pt_regs *regs, unsigned long address) | 514 | static int is_errata93(struct pt_regs *regs, unsigned long address) |
515 | { | 515 | { |
516 | #ifdef CONFIG_X86_64 | 516 | #ifdef CONFIG_X86_64 |
517 | static int once; | ||
518 | |||
519 | if (address != regs->ip) | 517 | if (address != regs->ip) |
520 | return 0; | 518 | return 0; |
521 | 519 | ||
@@ -525,10 +523,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address) | |||
525 | address |= 0xffffffffUL << 32; | 523 | address |= 0xffffffffUL << 32; |
526 | if ((address >= (u64)_stext && address <= (u64)_etext) || | 524 | if ((address >= (u64)_stext && address <= (u64)_etext) || |
527 | (address >= MODULES_VADDR && address <= MODULES_END)) { | 525 | (address >= MODULES_VADDR && address <= MODULES_END)) { |
528 | if (!once) { | 526 | printk_once(errata93_warning); |
529 | printk(errata93_warning); | ||
530 | once = 1; | ||
531 | } | ||
532 | regs->ip = address; | 527 | regs->ip = address; |
533 | return 1; | 528 | return 1; |
534 | } | 529 | } |