Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753603AbdHKQDs (ORCPT ); Fri, 11 Aug 2017 12:03:48 -0400 Received: from mail-yw0-f176.google.com ([209.85.161.176]:33930 "EHLO mail-yw0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120AbdHKQDp (ORCPT ); Fri, 11 Aug 2017 12:03:45 -0400 Date: Fri, 11 Aug 2017 12:03:43 -0400 From: Sean Paul To: Cihangir Akturk Cc: daniel@ffwll.ch, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Daniel Vetter , Chris Wilson , Laura Abbott , Sean Paul , Andrew Morton , Miklos Szeredi , Wei Yongjun , Brian Norris , Nicolai =?iso-8859-1?Q?H=E4hnle?= , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [PATCH v3 25/28] drm/vgem: switch to drm_*_get(), drm_*_put() helpers Message-ID: <20170811160343.5yo6nse6pyp7e2js@art_vandelay> References: <1502454794-28558-1-git-send-email-cakturk@gmail.com> <1502454794-28558-26-git-send-email-cakturk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1502454794-28558-26-git-send-email-cakturk@gmail.com> User-Agent: NeoMutt/20170306-66-6ddb52-dirty (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1992 Lines: 63 On Fri, Aug 11, 2017 at 03:33:11PM +0300, Cihangir Akturk wrote: > Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() > and drm_*_unreference() helpers. > > drm_*_reference() and drm_*_unreference() functions are just > compatibility alias for drm_*_get() and drm_*_put() and should not be > used by new code. So convert all users of compatibility functions to > use the new APIs. > > Generated by: scripts/coccinelle/api/drm-get-put.cocci > > Signed-off-by: Cihangir Akturk Applied to drm-misc-next, thank you! Sean > --- > drivers/gpu/drm/vgem/vgem_drv.c | 4 ++-- > drivers/gpu/drm/vgem/vgem_fence.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c > index 1228967..2524ff1 100644 > --- a/drivers/gpu/drm/vgem/vgem_drv.c > +++ b/drivers/gpu/drm/vgem/vgem_drv.c > @@ -190,7 +190,7 @@ static struct drm_gem_object *vgem_gem_create(struct drm_device *dev, > return ERR_CAST(obj); > > ret = drm_gem_handle_create(file, &obj->base, handle); > - drm_gem_object_unreference_unlocked(&obj->base); > + drm_gem_object_put_unlocked(&obj->base); > if (ret) > goto err; > > @@ -245,7 +245,7 @@ static int vgem_gem_dumb_map(struct drm_file *file, struct drm_device *dev, > > *offset = drm_vma_node_offset_addr(&obj->vma_node); > unref: > - drm_gem_object_unreference_unlocked(obj); > + drm_gem_object_put_unlocked(obj); > > return ret; > } > diff --git a/drivers/gpu/drm/vgem/vgem_fence.c b/drivers/gpu/drm/vgem/vgem_fence.c > index 3109c83..8fd52f2 100644 > --- a/drivers/gpu/drm/vgem/vgem_fence.c > +++ b/drivers/gpu/drm/vgem/vgem_fence.c > @@ -213,7 +213,7 @@ int vgem_fence_attach_ioctl(struct drm_device *dev, > dma_fence_put(fence); > } > err: > - drm_gem_object_unreference_unlocked(obj); > + drm_gem_object_put_unlocked(obj); > return ret; > } > > -- > 2.7.4 > -- Sean Paul, Software Engineer, Google / Chromium OS