On Sat, Jun 09, 2018 at 03:17:58PM +0200, Thomas Zimmermann wrote: > This patch set replaces functions named {un,reference} by their {put,get} > counterparts. Each patch also removes the replaced functions from the DRM > core and deletes them from the related Coccinelle script. > Affected data types are struct drm_connector, struct drm_framebuffer, > struct drm_gem_object, and struct drm_device. > > This change fixes the related item on the DRM TODO list. > > With the reference-counting functions being named {put,get}, the DRM > interface is more aligned to Linux kernel nameing standard. The patch > set does not change driver-internal interfaces. > > Possible future changes: Most of DRM's remaining {un/ref} functions > perform additional tasks besides reference counting and should > probably not be renamed. Exceptions are ttm_bo_{reference,unref} and > ttm_object_file_{un/ref}. These functions mostly perform reference > counting, but would require additional changes to the calling code > besides renaming. > > > Thomas Zimmermann (7): > drm: Replace drm_connector_{un/reference} with drm_connector_{put,get} > drm: Replace drm_framebuffer_{un/reference} with > drm_framebuffer_{put,get} > drm: Replace drm_gem_object_{un/reference} with > drm_gem_object_{put,get} > drm: Replace __drm_gem_object_unreference with __drm_gem_object_put > drm: Replace drm_gem_object_unreference_unlocked with put function > drm: Replace drm_dev_unref with drm_dev_put > drm: Clean up after DRM put/get conversion You're touching lots of drivers here, which needs at least some acks from driver maintainers. scripts/get_maintainers.pl helps with figuring that out. It might also be good to split up some of the patches into per-driver patches. -Daniel > > Documentation/gpu/todo.rst | 17 ----- > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +- > drivers/gpu/drm/arc/arcpgu_drv.c | 8 +-- > drivers/gpu/drm/armada/armada_crtc.c | 8 +-- > drivers/gpu/drm/armada/armada_drv.c | 6 +- > drivers/gpu/drm/armada/armada_overlay.c | 2 +- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 8 +-- > drivers/gpu/drm/bochs/bochs_fbdev.c | 2 +- > drivers/gpu/drm/bochs/bochs_mm.c | 10 +-- > drivers/gpu/drm/drm_drv.c | 13 ---- > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 8 +-- > drivers/gpu/drm/exynos/exynos_drm_drv.c | 4 +- > drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 10 +-- > drivers/gpu/drm/exynos/exynos_drm_plane.c | 2 +- > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 8 +-- > drivers/gpu/drm/gma500/framebuffer.c | 2 +- > drivers/gpu/drm/gma500/gem.c | 2 +- > drivers/gpu/drm/gma500/gma_display.c | 6 +- > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 +- > drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 8 +-- > drivers/gpu/drm/i915/i915_gem_object.h | 13 +--- > drivers/gpu/drm/i915/intel_display.c | 4 +- > drivers/gpu/drm/i915/intel_dp_mst.c | 2 +- > drivers/gpu/drm/i915/selftests/huge_pages.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_vma.c | 2 +- > drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 2 +- > drivers/gpu/drm/imx/imx-drm-core.c | 8 +-- > drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 +- > drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 +- > drivers/gpu/drm/msm/adreno/a5xx_power.c | 2 +- > drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 2 +- > drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 4 +- > drivers/gpu/drm/msm/msm_drv.c | 8 +-- > drivers/gpu/drm/msm/msm_gem_submit.c | 4 +- > drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 +- > drivers/gpu/drm/nouveau/dispnv04/crtc.c | 2 +- > drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- > drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +- > drivers/gpu/drm/nouveau/nouveau_display.c | 8 +-- > drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- > drivers/gpu/drm/nouveau/nouveau_gem.c | 14 ++-- > drivers/gpu/drm/nouveau/nouveau_platform.c | 2 +- > drivers/gpu/drm/omapdrm/omap_drv.c | 6 +- > drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- > drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- > drivers/gpu/drm/omapdrm/omap_gem.c | 4 +- > drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 +- > drivers/gpu/drm/pl111/pl111_drv.c | 14 ++-- > drivers/gpu/drm/qxl/qxl_drv.c | 2 +- > drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- > drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 +- > drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +- > drivers/gpu/drm/sti/sti_drv.c | 8 +-- > drivers/gpu/drm/stm/drv.c | 10 +-- > drivers/gpu/drm/sun4i/sun4i_drv.c | 4 +- > drivers/gpu/drm/tegra/drm.c | 8 +-- > drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 6 +- > drivers/gpu/drm/tve200/tve200_drv.c | 10 +-- > drivers/gpu/drm/udl/udl_drv.c | 2 +- > drivers/gpu/drm/vc4/vc4_drv.c | 8 +-- > drivers/gpu/drm/vgem/vgem_drv.c | 2 +- > drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 2 +- > drivers/gpu/drm/zte/zx_drm_drv.c | 4 +- > include/drm/drm_connector.h | 24 ------- > include/drm/drm_drv.h | 1 - > include/drm/drm_framebuffer.h | 24 ------- > include/drm/drm_gem.h | 50 -------------- > scripts/coccinelle/api/drm-get-put.cocci | 78 ---------------------- > 75 files changed, 156 insertions(+), 372 deletions(-) > delete mode 100644 scripts/coccinelle/api/drm-get-put.cocci > > -- > 2.14.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel