From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764879AbdJRKGX (ORCPT ); Wed, 18 Oct 2017 06:06:23 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:48943 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753916AbdJRKGW (ORCPT ); Wed, 18 Oct 2017 06:06:22 -0400 X-Google-Smtp-Source: AOwi7QB8C4GNB3zAxFHopPefKhQDQyV0+c1cDusGpXMZi+1Y7uOABk+rm/aj+2afVEHQUvUzsBPCMg== Date: Wed, 18 Oct 2017 12:06:17 +0200 From: Daniel Vetter To: Harsha Sharma Cc: daniel.vetter@ffwll.ch, seanpaul@chromium.org, jani.nikula@linux.intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: Re: [PATCH v5] drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() Message-ID: <20171018100616.k755ny2drjeiofpq@phenom.ffwll.local> Mail-Followup-To: Harsha Sharma , seanpaul@chromium.org, jani.nikula@linux.intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com References: <20171014183644.21990-1-harshasharmaiitr@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171014183644.21990-1-harshasharmaiitr@gmail.com> X-Operating-System: Linux phenom 4.12.0-1-amd64 User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 15, 2017 at 12:06:44AM +0530, Harsha Sharma wrote: > Replace instances of drm_framebuffer_reference/unreference() with > *_get/put() suffixes and drm_dev_unref with *_put() suffix > because get/put is shorter and consistent with the > kernel use of *_get/put suffixes. > Done with following coccinelle semantic patch > > @@ > expression ex; > @@ > > ( > -drm_framebuffer_unreference(ex); > +drm_framebuffer_put(ex); > | > -drm_dev_unref(ex); > +drm_dev_put(ex); > | > -drm_framebuffer_reference(ex); > +drm_framebuffer_get(ex); > ) > > Signed-off-by: Harsha Sharma Applied to drm-intel, thanks. -Daniel > --- > Changes in v5: > -rebase drm_dev_put change on drm-tip > Changes in v4: > -change one instance of *_put to *_get > Changes in v3: > -Removed changes in selftests > Changes in v2: > -Added cocinelle patch in log message > -cc to all driver-specific mailing lists > drivers/gpu/drm/i915/i915_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c > index bf467f30c99b..1223961c3700 100644 > --- a/drivers/gpu/drm/i915/i915_pci.c > +++ b/drivers/gpu/drm/i915/i915_pci.c > @@ -645,7 +645,7 @@ static void i915_pci_remove(struct pci_dev *pdev) > struct drm_device *dev = pci_get_drvdata(pdev); > > i915_driver_unload(dev); > - drm_dev_unref(dev); > + drm_dev_put(dev); > } > > static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > -- > 2.11.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch