dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>,
	David Airlie <airlied@linux.ie>,
	daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org,
	outreachy-kernel@googlegroups.com,
	VMware Graphics <linux-graphics-maintainer@vmware.com>
Subject: Re: [PATCH DRM] drm/vmwgfx: replace drm_*_unreference with drm_*_put
Date: Mon, 12 Mar 2018 18:34:43 +0100	[thread overview]
Message-ID: <20180312173443.GP8589@phenom.ffwll.local> (raw)
In-Reply-To: <20180311233313.GA19721@Haneen>

On Sun, Mar 11, 2018 at 05:33:13PM -0600, Haneen Mohammed wrote:
> This patch replace instances of drm_framebuffer_unreference with _put()
> suffix, because it is shorter and consistent with the kernel use of
> *_get/put() suffixes.
> This was done with the following Coccinelle script:
> 
> @r@
> expression e;
> @@
> 
> (
> -drm_framebuffer_reference(e);
> +drm_framebuffer_get(e);
> |
> -drm_framebuffer_unreference(e);
> +drm_framebuffer_put(e);
> )
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Sinclair/Thomas: Ok if I pull this in through drm-misc? Makes outreachy
applicant book-keeping easier since iirc the vmwgfx tree isn't in
linux-next. But ok if you want to merge it too.
-Daniel


> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fb.c    | 2 +-
>  drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> index d23a18a..be7d7fb 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> @@ -500,7 +500,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par,
>  	}
>  
>  	if (cur_fb) {
> -		drm_framebuffer_unreference(cur_fb);
> +		drm_framebuffer_put(cur_fb);
>  		par->set_fb = NULL;
>  	}
>  
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
> index 67f8446..c5e8eae 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
> @@ -316,7 +316,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
>  out_no_surface:
>  	ttm_read_unlock(&dev_priv->reservation_sem);
>  out_no_ttm_lock:
> -	drm_framebuffer_unreference(fb);
> +	drm_framebuffer_put(fb);
>  out_no_fb:
>  	drm_modeset_unlock_all(dev);
>  out_no_copy:
> @@ -393,7 +393,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
>  
>  	ttm_read_unlock(&dev_priv->reservation_sem);
>  out_no_ttm_lock:
> -	drm_framebuffer_unreference(fb);
> +	drm_framebuffer_put(fb);
>  out_no_fb:
>  	drm_modeset_unlock_all(dev);
>  out_no_copy:
> -- 
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-03-12 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11 23:33 [PATCH DRM] drm/vmwgfx: replace drm_*_unreference with drm_*_put Haneen Mohammed
2018-03-12 17:34 ` Daniel Vetter [this message]
2018-03-12 17:42   ` Sinclair Yeh
2018-03-13 10:44     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180312173443.GP8589@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=thellstrom@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox