diff mbox series

[02/36] drm/gem: use _unlocked reference in drm_gem_objects_lookup docs

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

Commit Message

Emil Velikov May 7, 2020, 3:07 p.m. UTC
From: Emil Velikov <emil.velikov@collabora.com>

Use the drm_gem_object_put_unlocked in the documentation for
drm_gem_objects_lookup. The locked version of the helper should be used
solely by people who know exactly what they are doing.

Should prevent issues like ones adddressed with the next patch.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 drivers/gpu/drm/drm_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sam Ravnborg May 7, 2020, 5:58 p.m. UTC | #1
Hi Emil.

On Thu, May 07, 2020 at 04:07:48PM +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
> 
> Use the drm_gem_object_put_unlocked in the documentation for
> drm_gem_objects_lookup. The locked version of the helper should be used
> solely by people who know exactly what they are doing.
> 
> Should prevent issues like ones adddressed with the next patch.
> 
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> ---
>  drivers/gpu/drm/drm_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
> index 7bf628e13023..918d1ba25f63 100644
> --- a/drivers/gpu/drm/drm_gem.c
> +++ b/drivers/gpu/drm/drm_gem.c
> @@ -690,7 +690,7 @@ static int objects_lookup(struct drm_file *filp, u32 *handle, int count,
>   * Returns:
>   *
>   * @objs filled in with GEM object pointers. Returned GEM objects need to be
> - * released with drm_gem_object_put(). -ENOENT is returned on a lookup
> + * released with drm_gem_object_put_unlocked(). -ENOENT is returned on a lookup
>   * failure. 0 is returned on success.
>   *
>   */

This change seems pointless as you go ahead and drop the _unlocked
suffix a few patches later.

	Sam

> -- 
> 2.25.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 7bf628e13023..918d1ba25f63 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -690,7 +690,7 @@  static int objects_lookup(struct drm_file *filp, u32 *handle, int count,
  * Returns:
  *
  * @objs filled in with GEM object pointers. Returned GEM objects need to be
- * released with drm_gem_object_put(). -ENOENT is returned on a lookup
+ * released with drm_gem_object_put_unlocked(). -ENOENT is returned on a lookup
  * failure. 0 is returned on success.
  *
  */