Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753587AbdHKQDk (ORCPT ); Fri, 11 Aug 2017 12:03:40 -0400 Received: from mail-yw0-f170.google.com ([209.85.161.170]:35936 "EHLO mail-yw0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753557AbdHKQDf (ORCPT ); Fri, 11 Aug 2017 12:03:35 -0400 Date: Fri, 11 Aug 2017 12:03:33 -0400 From: Sean Paul To: Cihangir Akturk Cc: daniel@ffwll.ch, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Dave Airlie , David Airlie , Daniel Vetter , Alex Deucher , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Laurent Pinchart , Sean Paul , Stefan Christ , Krzysztof Kozlowski , David Herrmann , Gabriel Krisman Bertazi , Andrew Morton , Christian =?iso-8859-1?Q?K=F6nig?= , Arnd Bergmann , Jan Kara , Michal Hocko , Dave Jiang Subject: Re: [PATCH v3 23/28] drm/udl: switch to drm_*_get(), drm_*_put() helpers Message-ID: <20170811160333.ccahmbgp74uif6hy@art_vandelay> References: <1502454794-28558-1-git-send-email-cakturk@gmail.com> <1502454794-28558-24-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-24-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: 2667 Lines: 81 On Fri, Aug 11, 2017 at 03:33:09PM +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/udl/udl_fb.c | 6 +++--- > drivers/gpu/drm/udl/udl_gem.c | 4 ++-- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c > index 77a2c59..b7ca90d 100644 > --- a/drivers/gpu/drm/udl/udl_fb.c > +++ b/drivers/gpu/drm/udl/udl_fb.c > @@ -309,7 +309,7 @@ static void udl_user_framebuffer_destroy(struct drm_framebuffer *fb) > struct udl_framebuffer *ufb = to_udl_fb(fb); > > if (ufb->obj) > - drm_gem_object_unreference_unlocked(&ufb->obj->base); > + drm_gem_object_put_unlocked(&ufb->obj->base); > > drm_framebuffer_cleanup(fb); > kfree(ufb); > @@ -403,7 +403,7 @@ static int udlfb_create(struct drm_fb_helper *helper, > > return ret; > out_gfree: > - drm_gem_object_unreference_unlocked(&ufbdev->ufb.obj->base); > + drm_gem_object_put_unlocked(&ufbdev->ufb.obj->base); > out: > return ret; > } > @@ -419,7 +419,7 @@ static void udl_fbdev_destroy(struct drm_device *dev, > drm_fb_helper_fini(&ufbdev->helper); > drm_framebuffer_unregister_private(&ufbdev->ufb.base); > drm_framebuffer_cleanup(&ufbdev->ufb.base); > - drm_gem_object_unreference_unlocked(&ufbdev->ufb.obj->base); > + drm_gem_object_put_unlocked(&ufbdev->ufb.obj->base); > } > > int udl_fbdev_init(struct drm_device *dev) > diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c > index db9cece..dee6bd9 100644 > --- a/drivers/gpu/drm/udl/udl_gem.c > +++ b/drivers/gpu/drm/udl/udl_gem.c > @@ -52,7 +52,7 @@ udl_gem_create(struct drm_file *file, > return ret; > } > > - drm_gem_object_unreference_unlocked(&obj->base); > + drm_gem_object_put_unlocked(&obj->base); > *handle_p = handle; > return 0; > } > @@ -234,7 +234,7 @@ int udl_gem_mmap(struct drm_file *file, struct drm_device *dev, > *offset = drm_vma_node_offset_addr(&gobj->base.vma_node); > > out: > - drm_gem_object_unreference(&gobj->base); > + drm_gem_object_put(&gobj->base); > unlock: > mutex_unlock(&dev->struct_mutex); > return ret; > -- > 2.7.4 > -- Sean Paul, Software Engineer, Google / Chromium OS