All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: cleanup: use drm_framebuffer_reference instead of a kref_get
@ 2013-04-10  8:59 Archit Taneja
  2013-04-10  9:18 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Archit Taneja @ 2013-04-10  8:59 UTC (permalink / raw)
  To: daniel; +Cc: dri-devel

drm_framebuffer_lookup() does a kref_get() for the framebuffer if it finds one
corresponding to the fb id passed to it. Use drm_framebuffer_reference() instead
for clarity since it's the function used in other places to take a reference.

Signed-off-by: Archit Taneja <archit@ti.com>
---
 drivers/gpu/drm/drm_crtc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index dd64a06..a3b63cf 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -412,7 +412,7 @@ struct drm_framebuffer *drm_framebuffer_lookup(struct drm_device *dev,
 	mutex_lock(&dev->mode_config.fb_lock);
 	fb = __drm_framebuffer_lookup(dev, id);
 	if (fb)
-		kref_get(&fb->refcount);
+		drm_framebuffer_reference(fb);
 	mutex_unlock(&dev->mode_config.fb_lock);
 
 	return fb;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm: cleanup: use drm_framebuffer_reference instead of a kref_get
  2013-04-10  8:59 [PATCH] drm: cleanup: use drm_framebuffer_reference instead of a kref_get Archit Taneja
@ 2013-04-10  9:18 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2013-04-10  9:18 UTC (permalink / raw)
  To: Archit Taneja; +Cc: dri-devel

On Wed, Apr 10, 2013 at 02:29:39PM +0530, Archit Taneja wrote:
> drm_framebuffer_lookup() does a kref_get() for the framebuffer if it finds one
> corresponding to the fb id passed to it. Use drm_framebuffer_reference() instead
> for clarity since it's the function used in other places to take a reference.
> 
> Signed-off-by: Archit Taneja <archit@ti.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/drm_crtc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index dd64a06..a3b63cf 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -412,7 +412,7 @@ struct drm_framebuffer *drm_framebuffer_lookup(struct drm_device *dev,
>  	mutex_lock(&dev->mode_config.fb_lock);
>  	fb = __drm_framebuffer_lookup(dev, id);
>  	if (fb)
> -		kref_get(&fb->refcount);
> +		drm_framebuffer_reference(fb);
>  	mutex_unlock(&dev->mode_config.fb_lock);
>  
>  	return fb;
> -- 
> 1.7.10.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-10  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10  8:59 [PATCH] drm: cleanup: use drm_framebuffer_reference instead of a kref_get Archit Taneja
2013-04-10  9:18 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.