qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Alexey Kardashevskiy <aik@ozlabs.ru>
Subject: Re: [Qemu-devel] [Qemu-ppc]  [PATCH qemu] spapr: Fix fdt warnings
Date: Wed, 16 Jan 2019 14:37:41 +0100	[thread overview]
Message-ID: <20190116143741.0cc91a8f@bahia.lan> (raw)
In-Reply-To: <alpine.BSF.2.21.9999.1901161259260.16452@zero.eik.bme.hu>

On Wed, 16 Jan 2019 13:01:46 +0100 (CET)
BALATON Zoltan <balaton@eik.bme.hu> wrote:

> On Wed, 16 Jan 2019, Richard Henderson wrote:
> > On 1/16/19 3:19 PM, Alexey Kardashevskiy wrote:  
> >> 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".  
> >
> > This file is not solely for kvm, i.e. ppc64 hosts.  Thus this
> > is a bad assumption and will fail for a 32-bit host.
> >
> > You may want to use PRIx64 and assume hwaddr == uint64_t, or
> > also include an explicit cast to uint64_t.  
> 
> I don't know the context of this but there's HWADDR_PRIx as well so if you 
> want to print a hwaddr that's probably the one to use.
> 

Good suggestion, "%" HWADDR_PRIx does the job.

Cheers,

--
Greg

> Regards,
> BALATON Zoltan
> 

  reply	other threads:[~2019-01-16 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  4:19 [Qemu-devel] [PATCH qemu] spapr: Fix fdt warnings Alexey Kardashevskiy
2019-01-16  6:17 ` Richard Henderson
2019-01-16 12:01   ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2019-01-16 13:37     ` Greg Kurz [this message]
2019-01-17  3:13     ` Alexey Kardashevskiy
2019-01-21  9:12 ` [Qemu-devel] " no-reply

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=20190116143741.0cc91a8f@bahia.lan \
    --to=groug@kaod.org \
    --cc=aik@ozlabs.ru \
    --cc=balaton@eik.bme.hu \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.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).