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()
Showing the changes to scripts (1 of 4 files). Show all
Unified · Split
| @@ -50,6 +50,9 @@ expression object; · 49 unmodified lines | ||
| 50 | 50 | | |
| 51 | 51 | - drm_property_unreference_blob(object) |
| 52 | 52 | + drm_property_blob_put(object) |
| 53 | +| | |
| 54 | +- drm_dev_unref(object) | |
| 55 | ++ drm_dev_put(object) | |
| 53 | 56 | ) |
| 54 | 57 | |
| 55 | 58 | @r depends on report@ |
| @@ -81,6 +84,8 @@ drm_gem_object_unreference_unlocked(object) · 25 unmodified lines | ||
| 81 | 84 | drm_property_unreference_blob@p(object) |
| 82 | 85 | | |
| 83 | 86 | drm_property_reference_blob@p(object) |
| 87 | +| | |
| 88 | +drm_dev_unref@p(object) | |
| 84 | 89 | ) |
| 85 | 90 | |
| 86 | 91 | @script:python depends on report@ |