From: Marcel Apfelbaum <marcel@redhat.com>
To: Yuval Shaia <yuval.shaia@oracle.com>, Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.12] rdma: Fix 32-bit compilation
Date: Wed, 21 Mar 2018 18:52:48 +0200 [thread overview]
Message-ID: <777824c3-4fd9-9690-d3a0-8e17c45e46fc@redhat.com> (raw)
In-Reply-To: <20180320104348.GA3268@yuvallap>
On 20/03/2018 12:43, Yuval Shaia wrote:
> On Mon, Mar 19, 2018 at 04:53:35PM -0500, Eric Blake wrote:
>> Use the correct printf formats, so that a 32-bit compile doesn't
>> spit out lots of warnings about %lx being incompatible with uint64_t.
>> Broken since initial commit ef6d4ccd.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>> ---
>>
>> I don't know if 'make vm-build-ubuntu.i368' would catch this (it failed
>> for me for other reasons); I found it via a 32-bit rawhide VM.
>>
>> hw/rdma/rdma_backend.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
>> index e306fba5344..89020fdcf62 100644
>> --- a/hw/rdma/rdma_backend.c
>> +++ b/hw/rdma/rdma_backend.c
>> @@ -656,7 +656,8 @@ void rdma_backend_destroy_qp(RdmaBackendQP *qp)
>> #define CHK_ATTR(req, dev, member, fmt) ({ \
>> pr_dbg("%s="fmt","fmt"\n", #member, dev.member, req->member); \
>> if (req->member > dev.member) { \
>> - warn_report("%s = 0x%lx is higher than host device capability 0x%lx", \
>> + warn_report("%s = 0x%" PRIx64 " is higher than host device " \
>> + "capability 0x%" PRIx64, \
>> #member, (uint64_t)req->member, (uint64_t)dev.member); \
>
> Hmmm, interesting.
> I wonder why in first place to cast all members to uint64_t.
> Can you try the method that is used above in the call to pr_dbg, i.e. to
> use the given argument fmt?
> > Something like this:
> warn_report("%s = "fmt" is higher than host device capability "fmt, \
> #member, req->member, dev.member); \
>
>> req->member = dev.member; \
>> } \
Right, it seems to be a better solution.
Eric/Yuval, will you send a patch for it?
Thanks!
Marcel
>> --
>> 2.14.3
>>
prev parent reply other threads:[~2018-03-21 16:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 21:53 [Qemu-devel] [PATCH for-2.12] rdma: Fix 32-bit compilation Eric Blake
2018-03-19 22:08 ` Eric Blake
2018-03-20 10:36 ` Marcel Apfelbaum
2018-03-20 10:30 ` Marcel Apfelbaum
2018-03-21 1:46 ` Fam Zheng
2018-03-21 2:07 ` Fam Zheng
2018-03-21 9:20 ` Marcel Apfelbaum
2018-03-21 9:34 ` Fam Zheng
2018-03-20 10:43 ` Yuval Shaia
2018-03-21 16:52 ` Marcel Apfelbaum [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=777824c3-4fd9-9690-d3a0-8e17c45e46fc@redhat.com \
--to=marcel@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=yuval.shaia@oracle.com \
/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).