Skip to contentSkip to conversation

drm/vgem: Replace drm_dev_unref with drm_dev_put

PATCH Applied Thomas Zimmermann 3 participants 4 messages Jul 16, 2018 – Aug 9, 2018

Subsystems (2)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm/vgem: Replace drm_dev_unref with drm_dev_put

This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces.

---
 drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vgem/vgem_drv.c +1 -1
index 0e5620f76ee0..ec6af8b920da 100644
@@ -504,7 +504,7 @@ static int __init vgem_init(void)
 static void __exit vgem_exit(void)
 {
 	drm_dev_unregister(&vgem_device->drm);
-	drm_dev_unref(&vgem_device->drm);
+	drm_dev_put(&vgem_device->drm);
 }
 
 module_init(vgem_init);
Signature · 6 lines
2.18.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 23 lines · Thomas Zimmermann

This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces.

---
 drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vgem/vgem_drv.c +1 -2
index 0e5620f76ee0..ec6af8b920da 100644
@@ -504,7 +504,7 @@ static int __init vgem_init(void)
 static void __exit vgem_exit(void)
 {
        drm_dev_unregister(&vgem_device->drm);
-       drm_dev_unref(&vgem_device->drm);
+       drm_dev_put(&vgem_device->drm);
 }
 
 module_init(vgem_init);
--
Quoted 2 lines

2.18.0

There are other gpu/drm drivers where drm_dev_unref is used. Do we need to replace drm_dev_unref with drm_dev_put in other places as well ?
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#2 lore raw

Hi

Quoted 3 lines

There are other gpu/drm drivers where drm_dev_unref is used. Do we need to replace drm_dev_unref with drm_dev_put in other places as well ?

Yes. This is some overall clean-up work that I do as a side project. I already have patches for all drivers, but I found that sending them one-by-one gives a much better chance of getting them applied.

Best regards
Thomas

Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755;  https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
Graham Norton, HRB 21284 (AG Nürnberg)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to Thomas Zimmermann
Quoted 5 lines · Thomas Zimmermann

This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces.

Applied to drm-misc-next, thanks for your patch.
-Daniel

Quoted 20 lines
---
 drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vgem/vgem_drv.c +1 -1
index 0e5620f76ee0..ec6af8b920da 100644
@@ -504,7 +504,7 @@ static int __init vgem_init(void)
 static void __exit vgem_exit(void)
 {
 	drm_dev_unregister(&vgem_device->drm);
-	drm_dev_unref(&vgem_device->drm);
+	drm_dev_put(&vgem_device->drm);
 }
 
 module_init(vgem_init);
Signature · 1 line
2.18.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel