History

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()

Aishwarya Pant committed 9 years ago

Commit 9a96f551 parent f2a44dd4 files · +41 −22Browse files

Showing the changes to scripts (1 of 4 files). Show all

Unified · Split

scripts/coccinelle/api/drm-get-put.cocci+5−0
@@ -50,6 +50,9 @@ expression object; · 49 unmodified lines
50|50|
51- drm_property_unreference_blob(object)51- drm_property_unreference_blob(object)
52+ drm_property_blob_put(object)52+ drm_property_blob_put(object)
53|
54- drm_dev_unref(object)
55+ drm_dev_put(object)
53)56)
54 57
55@r depends on report@58@r depends on report@
@@ -81,6 +84,8 @@ drm_gem_object_unreference_unlocked(object) · 25 unmodified lines
81drm_property_unreference_blob@p(object)84drm_property_unreference_blob@p(object)
82|85|
83drm_property_reference_blob@p(object)86drm_property_reference_blob@p(object)
87|
88drm_dev_unref@p(object)
84)89)
85 90
86@script:python depends on report@91@script:python depends on report@