Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: remove drm_dev_set_unique

Not used by any drivers any more, the only use case in drm_dev_init()
can be inlined now.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316082035.567520-2-christian.koenig@amd.com

+4 -24
+4 -22
drivers/gpu/drm/drm_drv.c
··· 691 691 } 692 692 } 693 693 694 - ret = drm_dev_set_unique(dev, dev_name(parent)); 695 - if (ret) 694 + dev->unique = drmm_kstrdup(dev, dev_name(parent), GFP_KERNEL); 695 + if (!dev->unique) { 696 + ret = -ENOMEM; 696 697 goto err; 698 + } 697 699 698 700 return 0; 699 701 ··· 1001 999 drm_minor_unregister(dev, DRM_MINOR_RENDER); 1002 1000 } 1003 1001 EXPORT_SYMBOL(drm_dev_unregister); 1004 - 1005 - /** 1006 - * drm_dev_set_unique - Set the unique name of a DRM device 1007 - * @dev: device of which to set the unique name 1008 - * @name: unique name 1009 - * 1010 - * Sets the unique name of a DRM device using the specified string. This is 1011 - * already done by drm_dev_init(), drivers should only override the default 1012 - * unique name for backwards compatibility reasons. 1013 - * 1014 - * Return: 0 on success or a negative error code on failure. 1015 - */ 1016 - int drm_dev_set_unique(struct drm_device *dev, const char *name) 1017 - { 1018 - drmm_kfree(dev, dev->unique); 1019 - dev->unique = drmm_kstrdup(dev, name, GFP_KERNEL); 1020 - 1021 - return dev->unique ? 0 : -ENOMEM; 1022 - } 1023 - EXPORT_SYMBOL(drm_dev_set_unique); 1024 1002 1025 1003 /* 1026 1004 * DRM Core
-2
include/drm/drm_drv.h
··· 584 584 } 585 585 586 586 587 - int drm_dev_set_unique(struct drm_device *dev, const char *name); 588 - 589 587 /* TODO: Inline drm_firmware_drivers_only() in all its callers. */ 590 588 static inline bool drm_firmware_drivers_only(void) 591 589 {