Skip to content

Commit

Permalink
rpmsg: fix build warning when dma_addr_t is 64-bit
Browse files Browse the repository at this point in the history
dev_dbg() in rpmsg_probe() made use of the %x formatting that
expects an 'unsigned int' which dma_addr_t is not in cases where
dma_addr_t is 64-bit (CONFIG_ARCH_DMA_ADDR_T_64BIT). Casting to
a 'unsigned long long' and using %llx will avoid this.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
CC: Ohad Ben-Cohen <ohad@wizery.com>
CC: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
  • Loading branch information
masselstine authored and ohadbc committed Mar 4, 2012
1 parent f1d9e9c commit 9d8ae5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/rpmsg/virtio_rpmsg_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,8 @@ static int rpmsg_probe(struct virtio_device *vdev)
if (!bufs_va)
goto vqs_del;

dev_dbg(&vdev->dev, "buffers: va %p, dma 0x%x\n", bufs_va,
vrp->bufs_dma);
dev_dbg(&vdev->dev, "buffers: va %p, dma 0x%llx\n", bufs_va,
(unsigned long long)vrp->bufs_dma);

/* half of the buffers is dedicated for RX */
vrp->rbufs = bufs_va;
Expand Down

0 comments on commit 9d8ae5c

Please sign in to comment.