Skip to content

Commit

Permalink
x86: use WARN() in arch/x86/mm/pageattr.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Aug 13, 2008
1 parent a726c60 commit 875e40b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions arch/x86/mm/pageattr-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,9 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
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;
}

Expand Down

0 comments on commit 875e40b

Please sign in to comment.