qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yuval Shaia <yuval.shaia@oracle.com>
To: yuval.shaia@oracle.com, marcel@redhat.com, eblake@redhat.com,
	f4bug@amsat.org, qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH v2 for-2.12 2/3] hw/rdma: Use correct print format in CHK_ATTR macro
Date: Thu, 22 Mar 2018 11:52:19 +0200	[thread overview]
Message-ID: <20180322095220.9976-3-yuval.shaia@oracle.com> (raw)
In-Reply-To: <20180322095220.9976-1-yuval.shaia@oracle.com>

Macro should not cast the given variable to u64 instead it should use
the supplied format argument (fmt).

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/rdma/rdma_backend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index f1a37ba4a2..0391a7dd95 100644
--- a/hw/rdma/rdma_backend.c
+++ b/hw/rdma/rdma_backend.c
@@ -656,8 +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", \
-                    #member, (uint64_t)req->member, (uint64_t)dev.member); \
+        warn_report("%s = "fmt" is higher than host device capability "fmt, \
+                    #member, req->member, dev.member); \
         req->member = dev.member; \
     } \
     pr_dbg("%s="fmt"\n", #member, req->member); })
-- 
2.13.6

  parent reply	other threads:[~2018-03-22  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22  9:52 [Qemu-devel] [PATCH v2 for-2.12 0/3] hw/rdma: Fix 32-bit compilation Yuval Shaia
2018-03-22  9:52 ` [Qemu-devel] [PATCH v2 for-2.12 1/3] hw/rdma: Change host_virt to void * Yuval Shaia
2018-03-22  9:52 ` Yuval Shaia [this message]
2018-03-22  9:52 ` [Qemu-devel] [PATCH v2 for-2.12 3/3] hw/rdma: Fix 32-bit compilation Yuval Shaia

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=20180322095220.9976-3-yuval.shaia@oracle.com \
    --to=yuval.shaia@oracle.com \
    --cc=eblake@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).