From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: "Alexey Kardashevskiy" <aik@ozlabs.ru>,
qemu-ppc@nongnu.org, "David Gibson" <david@gibson.dropbear.id.au>,
"Greg Kurz" <groug@kaod.org>,
"Daniel P . Berrangé" <berrange@redhat.com>
Subject: [Qemu-devel] [PATCH qemu 3/3] spapr: Fix fdt warnings
Date: Tue, 11 Dec 2018 16:49:26 +1100 [thread overview]
Message-ID: <20181211054926.56717-4-aik@ozlabs.ru> (raw)
In-Reply-To: <20181211054926.56717-1-aik@ozlabs.ru>
The FDT blob which the spapr machine renders at reset time produces
warnings like this:
my-181211-154309.dts: Warning (unit_address_format): Node /memory@0000000080000000 unit name should not have leading 0s
my-181211-154309.dts: Warning (unit_address_format): Node /memory@0000000040000000 unit name should not have leading 0s
my-181211-154309.dts: Warning (unit_address_format): Node /memory@0000000020000000 unit name should not have leading 0s
my-181211-154309.dts: Warning (unit_address_format): Node /memory@0000000010000000 unit name should not have leading 0s
my-181211-154309.dts: Warning (unit_address_format): Node /memory@0000000000000000 unit name should not have leading 0s
because TARGET_FMT_lx is defined as "%016"PRIx64.
This uses simple "%lx" to suppress the warning. Since it is spapr which
is always 64bit, we assume here that hwaddr is always "long".
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
hw/ppc/spapr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 984bf32..be565f0 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -376,7 +376,7 @@ static int spapr_populate_memory_node(void *fdt, int nodeid, hwaddr start,
mem_reg_property[0] = cpu_to_be64(start);
mem_reg_property[1] = cpu_to_be64(size);
- sprintf(mem_name, "memory@" TARGET_FMT_lx, start);
+ sprintf(mem_name, "memory@%lx", start);
off = fdt_add_subnode(fdt, 0, mem_name);
_FDT(off);
_FDT((fdt_setprop_string(fdt, off, "device_type", "memory")));
--
2.17.1
prev parent reply other threads:[~2018-12-11 5:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 5:49 [Qemu-devel] [PATCH qemu 0/3] ppc/spapr: Receive and store device tree blob from SLOF Alexey Kardashevskiy
2018-12-11 5:49 ` [Qemu-devel] [PATCH qemu 1/3] configure/fdt: Use more strict test for libfdt version Alexey Kardashevskiy
2018-12-11 9:31 ` Daniel P. Berrangé
2018-12-11 16:16 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2018-12-11 5:49 ` [Qemu-devel] [PATCH qemu 2/3] ppc/spapr: Receive and store device tree blob from SLOF Alexey Kardashevskiy
2018-12-11 16:35 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2018-12-11 23:57 ` Alexey Kardashevskiy
2018-12-12 9:46 ` Greg Kurz
2018-12-13 2:53 ` Alexey Kardashevskiy
2018-12-13 7:59 ` Greg Kurz
2018-12-11 5:49 ` Alexey Kardashevskiy [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=20181211054926.56717-4-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=berrange@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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).