]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/qxl: remove _unlocked suffix in drm_gem_object_put_unlocked
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 15 May 2020 09:51:08 +0000 (10:51 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 19 May 2020 21:31:34 +0000 (22:31 +0100)
Spelling out _unlocked for each and every driver is a annoying.
Especially if we consider how many drivers, do not know (or need to)
about the horror stories involving struct_mutex.

Just drop the suffix. It makes the API cleaner.

Done via the following script:

__from=drm_gem_object_put_unlocked
__to=drm_gem_object_put
for __file in $(git grep --name-only $__from); do
  sed -i  "s/$__from/$__to/g" $__file;
done

Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-29-emil.l.velikov@gmail.com
drivers/gpu/drm/qxl/qxl_cmd.c
drivers/gpu/drm/qxl/qxl_display.c
drivers/gpu/drm/qxl/qxl_dumb.c
drivers/gpu/drm/qxl/qxl_gem.c
drivers/gpu/drm/qxl/qxl_ioctl.c
drivers/gpu/drm/qxl/qxl_object.c

index d1086b2a6892ceb1a15dfc90936fe500d5fae72a..3104af3d86b80ff923f934ab3e41f588ba0d916a 100644 (file)
@@ -377,7 +377,7 @@ void qxl_io_destroy_primary(struct qxl_device *qdev)
 {
        wait_for_io_cmd(qdev, 0, QXL_IO_DESTROY_PRIMARY_ASYNC);
        qdev->primary_bo->is_primary = false;
-       drm_gem_object_put_unlocked(&qdev->primary_bo->tbo.base);
+       drm_gem_object_put(&qdev->primary_bo->tbo.base);
        qdev->primary_bo = NULL;
 }
 
index 1082cd5d2fd47c20aeff3ecf10d079ff4c3c385b..e403b37118d168c3c067ee9ffe3ea50799c138d5 100644 (file)
@@ -783,7 +783,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
                    qdev->dumb_shadow_bo->surf.width  != surf.width ||
                    qdev->dumb_shadow_bo->surf.height != surf.height) {
                        if (qdev->dumb_shadow_bo) {
-                               drm_gem_object_put_unlocked
+                               drm_gem_object_put
                                        (&qdev->dumb_shadow_bo->tbo.base);
                                qdev->dumb_shadow_bo = NULL;
                        }
@@ -793,7 +793,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
                }
                if (user_bo->shadow != qdev->dumb_shadow_bo) {
                        if (user_bo->shadow) {
-                               drm_gem_object_put_unlocked
+                               drm_gem_object_put
                                        (&user_bo->shadow->tbo.base);
                                user_bo->shadow = NULL;
                        }
@@ -828,7 +828,7 @@ static void qxl_plane_cleanup_fb(struct drm_plane *plane,
        qxl_bo_unpin(user_bo);
 
        if (old_state->fb != plane->state->fb && user_bo->shadow) {
-               drm_gem_object_put_unlocked(&user_bo->shadow->tbo.base);
+               drm_gem_object_put(&user_bo->shadow->tbo.base);
                user_bo->shadow = NULL;
        }
 }
index 24e903383aa17c22231a1b5e326a327f86c896f3..c04cd5a2553ce96cc52bce4e7d0ba65209037ee1 100644 (file)
@@ -83,6 +83,6 @@ int qxl_mode_dumb_mmap(struct drm_file *file_priv,
                return -ENOENT;
        qobj = gem_to_qxl_bo(gobj);
        *offset_p = qxl_bo_mmap_offset(qobj);
-       drm_gem_object_put_unlocked(gobj);
+       drm_gem_object_put(gobj);
        return 0;
 }
index 5ff6fa9b799c5a29122038f9a95106a2fea23a1c..48e096285b4c6a2f5917fbcbe72c3f01bd4fce5c 100644 (file)
@@ -97,7 +97,7 @@ int qxl_gem_object_create_with_handle(struct qxl_device *qdev,
                return r;
        /* drop reference from allocate - handle holds it now */
        *qobj = gem_to_qxl_bo(gobj);
-       drm_gem_object_put_unlocked(gobj);
+       drm_gem_object_put(gobj);
        return 0;
 }
 
index d9a583966949dfa5560438dd86f8f90cb61f27d5..5dc78990990addd467693001e47252416a99ff8d 100644 (file)
@@ -125,7 +125,7 @@ static int qxlhw_handle_to_bo(struct drm_file *file_priv, uint64_t handle,
        qobj = gem_to_qxl_bo(gobj);
 
        ret = qxl_release_list_add(release, qobj);
-       drm_gem_object_put_unlocked(gobj);
+       drm_gem_object_put(gobj);
        if (ret)
                return ret;
 
@@ -347,7 +347,7 @@ out2:
        qxl_bo_unreserve(qobj);
 
 out:
-       drm_gem_object_put_unlocked(gobj);
+       drm_gem_object_put(gobj);
        return ret;
 }
 
index edc8a9916872c76444022026f2967f5b34f17b1d..80e7a17aaddde00b2f2bd67080008ae2571cdda5 100644 (file)
@@ -224,7 +224,7 @@ void qxl_bo_unref(struct qxl_bo **bo)
        if ((*bo) == NULL)
                return;
 
-       drm_gem_object_put_unlocked(&(*bo)->tbo.base);
+       drm_gem_object_put(&(*bo)->tbo.base);
        *bo = NULL;
 }
 
@@ -326,7 +326,7 @@ void qxl_bo_force_delete(struct qxl_device *qdev)
                list_del_init(&bo->list);
                mutex_unlock(&qdev->gem.mutex);
                /* this should unref the ttm bo */
-               drm_gem_object_put_unlocked(&bo->tbo.base);
+               drm_gem_object_put(&bo->tbo.base);
        }
 }