Commit 875e40b9 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Ingo Molnar

x86: use WARN() in arch/x86/mm/pageattr.c

Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes
part of the warning section for better reporting/collection.
Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: akpm@linux-foundation.org
Cc: arjan@linux.intel.com
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a726c600
...@@ -221,8 +221,7 @@ static int pageattr_test(void) ...@@ -221,8 +221,7 @@ static int pageattr_test(void)
failed += print_split(&sc); failed += print_split(&sc);
if (failed) { if (failed) {
printk(KERN_ERR "NOT PASSED. Please report.\n"); WARN(1, KERN_ERR "NOT PASSED. Please report.\n");
WARN_ON(1);
return -EINVAL; return -EINVAL;
} else { } else {
if (print) if (print)
......
...@@ -592,10 +592,9 @@ repeat: ...@@ -592,10 +592,9 @@ repeat:
if (!pte_val(old_pte)) { if (!pte_val(old_pte)) {
if (!primary) if (!primary)
return 0; return 0;
printk(KERN_WARNING "CPA: called for zero pte. " WARN(1, KERN_WARNING "CPA: called for zero pte. "
"vaddr = %lx cpa->vaddr = %lx\n", address, "vaddr = %lx cpa->vaddr = %lx\n", address,
cpa->vaddr); cpa->vaddr);
WARN_ON(1);
return -EINVAL; return -EINVAL;
} }
......
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