All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: mcanal@igalia.com, stanislaw.gruszka@linux.intel.com,
	ogabbay@kernel.org, quic_jhugo@quicinc.com, daniel@ffwll.ch,
	jani.nikula@linux.intel.com, mwen@igalia.com, maxime@cerno.tech,
	wambui.karugax@gmail.com, dri-devel@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/7] drm: remove drm_dev_set_unique
Date: Thu, 16 Mar 2023 09:20:29 +0100	[thread overview]
Message-ID: <20230316082035.567520-2-christian.koenig@amd.com> (raw)
In-Reply-To: <20230316082035.567520-1-christian.koenig@amd.com>

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>
---
 drivers/gpu/drm/drm_drv.c | 26 ++++----------------------
 include/drm/drm_drv.h     |  2 --
 2 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index c6eb8972451a..cee0cc522ed9 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -691,9 +691,11 @@ static int drm_dev_init(struct drm_device *dev,
 		}
 	}
 
-	ret = drm_dev_set_unique(dev, dev_name(parent));
-	if (ret)
+	dev->unique = drmm_kstrdup(dev, dev_name(parent), GFP_KERNEL);
+	if (!dev->unique) {
+		ret = -ENOMEM;
 		goto err;
+	}
 
 	return 0;
 
@@ -1000,26 +1002,6 @@ void drm_dev_unregister(struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_dev_unregister);
 
-/**
- * drm_dev_set_unique - Set the unique name of a DRM device
- * @dev: device of which to set the unique name
- * @name: unique name
- *
- * Sets the unique name of a DRM device using the specified string. This is
- * already done by drm_dev_init(), drivers should only override the default
- * unique name for backwards compatibility reasons.
- *
- * Return: 0 on success or a negative error code on failure.
- */
-int drm_dev_set_unique(struct drm_device *dev, const char *name)
-{
-	drmm_kfree(dev, dev->unique);
-	dev->unique = drmm_kstrdup(dev, name, GFP_KERNEL);
-
-	return dev->unique ? 0 : -ENOMEM;
-}
-EXPORT_SYMBOL(drm_dev_set_unique);
-
 /*
  * DRM Core
  * The DRM core module initializes all global DRM objects and makes them
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 5b86bb7603e7..b419c59c4bef 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -584,8 +584,6 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
 }
 
 
-int drm_dev_set_unique(struct drm_device *dev, const char *name);
-
 /* TODO: Inline drm_firmware_drivers_only() in all its callers. */
 static inline bool drm_firmware_drivers_only(void)
 {
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: mcanal@igalia.com, stanislaw.gruszka@linux.intel.com,
	ogabbay@kernel.org, quic_jhugo@quicinc.com, daniel@ffwll.ch,
	jani.nikula@linux.intel.com, mwen@igalia.com, maxime@cerno.tech,
	wambui.karugax@gmail.com, dri-devel@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 1/7] drm: remove drm_dev_set_unique
Date: Thu, 16 Mar 2023 09:20:29 +0100	[thread overview]
Message-ID: <20230316082035.567520-2-christian.koenig@amd.com> (raw)
In-Reply-To: <20230316082035.567520-1-christian.koenig@amd.com>

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>
---
 drivers/gpu/drm/drm_drv.c | 26 ++++----------------------
 include/drm/drm_drv.h     |  2 --
 2 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index c6eb8972451a..cee0cc522ed9 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -691,9 +691,11 @@ static int drm_dev_init(struct drm_device *dev,
 		}
 	}
 
-	ret = drm_dev_set_unique(dev, dev_name(parent));
-	if (ret)
+	dev->unique = drmm_kstrdup(dev, dev_name(parent), GFP_KERNEL);
+	if (!dev->unique) {
+		ret = -ENOMEM;
 		goto err;
+	}
 
 	return 0;
 
@@ -1000,26 +1002,6 @@ void drm_dev_unregister(struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_dev_unregister);
 
-/**
- * drm_dev_set_unique - Set the unique name of a DRM device
- * @dev: device of which to set the unique name
- * @name: unique name
- *
- * Sets the unique name of a DRM device using the specified string. This is
- * already done by drm_dev_init(), drivers should only override the default
- * unique name for backwards compatibility reasons.
- *
- * Return: 0 on success or a negative error code on failure.
- */
-int drm_dev_set_unique(struct drm_device *dev, const char *name)
-{
-	drmm_kfree(dev, dev->unique);
-	dev->unique = drmm_kstrdup(dev, name, GFP_KERNEL);
-
-	return dev->unique ? 0 : -ENOMEM;
-}
-EXPORT_SYMBOL(drm_dev_set_unique);
-
 /*
  * DRM Core
  * The DRM core module initializes all global DRM objects and makes them
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 5b86bb7603e7..b419c59c4bef 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -584,8 +584,6 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
 }
 
 
-int drm_dev_set_unique(struct drm_device *dev, const char *name);
-
 /* TODO: Inline drm_firmware_drivers_only() in all its callers. */
 static inline bool drm_firmware_drivers_only(void)
 {
-- 
2.34.1


  reply	other threads:[~2023-03-16  8:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  8:20 DRM debugfs cleanup take 3 Christian König
2023-03-16  8:20 ` [Intel-gfx] " Christian König
2023-03-16  8:20 ` Christian König [this message]
2023-03-16  8:20   ` [Intel-gfx] [PATCH 1/7] drm: remove drm_dev_set_unique Christian König
2023-03-16 14:15   ` Jeffrey Hugo
2023-03-16 14:15     ` [Intel-gfx] " Jeffrey Hugo
2023-03-16  8:20 ` [PATCH 2/7] drm/tegra: allow compile test on !ARM Christian König
2023-03-16  8:20   ` [Intel-gfx] " Christian König
2023-03-16 22:58   ` kernel test robot
2023-03-16  8:20 ` [PATCH 3/7] drm/debugfs: stop calling debugfs_init() for the render node Christian König
2023-03-16  8:20   ` [Intel-gfx] " Christian König
2023-03-16  8:20 ` [PATCH 4/7] drm/debugfs: rework debugfs directory creation v2 Christian König
2023-03-16  8:20   ` [Intel-gfx] " Christian König
2023-03-16 22:27   ` kernel test robot
2023-03-22 11:17   ` Stanislaw Gruszka
2023-03-22 11:17     ` [Intel-gfx] " Stanislaw Gruszka
2023-03-16  8:20 ` [PATCH 5/7] drm/debugfs: remove dev->debugfs_list and debugfs_mutex v2 Christian König
2023-03-16  8:20   ` [Intel-gfx] " Christian König
2023-03-16  8:20 ` [Intel-gfx] [PATCH 6/7] drm/debugfs: rework drm_debugfs_create_files implementation Christian König
2023-03-16  8:20   ` Christian König
2023-03-16  8:20 ` [PATCH 7/7] drm/debugfs: remove debugfs_root pointer from minor Christian König
2023-03-16  8:20   ` [Intel-gfx] " Christian König
2023-03-16 11:24   ` kernel test robot
2023-03-16 11:24     ` [Intel-gfx] " kernel test robot
2023-03-16  8:25 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/7] drm: remove drm_dev_set_unique Patchwork
2023-03-22 11:58   ` Jani Nikula
2023-03-22 13:51     ` Christian König
2023-03-22 11:20 ` DRM debugfs cleanup take 3 Stanislaw Gruszka
2023-03-22 11:20   ` [Intel-gfx] " Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230316082035.567520-2-christian.koenig@amd.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=maxime@cerno.tech \
    --cc=mcanal@igalia.com \
    --cc=mwen@igalia.com \
    --cc=ogabbay@kernel.org \
    --cc=quic_jhugo@quicinc.com \
    --cc=stanislaw.gruszka@linux.intel.com \
    --cc=wambui.karugax@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.