From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Reza Arbab <arbab@linux.vnet.ibm.com>
Cc: Balbir Singh <bsingharora@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message
Date: Thu, 22 Dec 2016 23:58:21 +0100 [thread overview]
Message-ID: <c0796a79-b30a-2e59-c36e-b9d2b4415d04@gmx.de> (raw)
In-Reply-To: <20161222214917.7g6ldgkdvrlqsyq3@arbab-laptop.austin.ibm.com>
On 12/22/2016 10:49 PM, Reza Arbab wrote:
> On Thu, Dec 22, 2016 at 06:52:45AM +0100, Heinrich Schuchardt wrote:
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index c9b5cac03b36..fd129b6e5396 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -1057,7 +1057,7 @@ int __init early_init_dt_scan_memory(unsigned
>> long node, const char *uname,
>>
>> if (early_init_dt_mark_hotplug_memory_arch(base, size))
>> pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
>> - base, base + size);
>> + base, base + size - 1);
>> }
>>
>> return 0;
>
> Isn't it implied that ranges printed this way are [start, end)?
>
> If not, the entire file should be fixed, not just this occurrence.
>
The output in the file drivers/of/fdt.c is currently inconsistent.
Alternative output formats are
pr_err("Reserved memory not supported, ignoring range %pa - %pa%s\n",
&base, &size, nomap ? " (nomap)" : "");
and
pr_debug("Reserved memory: reserved region for node '%s': base %pa, size
%ld MiB\n", uname, &base, (unsigned long)size / SZ_1M);
(Here we will see size = 0 for values less then 1 MiB.)
I expect intervals to be closed and not half open if not explicitly
indicated otherwise.
So I suggest we change all occurrences of interval output in
drivers/of/fdt.c to
0xfirstbyte - 0xlastbyte
where firstbyte = base and lastbyte = base + size - 1.
Using the %pa format code ensures that the length of the output matches
the bitness of address pointers in the system.
Best regards
Heinrich Schuchardt
prev parent reply other threads:[~2016-12-22 22:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 5:34 Heinrich Schuchardt
2016-12-22 5:52 ` Fwd: " Heinrich Schuchardt
2016-12-22 21:31 ` Frank Rowand
2016-12-22 21:49 ` Reza Arbab
2016-12-22 22:58 ` Heinrich Schuchardt [this message]
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=c0796a79-b30a-2e59-c36e-b9d2b4415d04@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=arbab@linux.vnet.ibm.com \
--cc=bsingharora@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.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
all inboxes | Powered by JetHome®