From: Alex Williamson Date: Mon, 8 Oct 2012 14:45:30 +0000 (-0600) Subject: vfio-pci: Use uintptr_t for void* cast X-Git-Tag: v1.3.0-rc0~300^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5976cdd58b657692e8c1af5310d55a60aecc9089;p=thirdparty%2Fqemu.git vfio-pci: Use uintptr_t for void* cast We don't seem to run into any sign extension problems, but unsigned looks more correct. Signed-off-by: Alex williamson --- diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index d62ddd152f9..0ca77cf9d13 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, };