gpu: drm: radeon: Adding new typedef vm_fault_t
authorSouptick Joarder <jrdr.linux@gmail.com>
Mon, 16 Apr 2018 13:43:51 +0000 (19:13 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Jun 2018 18:17:38 +0000 (13:17 -0500)
Use new return type vm_fault_t for fault handler
in vm_operations_struct.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_ttm.c

index 8689fcca051c7b8b0af795e258d40fb33682915c..cbb67e9ffb3a52f413564f82db87dd0ece44c37e 100644 (file)
@@ -947,11 +947,11 @@ void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size)
 static struct vm_operations_struct radeon_ttm_vm_ops;
 static const struct vm_operations_struct *ttm_vm_ops = NULL;
 
-static int radeon_ttm_fault(struct vm_fault *vmf)
+static vm_fault_t radeon_ttm_fault(struct vm_fault *vmf)
 {
        struct ttm_buffer_object *bo;
        struct radeon_device *rdev;
-       int r;
+       vm_fault_t ret;
 
        bo = (struct ttm_buffer_object *)vmf->vma->vm_private_data;
        if (bo == NULL) {
@@ -959,9 +959,9 @@ static int radeon_ttm_fault(struct vm_fault *vmf)
        }
        rdev = radeon_get_rdev(bo->bdev);
        down_read(&rdev->pm.mclk_lock);
-       r = ttm_vm_ops->fault(vmf);
+       ret = ttm_vm_ops->fault(vmf);
        up_read(&rdev->pm.mclk_lock);
-       return r;
+       return ret;
 }
 
 int radeon_mmap(struct file *filp, struct vm_area_struct *vma)