From patchwork Thu Oct 4 22:18:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [08/11] vfio-pci: Use uintptr_t for void* cast Date: Thu, 04 Oct 2012 12:18:25 -0000 From: Alex Williamson X-Patchwork-Id: 189360 Message-Id: <20121004221824.3189.34018.stgit@bling.home> To: qemu-devel@nongnu.org Cc: alex.williamson@redhat.com We don't seem to run into any sign extension problems, but unsigned looks more correct. Signed-off-by: Alex williamson --- hw/vfio_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index d62ddd1..0ca77cf 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -907,7 +907,7 @@ static int vfio_dma_map(VFIOContainer *container, target_phys_addr_t iova, struct vfio_iommu_type1_dma_map map = { .argsz = sizeof(map), .flags = VFIO_DMA_MAP_FLAG_READ, - .vaddr = (__u64)(intptr_t)vaddr, + .vaddr = (__u64)(uintptr_t)vaddr, .iova = iova, .size = size, };