]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/virtio: Replace instances of reference/unreference with get/put
authorSrishti Sharma <srishtishar@gmail.com>
Fri, 29 Sep 2017 10:03:39 +0000 (15:33 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 2 Oct 2017 07:48:54 +0000 (09:48 +0200)
Replace reference/unreference with get/put as it is consistent
with the kernel coding style. Done using the following semantic
patch by coccinelle.

@r@
expression e;
@@

-drm_gem_object_unreference_unlocked(e);
+drm_gem_object_put_unlocked(e);

Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1506679419-7130-1-git-send-email-srishtishar@gmail.com
drivers/gpu/drm/virtio/virtgpu_display.c
drivers/gpu/drm/virtio/virtgpu_gem.c
drivers/gpu/drm/virtio/virtgpu_ioctl.c

index b6d52055a11fc5ec180a96481a193c21e9860a5f..41b0930f79681a366f1a2f754d0e19a07d972cff 100644 (file)
@@ -53,7 +53,7 @@ static void virtio_gpu_user_framebuffer_destroy(struct drm_framebuffer *fb)
        struct virtio_gpu_framebuffer *virtio_gpu_fb
                = to_virtio_gpu_framebuffer(fb);
 
-       drm_gem_object_unreference_unlocked(virtio_gpu_fb->obj);
+       drm_gem_object_put_unlocked(virtio_gpu_fb->obj);
        drm_framebuffer_cleanup(fb);
        kfree(virtio_gpu_fb);
 }
@@ -327,7 +327,7 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
        ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj);
        if (ret) {
                kfree(virtio_gpu_fb);
-               drm_gem_object_unreference_unlocked(obj);
+               drm_gem_object_put_unlocked(obj);
                return NULL;
        }
 
index 72ad7b103448b826a85db0645c66fa89c04533a0..92fb27753b9e1cd4febaa4208f459af414746dba 100644 (file)
@@ -72,7 +72,7 @@ int virtio_gpu_gem_create(struct drm_file *file,
        *obj_p = &obj->gem_base;
 
        /* drop reference from allocate - handle holds it now */
-       drm_gem_object_unreference_unlocked(&obj->gem_base);
+       drm_gem_object_put_unlocked(&obj->gem_base);
 
        *handle_p = handle;
        return 0;
@@ -130,7 +130,7 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv,
                return -ENOENT;
        obj = gem_to_virtio_gpu_obj(gobj);
        *offset_p = virtio_gpu_object_mmap_offset(obj);
-       drm_gem_object_unreference_unlocked(gobj);
+       drm_gem_object_put_unlocked(gobj);
        return 0;
 }
 
index b94bd5440e5779ac96ebdfa10b9b48adef53e7db..0528edb4a2bfe0ed9f2a5d8a272b1b1af8c284cd 100644 (file)
@@ -86,7 +86,7 @@ static void virtio_gpu_unref_list(struct list_head *head)
                bo = buf->bo;
                qobj = container_of(bo, struct virtio_gpu_object, tbo);
 
-               drm_gem_object_unreference_unlocked(&qobj->gem_base);
+               drm_gem_object_put_unlocked(&qobj->gem_base);
        }
 }
 
@@ -304,7 +304,7 @@ static int virtio_gpu_resource_create_ioctl(struct drm_device *dev, void *data,
                }
                return ret;
        }
-       drm_gem_object_unreference_unlocked(obj);
+       drm_gem_object_put_unlocked(obj);
 
        rc->res_handle = res_id; /* similiar to a VM address */
        rc->bo_handle = handle;
@@ -341,7 +341,7 @@ static int virtio_gpu_resource_info_ioctl(struct drm_device *dev, void *data,
 
        ri->size = qobj->gem_base.size;
        ri->res_handle = qobj->hw_res_handle;
-       drm_gem_object_unreference_unlocked(gobj);
+       drm_gem_object_put_unlocked(gobj);
        return 0;
 }
 
@@ -389,7 +389,7 @@ static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev,
 out_unres:
        virtio_gpu_object_unreserve(qobj);
 out:
-       drm_gem_object_unreference_unlocked(gobj);
+       drm_gem_object_put_unlocked(gobj);
        return ret;
 }
 
@@ -439,7 +439,7 @@ static int virtio_gpu_transfer_to_host_ioctl(struct drm_device *dev, void *data,
 out_unres:
        virtio_gpu_object_unreserve(qobj);
 out:
-       drm_gem_object_unreference_unlocked(gobj);
+       drm_gem_object_put_unlocked(gobj);
        return ret;
 }
 
@@ -462,7 +462,7 @@ static int virtio_gpu_wait_ioctl(struct drm_device *dev, void *data,
                nowait = true;
        ret = virtio_gpu_object_wait(qobj, nowait);
 
-       drm_gem_object_unreference_unlocked(gobj);
+       drm_gem_object_put_unlocked(gobj);
        return ret;
 }