From: Randy Dunlap <rdunlap@infradead.org>
To: Joe Perches <joe@perches.com>, Linux MM <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] mm/hugetlb.c: fix printk format warning for 32-bit phys_addr_t
Date: Wed, 18 Mar 2020 19:11:05 -0700 [thread overview]
Message-ID: <ff8cc527-e02e-4f4b-56cd-a94ac5e527a3@infradead.org> (raw)
In-Reply-To: <f4f8090c1be1a5a5ca663345751fb39893c89814.camel@perches.com>
On 3/18/20 7:04 PM, Joe Perches wrote:
> On Wed, 2020-03-18 at 14:33 -0700, Randy Dunlap wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix printk format warnings when phys_addr_t is 32 bits, i.e.,
>> CONFIG_PHYS_ADDR_T_64BIT is not set/enabled.
> []
>> ../mm/hugetlb.c:5472:73: note: format string is defined here
>> pr_warn("hugetlb_cma: reservation failed: err %d, node %d, [%llu, %llu)",
>> ~~~^
> []
>> --- linux-next-20200318.orig/mm/hugetlb.c
>> +++ linux-next-20200318/mm/hugetlb.c
>> @@ -5469,8 +5469,10 @@ void __init hugetlb_cma_reserve(int orde
>> 0, false,
>> "hugetlb", &hugetlb_cma[nid]);
>> if (res) {
>> - pr_warn("hugetlb_cma: reservation failed: err %d, node %d, [%llu, %llu)",
>> - res, nid, PFN_PHYS(min_pfn), PFN_PHYS(max_pfn));
>> + phys_addr_t begpa = PFN_PHYS(min_pfn);
>> + phys_addr_t endpa = PFN_PHYS(max_pfn);
>> + pr_warn("hugetlb_cma: reservation failed: err %d, node %d, [%pap, %pap)",
>> + res, nid, &begpa, &endpa);
>
> You might correct the odd use of an open bracket
> then close parenthesis and add a new line too
Definitely needs a newline char.
I'm fairly sure that the [begin, end) notation is done on purpose, meaning
<begin> is included in the range and <end> is not included in the range.
>
> Perhaps:
> pr_warn("%s: reservation failed: err %d, node %d, [%pap, %pap]\n",
> __func__, res, nid, &begpa, &endpa);
>
>
thanks.
--
~Randy
next prev parent reply other threads:[~2020-03-19 2:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 21:33 Randy Dunlap
2020-03-19 2:04 ` Joe Perches
2020-03-19 2:11 ` Randy Dunlap [this message]
2020-03-19 2:37 ` Joe Perches
2020-03-20 1:03 ` Randy Dunlap
2020-03-20 1:06 ` Joe Perches
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=ff8cc527-e02e-4f4b-56cd-a94ac5e527a3@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--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