mm, memory hotplug: print debug message in the proper way for online_pages
authorChen Yucong <slaoub@gmail.com>
Thu, 17 Mar 2016 21:19:35 +0000 (14:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 22:09:34 +0000 (15:09 -0700)
commite33e33b4d1c699d06fb8ccd6da80b309b84ec975
tree998674163dbc357c82c3be860ecbd6a379cc860e
parent0f352e5392c86d054998dd6526f2fdc33ec4bed5
mm, memory hotplug: print debug message in the proper way for online_pages

online_pages() simply returns an error value if
memory_notify(MEM_GOING_ONLINE, &arg) return a value that is not what we
want for successfully onlining target pages.  This patch arms to print
more failure information like offline_pages() in online_pages.

This patch also converts printk(KERN_<LEVEL>) to pr_<level>(), and moves
__offline_pages() to not print failure information with KERN_INFO
according to David Rientjes's suggestion[1].

[1] https://lkml.org/lkml/2016/2/24/1094

Signed-off-by: Chen Yucong <slaoub@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c