Commit 2b86189e authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

drm/v3d: remove _unlocked suffix in drm_gem_object_put_unlocked

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: Eric Anholt <eric@anholt.net>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-33-emil.l.velikov@gmail.com
parent b8912e29
...@@ -185,7 +185,7 @@ int v3d_create_bo_ioctl(struct drm_device *dev, void *data, ...@@ -185,7 +185,7 @@ int v3d_create_bo_ioctl(struct drm_device *dev, void *data,
args->offset = bo->node.start << PAGE_SHIFT; args->offset = bo->node.start << PAGE_SHIFT;
ret = drm_gem_handle_create(file_priv, &bo->base.base, &args->handle); ret = drm_gem_handle_create(file_priv, &bo->base.base, &args->handle);
drm_gem_object_put_unlocked(&bo->base.base); drm_gem_object_put(&bo->base.base);
return ret; return ret;
} }
...@@ -208,7 +208,7 @@ int v3d_mmap_bo_ioctl(struct drm_device *dev, void *data, ...@@ -208,7 +208,7 @@ int v3d_mmap_bo_ioctl(struct drm_device *dev, void *data,
} }
args->offset = drm_vma_node_offset_addr(&gem_obj->vma_node); args->offset = drm_vma_node_offset_addr(&gem_obj->vma_node);
drm_gem_object_put_unlocked(gem_obj); drm_gem_object_put(gem_obj);
return 0; return 0;
} }
...@@ -229,6 +229,6 @@ int v3d_get_bo_offset_ioctl(struct drm_device *dev, void *data, ...@@ -229,6 +229,6 @@ int v3d_get_bo_offset_ioctl(struct drm_device *dev, void *data,
args->offset = bo->node.start << PAGE_SHIFT; args->offset = bo->node.start << PAGE_SHIFT;
drm_gem_object_put_unlocked(gem_obj); drm_gem_object_put(gem_obj);
return 0; return 0;
} }
...@@ -358,7 +358,7 @@ v3d_job_free(struct kref *ref) ...@@ -358,7 +358,7 @@ v3d_job_free(struct kref *ref)
for (i = 0; i < job->bo_count; i++) { for (i = 0; i < job->bo_count; i++) {
if (job->bo[i]) if (job->bo[i])
drm_gem_object_put_unlocked(job->bo[i]); drm_gem_object_put(job->bo[i]);
} }
kvfree(job->bo); kvfree(job->bo);
...@@ -384,7 +384,7 @@ v3d_render_job_free(struct kref *ref) ...@@ -384,7 +384,7 @@ v3d_render_job_free(struct kref *ref)
struct v3d_bo *bo, *save; struct v3d_bo *bo, *save;
list_for_each_entry_safe(bo, save, &job->unref_list, unref_head) { list_for_each_entry_safe(bo, save, &job->unref_list, unref_head) {
drm_gem_object_put_unlocked(&bo->base.base); drm_gem_object_put(&bo->base.base);
} }
v3d_job_free(ref); v3d_job_free(ref);
......
...@@ -72,7 +72,7 @@ v3d_overflow_mem_work(struct work_struct *work) ...@@ -72,7 +72,7 @@ v3d_overflow_mem_work(struct work_struct *work)
V3D_CORE_WRITE(0, V3D_PTB_BPOS, obj->size); V3D_CORE_WRITE(0, V3D_PTB_BPOS, obj->size);
out: out:
drm_gem_object_put_unlocked(obj); drm_gem_object_put(obj);
} }
static irqreturn_t static irqreturn_t
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment