dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tdz@users.sourceforge.net>
To: dri-devel@lists.freedesktop.org
Cc: Thomas Zimmermann <tdz@users.sourceforge.net>
Subject: [PATCH 7/7] drm: Clean up after DRM put/get conversion
Date: Sat,  9 Jun 2018 15:18:05 +0200	[thread overview]
Message-ID: <20180609131805.2738-8-tdz@users.sourceforge.net> (raw)
In-Reply-To: <20180609131805.2738-1-tdz@users.sourceforge.net>

All cases of simple conversion from un/reference to put,get have been
fixed. This patch deletes the related, now empty, Coccinelle script;
and removes the item from the DRM's TODO list.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
---
 Documentation/gpu/todo.rst               | 17 ----------------
 scripts/coccinelle/api/drm-get-put.cocci | 35 --------------------------------
 2 files changed, 52 deletions(-)
 delete mode 100644 scripts/coccinelle/api/drm-get-put.cocci

diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index a7c150d6b63f..fbd258ec4883 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -28,23 +28,6 @@ them, but also all the virtual ones used by KVM, so everyone qualifies).
 
 Contact: Daniel Vetter, Thierry Reding, respective driver maintainers
 
-Switch from reference/unreference to get/put
---------------------------------------------
-
-For some reason DRM core uses ``reference``/``unreference`` suffixes for
-refcounting functions, but kernel uses ``get``/``put`` (e.g.
-``kref_get``/``put()``). It would be good to switch over for consistency, and
-it's shorter. Needs to be done in 3 steps for each pair of functions:
-
-* Create new ``get``/``put`` functions, define the old names as compatibility
-  wrappers
-* Switch over each file/driver using a cocci-generated spatch.
-* Once all users of the old names are gone, remove them.
-
-This way drivers/patches in the progress of getting merged won't break.
-
-Contact: Daniel Vetter
-
 Convert existing KMS drivers to atomic modesetting
 --------------------------------------------------
 
diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
deleted file mode 100644
index b51bfaa58b83..000000000000
--- a/scripts/coccinelle/api/drm-get-put.cocci
+++ /dev/null
@@ -1,35 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-///
-/// Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
-/// drm_*_unreference() helpers.
-///
-// Confidence: High
-// Copyright: (C) 2017 NVIDIA Corporation
-// Options: --no-includes --include-headers
-//
-
-virtual patch
-virtual report
-
-@depends on patch@
-expression object;
-@@
-
-(
-)
-
-@r depends on report@
-expression object;
-position p;
-@@
-
-(
-)
-
-@script:python depends on report@
-object << r.object;
-p << r.p;
-@@
-
-msg="WARNING: use get/put helpers to reference and dereference %s" % (object)
-coccilib.report.print_report(p[0], msg)
-- 
2.14.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-06-09 13:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-09 13:17 [PATCH 0/7] Replace {un/reference} with {put,get} functions Thomas Zimmermann
2018-06-09 13:17 ` [PATCH 1/7] drm: Replace drm_connector_{un/reference} with drm_connector_{put, get} Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 2/7] drm: Replace drm_framebuffer_{un/reference} with drm_framebuffer_{put, get} Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 3/7] drm: Replace drm_gem_object_{un/reference} with drm_gem_object_{put, get} Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 4/7] drm: Replace __drm_gem_object_unreference with __drm_gem_object_put Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 5/7] drm: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 6/7] drm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
2018-06-18  8:18   ` Benjamin Gaignard
2018-06-18 14:39   ` Philippe CORNU
2018-06-19 15:25   ` Alex Deucher
2018-06-09 13:18 ` Thomas Zimmermann [this message]
2018-06-18  8:47 ` [PATCH 0/7] Replace {un/reference} with {put,get} functions Daniel Vetter
2018-06-18 11:06   ` Thomas Zimmermann

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=20180609131805.2738-8-tdz@users.sourceforge.net \
    --to=tdz@users.sourceforge.net \
    --cc=dri-devel@lists.freedesktop.org \
    /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