diff options
author | Yuval Shaia <yuval.shaia@oracle.com> | 2018-03-22 11:52:20 +0200 |
---|---|---|
committer | Marcel Apfelbaum <marcel@redhat.com> | 2018-03-23 18:38:55 +0300 |
commit | 6f559013c86d16255991ca23e47bd161407b95c8 (patch) | |
tree | 8aa0a99fcf9c3f39cd53bac8722d586846bd2144 /hw/rdma/vmw/pvrdma_cmd.c | |
parent | 94f480b8db137ee499c7457dbcf7eb6e1ef5b482 (diff) |
hw/rdma: Fix 32-bit compilation
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.
Suggested-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-4-yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Diffstat (limited to 'hw/rdma/vmw/pvrdma_cmd.c')
-rw-r--r-- | hw/rdma/vmw/pvrdma_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 5bd4643f2d..99019d8741 100644 --- a/hw/rdma/vmw/pvrdma_cmd.c +++ b/hw/rdma/vmw/pvrdma_cmd.c @@ -85,7 +85,7 @@ static void *pvrdma_map_to_pdir(PCIDevice *pdev, uint64_t pdir_dma, } } - pr_dbg("guest_dma[%d]=0x%lx\n", addr_idx, tbl[tbl_idx]); + pr_dbg("guest_dma[%d]=0x%" PRIx64 "\n", addr_idx, tbl[tbl_idx]); curr_page = rdma_pci_dma_map(pdev, (dma_addr_t)tbl[tbl_idx], TARGET_PAGE_SIZE); @@ -285,7 +285,7 @@ static int create_cq_ring(PCIDevice *pci_dev , PvrdmaRing **ring, goto out_free_ring; } - sprintf(ring_name, "cq_ring_%lx", pdir_dma); + sprintf(ring_name, "cq_ring_%" PRIx64, pdir_dma); rc = pvrdma_ring_init(r, ring_name, pci_dev, &r->ring_state[1], cqe, sizeof(struct pvrdma_cqe), /* first page is ring state */ @@ -415,7 +415,7 @@ static int create_qp_rings(PCIDevice *pci_dev, uint64_t pdir_dma, wqe_sz = pow2ceil(sizeof(struct pvrdma_sq_wqe_hdr) + sizeof(struct pvrdma_sge) * smax_sge - 1); - sprintf(ring_name, "qp_sring_%lx", pdir_dma); + sprintf(ring_name, "qp_sring_%" PRIx64, pdir_dma); rc = pvrdma_ring_init(sr, ring_name, pci_dev, sr->ring_state, scqe, wqe_sz, (dma_addr_t *)&tbl[1], spages); if (rc) { @@ -426,7 +426,7 @@ static int create_qp_rings(PCIDevice *pci_dev, uint64_t pdir_dma, rr->ring_state = &sr->ring_state[1]; wqe_sz = pow2ceil(sizeof(struct pvrdma_rq_wqe_hdr) + sizeof(struct pvrdma_sge) * rmax_sge - 1); - sprintf(ring_name, "qp_rring_%lx", pdir_dma); + sprintf(ring_name, "qp_rring_%" PRIx64, pdir_dma); rc = pvrdma_ring_init(rr, ring_name, pci_dev, rr->ring_state, rcqe, wqe_sz, (dma_addr_t *)&tbl[1 + spages], rpages); if (rc) { |