diff mbox series

[v2,37/38] drm/xen: remove _unlocked suffix in drm_object_put_unlocked

Message ID 20200515095118.2743122-38-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show
Series Fareless gem_free_object | expand

Commit Message

Emil Velikov May 15, 2020, 9:51 a.m. UTC
From: Emil Velikov <emil.velikov@collabora.com>

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: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/xen/xen_drm_front.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Oleksandr Andrushchenko May 15, 2020, 10:12 a.m. UTC | #1
On 5/15/20 12:51 PM, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
>
> 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: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> ---
>   drivers/gpu/drm/xen/xen_drm_front.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
> index 1fd458e877ca..3e660fb111b3 100644
> --- a/drivers/gpu/drm/xen/xen_drm_front.c
> +++ b/drivers/gpu/drm/xen/xen_drm_front.c
> @@ -419,7 +419,7 @@ static int xen_drm_drv_dumb_create(struct drm_file *filp,
>   		goto fail_handle;
>   
>   	/* Drop reference from allocate - handle holds it now */
> -	drm_gem_object_put_unlocked(obj);
> +	drm_gem_object_put(obj);
>   	return 0;
>   
>   fail_handle:
> @@ -427,7 +427,7 @@ static int xen_drm_drv_dumb_create(struct drm_file *filp,
>   				   xen_drm_front_dbuf_to_cookie(obj));
>   fail_backend:
>   	/* drop reference from allocate */
> -	drm_gem_object_put_unlocked(obj);
> +	drm_gem_object_put(obj);
>   fail:
>   	DRM_ERROR("Failed to create dumb buffer: %d\n", ret);
>   	return ret;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
index 1fd458e877ca..3e660fb111b3 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.c
+++ b/drivers/gpu/drm/xen/xen_drm_front.c
@@ -419,7 +419,7 @@  static int xen_drm_drv_dumb_create(struct drm_file *filp,
 		goto fail_handle;
 
 	/* Drop reference from allocate - handle holds it now */
-	drm_gem_object_put_unlocked(obj);
+	drm_gem_object_put(obj);
 	return 0;
 
 fail_handle:
@@ -427,7 +427,7 @@  static int xen_drm_drv_dumb_create(struct drm_file *filp,
 				   xen_drm_front_dbuf_to_cookie(obj));
 fail_backend:
 	/* drop reference from allocate */
-	drm_gem_object_put_unlocked(obj);
+	drm_gem_object_put(obj);
 fail:
 	DRM_ERROR("Failed to create dumb buffer: %d\n", ret);
 	return ret;