mm/huge_memory.c: complete conversion to pr_foo()
It was using a mix of pr_foo() and printk(KERN_ERR ...). Cc: Rik van Riel <riel@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ff9e43eb4f
commit
ae3a8c1c23
|
@ -5,6 +5,8 @@
|
||||||
* the COPYING file in the top-level directory.
|
* the COPYING file in the top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/highmem.h>
|
#include <linux/highmem.h>
|
||||||
|
@ -151,8 +153,7 @@ static int start_khugepaged(void)
|
||||||
khugepaged_thread = kthread_run(khugepaged, NULL,
|
khugepaged_thread = kthread_run(khugepaged, NULL,
|
||||||
"khugepaged");
|
"khugepaged");
|
||||||
if (unlikely(IS_ERR(khugepaged_thread))) {
|
if (unlikely(IS_ERR(khugepaged_thread))) {
|
||||||
printk(KERN_ERR
|
pr_err("khugepaged: kthread_run(khugepaged) failed\n");
|
||||||
"khugepaged: kthread_run(khugepaged) failed\n");
|
|
||||||
err = PTR_ERR(khugepaged_thread);
|
err = PTR_ERR(khugepaged_thread);
|
||||||
khugepaged_thread = NULL;
|
khugepaged_thread = NULL;
|
||||||
}
|
}
|
||||||
|
@ -584,19 +585,19 @@ static int __init hugepage_init_sysfs(struct kobject **hugepage_kobj)
|
||||||
|
|
||||||
*hugepage_kobj = kobject_create_and_add("transparent_hugepage", mm_kobj);
|
*hugepage_kobj = kobject_create_and_add("transparent_hugepage", mm_kobj);
|
||||||
if (unlikely(!*hugepage_kobj)) {
|
if (unlikely(!*hugepage_kobj)) {
|
||||||
printk(KERN_ERR "hugepage: failed to create transparent hugepage kobject\n");
|
pr_err("failed to create transparent hugepage kobject\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = sysfs_create_group(*hugepage_kobj, &hugepage_attr_group);
|
err = sysfs_create_group(*hugepage_kobj, &hugepage_attr_group);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "hugepage: failed to register transparent hugepage group\n");
|
pr_err("failed to register transparent hugepage group\n");
|
||||||
goto delete_obj;
|
goto delete_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = sysfs_create_group(*hugepage_kobj, &khugepaged_attr_group);
|
err = sysfs_create_group(*hugepage_kobj, &khugepaged_attr_group);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "hugepage: failed to register transparent hugepage group\n");
|
pr_err("failed to register transparent hugepage group\n");
|
||||||
goto remove_hp_group;
|
goto remove_hp_group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -689,8 +690,7 @@ static int __init setup_transparent_hugepage(char *str)
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
if (!ret)
|
if (!ret)
|
||||||
printk(KERN_WARNING
|
pr_warn("transparent_hugepage= cannot parse, ignored\n");
|
||||||
"transparent_hugepage= cannot parse, ignored\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
__setup("transparent_hugepage=", setup_transparent_hugepage);
|
__setup("transparent_hugepage=", setup_transparent_hugepage);
|
||||||
|
@ -1831,8 +1831,8 @@ static void __split_huge_page(struct page *page,
|
||||||
* walk, to be able to set it as pmd_trans_splitting too.
|
* walk, to be able to set it as pmd_trans_splitting too.
|
||||||
*/
|
*/
|
||||||
if (mapcount != page_mapcount(page)) {
|
if (mapcount != page_mapcount(page)) {
|
||||||
printk(KERN_ERR "mapcount %d page_mapcount %d\n",
|
pr_err("mapcount %d page_mapcount %d\n",
|
||||||
mapcount, page_mapcount(page));
|
mapcount, page_mapcount(page));
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1846,8 +1846,8 @@ static void __split_huge_page(struct page *page,
|
||||||
mapcount2 += __split_huge_page_map(page, vma, addr);
|
mapcount2 += __split_huge_page_map(page, vma, addr);
|
||||||
}
|
}
|
||||||
if (mapcount != mapcount2) {
|
if (mapcount != mapcount2) {
|
||||||
printk(KERN_ERR "mapcount %d mapcount2 %d page_mapcount %d\n",
|
pr_err("mapcount %d mapcount2 %d page_mapcount %d\n",
|
||||||
mapcount, mapcount2, page_mapcount(page));
|
mapcount, mapcount2, page_mapcount(page));
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue