drm/ttm: Remove explicit typecasts of vm_private_data
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 25 Sep 2019 13:11:22 +0000 (15:11 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 4 Nov 2019 12:02:16 +0000 (13:02 +0100)
The explicit typcasts are meaningless, so remove them.

Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/332899/
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/ttm_bo_vm.c

index 4b34a278d65b8477fd0287d29d03a88ed8834bf6..2fa226c61c6f32e8a2cf8306133f32b9777bc2a1 100644 (file)
@@ -109,8 +109,7 @@ static unsigned long ttm_bo_io_mem_pfn(struct ttm_buffer_object *bo,
 static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf)
 {
        struct vm_area_struct *vma = vmf->vma;
-       struct ttm_buffer_object *bo = (struct ttm_buffer_object *)
-           vma->vm_private_data;
+       struct ttm_buffer_object *bo = vma->vm_private_data;
        struct ttm_bo_device *bdev = bo->bdev;
        unsigned long page_offset;
        unsigned long page_last;
@@ -300,8 +299,7 @@ out_unlock:
 
 static void ttm_bo_vm_open(struct vm_area_struct *vma)
 {
-       struct ttm_buffer_object *bo =
-           (struct ttm_buffer_object *)vma->vm_private_data;
+       struct ttm_buffer_object *bo = vma->vm_private_data;
 
        WARN_ON(bo->bdev->dev_mapping != vma->vm_file->f_mapping);
 
@@ -310,7 +308,7 @@ static void ttm_bo_vm_open(struct vm_area_struct *vma)
 
 static void ttm_bo_vm_close(struct vm_area_struct *vma)
 {
-       struct ttm_buffer_object *bo = (struct ttm_buffer_object *)vma->vm_private_data;
+       struct ttm_buffer_object *bo = vma->vm_private_data;
 
        ttm_bo_put(bo);
        vma->vm_private_data = NULL;