hw/rdma: Use correct print format in CHK_ATTR macro
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> Message-Id: <20180322095220.9976-3-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
This commit is contained in:
parent
9bbb8d3577
commit
94f480b8db
|
@ -668,8 +668,8 @@ void rdma_backend_destroy_qp(RdmaBackendQP *qp)
|
||||||
#define CHK_ATTR(req, dev, member, fmt) ({ \
|
#define CHK_ATTR(req, dev, member, fmt) ({ \
|
||||||
pr_dbg("%s="fmt","fmt"\n", #member, dev.member, req->member); \
|
pr_dbg("%s="fmt","fmt"\n", #member, dev.member, req->member); \
|
||||||
if (req->member > dev.member) { \
|
if (req->member > dev.member) { \
|
||||||
warn_report("%s = 0x%lx is higher than host device capability 0x%lx", \
|
warn_report("%s = "fmt" is higher than host device capability "fmt, \
|
||||||
#member, (uint64_t)req->member, (uint64_t)dev.member); \
|
#member, req->member, dev.member); \
|
||||||
req->member = dev.member; \
|
req->member = dev.member; \
|
||||||
} \
|
} \
|
||||||
pr_dbg("%s="fmt"\n", #member, req->member); })
|
pr_dbg("%s="fmt"\n", #member, req->member); })
|
||||||
|
|
Loading…
Reference in a new issue