mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
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: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: akpm@linux-foundation.org Cc: arjan@linux.intel.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
a726c6009e
commit
875e40b975
@ -221,8 +221,7 @@ static int pageattr_test(void)
|
||||
failed += print_split(&sc);
|
||||
|
||||
if (failed) {
|
||||
printk(KERN_ERR "NOT PASSED. Please report.\n");
|
||||
WARN_ON(1);
|
||||
WARN(1, KERN_ERR "NOT PASSED. Please report.\n");
|
||||
return -EINVAL;
|
||||
} else {
|
||||
if (print)
|
||||
|
@ -592,10 +592,9 @@ repeat:
|
||||
if (!pte_val(old_pte)) {
|
||||
if (!primary)
|
||||
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,
|
||||
cpa->vaddr);
|
||||
WARN_ON(1);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user