summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2015-09-08 18:00:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-08 18:35:28 -0400
commitf373bafcad68834761b40da9cecda842f43d4797 (patch)
treed92cc9c7133b43a3c89a64b41cb10efe3cdba06a
parent06f805965fc205e27681eee99fd2376fafd8da65 (diff)
memtest: cleanup log messages
- prefer pr_info(... to printk(KERN_INFO ... - use %pa for phys_addr_t - use cpu_to_be64 while printing pattern in reserve_bad_mem() Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Cc: Leon Romanovsky <leon@leon.nu> 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>
-rw-r--r--mm/memtest.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/mm/memtest.c b/mm/memtest.c
index 20e836138e00..6bcf7d89adfc 100644
--- a/mm/memtest.c
+++ b/mm/memtest.c
@@ -31,10 +31,8 @@ static u64 patterns[] __initdata = {
31 31
32static void __init reserve_bad_mem(u64 pattern, phys_addr_t start_bad, phys_addr_t end_bad) 32static void __init reserve_bad_mem(u64 pattern, phys_addr_t start_bad, phys_addr_t end_bad)
33{ 33{
34 printk(KERN_INFO " %016llx bad mem addr %010llx - %010llx reserved\n", 34 pr_info(" %016llx bad mem addr %pa - %pa reserved\n",
35 (unsigned long long) pattern, 35 cpu_to_be64(pattern), &start_bad, &end_bad);
36 (unsigned long long) start_bad,
37 (unsigned long long) end_bad);
38 memblock_reserve(start_bad, end_bad - start_bad); 36 memblock_reserve(start_bad, end_bad - start_bad);
39} 37}
40 38
@@ -79,10 +77,8 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end)
79 this_start = clamp(this_start, start, end); 77 this_start = clamp(this_start, start, end);
80 this_end = clamp(this_end, start, end); 78 this_end = clamp(this_end, start, end);
81 if (this_start < this_end) { 79 if (this_start < this_end) {
82 printk(KERN_INFO " %010llx - %010llx pattern %016llx\n", 80 pr_info(" %pa - %pa pattern %016llx\n",
83 (unsigned long long)this_start, 81 &this_start, &this_end, cpu_to_be64(pattern));
84 (unsigned long long)this_end,
85 (unsigned long long)cpu_to_be64(pattern));
86 memtest(pattern, this_start, this_end - this_start); 82 memtest(pattern, this_start, this_end - this_start);
87 } 83 }
88 } 84 }
@@ -113,7 +109,7 @@ void __init early_memtest(phys_addr_t start, phys_addr_t end)
113 if (!memtest_pattern) 109 if (!memtest_pattern)
114 return; 110 return;
115 111
116 printk(KERN_INFO "early_memtest: # of tests: %d\n", memtest_pattern); 112 pr_info("early_memtest: # of tests: %u\n", memtest_pattern);
117 for (i = memtest_pattern-1; i < UINT_MAX; --i) { 113 for (i = memtest_pattern-1; i < UINT_MAX; --i) {
118 idx = i % ARRAY_SIZE(patterns); 114 idx = i % ARRAY_SIZE(patterns);
119 do_one_pass(patterns[idx], start, end); 115 do_one_pass(patterns[idx], start, end);