diff options
author | Aishwarya Pant <aishpant@gmail.com> | 2017-09-26 10:28:49 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-09-26 13:12:15 +0200 |
commit | 9a96f55034e41b4e002b767e9218d55f03bdff7d (patch) | |
tree | 8e07ec45164d06dec20ed21c81bc7de3cd8af8a1 /scripts/coccinelle | |
parent | drm/rockchip: Cocci spatch "vma_pages" (diff) | |
download | linux-9a96f55034e41b4e002b767e9218d55f03bdff7d.tar.xz linux-9a96f55034e41b4e002b767e9218d55f03bdff7d.zip |
drm: introduce drm_dev_{get/put} functions
Reference counting functions in the kernel typically use get/put suffixes. For
maintaining coding style consistency, introduce drm_dev_{get/put} functions. All
callers of drm_dev_ref() API have been converted in this patch and hence it has
been dropped while the drm_dev_unref() API with non-trivial number of users
remains for compatibility.
The semantic patch scripts/coccinelle/api/drm-get-put.cocci has been updated
with the new helper for conversion of drm_dev_unref() to drm_dev_put()
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/6babda56134035a98220d5d37a4fd4048df214ce.1506413698.git.aishpant@gmail.com
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r-- | scripts/coccinelle/api/drm-get-put.cocci | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci index 0c7a9265c07e..dc10dee356c2 100644 --- a/scripts/coccinelle/api/drm-get-put.cocci +++ b/scripts/coccinelle/api/drm-get-put.cocci @@ -50,6 +50,9 @@ expression object; | - drm_property_unreference_blob(object) + drm_property_blob_put(object) +| +- drm_dev_unref(object) ++ drm_dev_put(object) ) @r depends on report@ @@ -81,6 +84,8 @@ drm_gem_object_unreference_unlocked(object) drm_property_unreference_blob@p(object) | drm_property_reference_blob@p(object) +| +drm_dev_unref@p(object) ) @script:python depends on report@ |