From: Vladimir Murzin <vladimir.murzin@arm.com>
To: Leon Romanovsky <leon@leon.nu>
Cc: Linux-MM <linux-mm@kvack.org>, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/3] memtest: cleanup log messages
Date: Mon, 22 Jun 2015 09:46:26 +0100 [thread overview]
Message-ID: <5587CB62.4030105@arm.com> (raw)
In-Reply-To: <CALq1K=KU5+s+u-py2oAh9U9iu3Z3yx9CbVNS8xNjpSd7o7639g@mail.gmail.com>
On 20/06/15 07:59, Leon Romanovsky wrote:
> On Fri, Jun 19, 2015 at 5:58 PM, Vladimir Murzin
> <vladimir.murzin@arm.com> wrote:
>> - 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>
>> ---
>> mm/memtest.c | 14 +++++---------
>> 1 file changed, 5 insertions(+), 9 deletions(-)
>>
>> diff --git a/mm/memtest.c b/mm/memtest.c
>> index 895a43c..ccaed3e 100644
>> --- a/mm/memtest.c
>> +++ b/mm/memtest.c
>> @@ -31,10 +31,8 @@ static u64 patterns[] __initdata = {
>>
>> static void __init reserve_bad_mem(u64 pattern, phys_addr_t start_bad, phys_addr_t end_bad)
>> {
>> - printk(KERN_INFO " %016llx bad mem addr %010llx - %010llx reserved\n",
>> - (unsigned long long) pattern,
>> - (unsigned long long) start_bad,
>> - (unsigned long long) end_bad);
>> + pr_info("%016llx bad mem addr %pa - %pa reserved\n",
>> + cpu_to_be64(pattern), &start_bad, &end_bad);
>> memblock_reserve(start_bad, end_bad - start_bad);
>> }
>>
>> @@ -78,10 +76,8 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end)
>> this_start = clamp(this_start, start, end);
>> this_end = clamp(this_end, start, end);
>> if (this_start < this_end) {
>> - printk(KERN_INFO " %010llx - %010llx pattern %016llx\n",
>> - (unsigned long long)this_start,
>> - (unsigned long long)this_end,
>> - (unsigned long long)cpu_to_be64(pattern));
>> + pr_info(" %pa - %pa pattern %016llx\n",
> s/(" %pa/("%pa
I don't think so since these messages belong to the "early_memtest:" and
this whitespace highlights where these logs come from.
Thanks
Vladimir
>> + &this_start, &this_end, cpu_to_be64(pattern));
>> memtest(pattern, this_start, this_end - this_start);
>> }
>> }
>> @@ -114,7 +110,7 @@ void __init early_memtest(phys_addr_t start, phys_addr_t end)
>> if (!memtest_pattern)
>> return;
>>
>> - printk(KERN_INFO "early_memtest: # of tests: %d\n", memtest_pattern);
>> + pr_info("early_memtest: # of tests: %u\n", memtest_pattern);
>> for (i = memtest_pattern-1; i < UINT_MAX; --i) {
>> idx = i % ARRAY_SIZE(patterns);
>> do_one_pass(patterns[idx], start, end);
>> --
>> 1.7.9.5
>>
>> --
>> To unsubscribe, send a message with 'unsubscribe linux-mm' in
>> the body to majordomo@kvack.org. For more info on Linux MM,
>> see: http://www.linux-mm.org/ .
>> Don't email: <a hrefmailto:"dont@kvack.org"> email@kvack.org </a>
>
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-06-22 8:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 14:58 [PATCH 0/3] memtest cleanups Vladimir Murzin
2015-06-19 14:58 ` [PATCH 1/3] memtest: use kstrtouint instead of simple_strtoul Vladimir Murzin
2015-06-20 6:55 ` Leon Romanovsky
2015-06-22 8:39 ` Vladimir Murzin
2015-06-22 10:43 ` Leon Romanovsky
2015-06-22 11:39 ` Vladimir Murzin
2015-06-19 14:58 ` [PATCH 2/3] memtest: cleanup log messages Vladimir Murzin
2015-06-20 6:59 ` Leon Romanovsky
2015-06-22 8:46 ` Vladimir Murzin [this message]
2015-06-19 14:58 ` [PATCH 3/3] memtest: remove unused header files Vladimir Murzin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5587CB62.4030105@arm.com \
--to=vladimir.murzin@arm.com \
--cc=akpm@linux-foundation.org \
--cc=leon@leon.nu \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).