aboutsummaryrefslogtreecommitdiff
path: root/kmod
diff options
context:
space:
mode:
authorSwapnil Ingle <swapnil.ingle@nutanix.com>2019-12-05 11:42:06 -0500
committerThanos <tmakatos@gmail.com>2019-12-05 17:09:18 +0000
commit2d774b83fac02d7cec699a9464c72d17dbbbe6ed (patch)
treee86cb6fa7c189884c1bc3632d357a4f411851c72 /kmod
parent380f37d57139ddf2569e30b720a175bbc2af2608 (diff)
downloadlibvfio-user-2d774b83fac02d7cec699a9464c72d17dbbbe6ed.zip
libvfio-user-2d774b83fac02d7cec699a9464c72d17dbbbe6ed.tar.gz
libvfio-user-2d774b83fac02d7cec699a9464c72d17dbbbe6ed.tar.bz2
muser: fix the type of nr_pages
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'kmod')
-rw-r--r--kmod/muser.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kmod/muser.c b/kmod/muser.c
index 9c7ef9e..cbf3509 100644
--- a/kmod/muser.c
+++ b/kmod/muser.c
@@ -626,7 +626,7 @@ static int muser_process_dma_unmap(struct muser_dev *mudev,
}
static void put_dma_map(struct muser_dev *mudev,
- struct vfio_dma_mapping *dma_map, int nr_pages)
+ struct vfio_dma_mapping *dma_map, unsigned long nr_pages)
{
unsigned long off, iova_pfn;
int i, ret;
@@ -649,7 +649,8 @@ get_dma_map(struct muser_dev *mudev, struct vfio_dma_mapping *dma_map,
unsigned long iova, vaddr;
unsigned long iova_pfn, phys_pfn;
unsigned long length, off;
- int pgflag, ret, nr_pages = 0;
+ int pgflag, ret;
+ unsigned long nr_pages = 0;
struct page **pages;
length = map->size;
@@ -777,7 +778,7 @@ static int muser_iommu_dma_unmap(struct muser_dev *const mudev,
struct vfio_iommu_type1_dma_unmap *const unmap)
{
int err;
- int len;
+ unsigned long len;
struct vfio_dma_mapping *dma_map;
mutex_lock(&mudev->dev_lock);