[PATCH 02/24] drm/tests: helpers: Remove the name parameter
Maxime Ripard
maxime at cerno.tech
Wed Nov 23 15:25:44 UTC 2022
The device name isn't really useful, we can just define it instead of
exposing it in the API.
Signed-off-by: Maxime Ripard <maxime at cerno.tech>
---
drivers/gpu/drm/tests/drm_client_modeset_test.c | 2 +-
drivers/gpu/drm/tests/drm_kunit_helpers.c | 6 ++++--
drivers/gpu/drm/tests/drm_kunit_helpers.h | 3 +--
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/tests/drm_client_modeset_test.c b/drivers/gpu/drm/tests/drm_client_modeset_test.c
index e469d1634e2d..6920c3ffdfdf 100644
--- a/drivers/gpu/drm/tests/drm_client_modeset_test.c
+++ b/drivers/gpu/drm/tests/drm_client_modeset_test.c
@@ -41,7 +41,7 @@ static int drm_client_modeset_test_init(struct kunit *test)
test->priv = priv;
- priv->drm = drm_kunit_helper_alloc_drm_device(test, DRIVER_MODESET, "drm-client-modeset-test");
+ priv->drm = drm_kunit_helper_alloc_drm_device(test, DRIVER_MODESET);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, priv->drm);
ret = drmm_connector_init(priv->drm, &priv->connector,
diff --git a/drivers/gpu/drm/tests/drm_kunit_helpers.c b/drivers/gpu/drm/tests/drm_kunit_helpers.c
index a4ad030ed101..7f69f56f5892 100644
--- a/drivers/gpu/drm/tests/drm_kunit_helpers.c
+++ b/drivers/gpu/drm/tests/drm_kunit_helpers.c
@@ -9,6 +9,8 @@
#include "drm_kunit_helpers.h"
+#define FAKE_DEVICE_NAME "drm-kunit-fake-device"
+
struct kunit_dev {
struct drm_device base;
};
@@ -38,7 +40,7 @@ static void dev_free(struct kunit_resource *res)
struct drm_device *
drm_kunit_helper_alloc_drm_device(struct kunit *test,
- u32 features, char *name)
+ u32 features)
{
struct kunit_dev *kdev;
struct drm_device *drm;
@@ -46,7 +48,7 @@ drm_kunit_helper_alloc_drm_device(struct kunit *test,
struct device *dev;
int ret;
- dev = kunit_alloc_resource(test, dev_init, dev_free, GFP_KERNEL, name);
+ dev = kunit_alloc_resource(test, dev_init, dev_free, GFP_KERNEL, FAKE_DEVICE_NAME);
if (!dev)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/tests/drm_kunit_helpers.h b/drivers/gpu/drm/tests/drm_kunit_helpers.h
index e9870c7911fe..6c12b1426ba0 100644
--- a/drivers/gpu/drm/tests/drm_kunit_helpers.h
+++ b/drivers/gpu/drm/tests/drm_kunit_helpers.h
@@ -8,7 +8,6 @@ struct kunit;
struct drm_device *
drm_kunit_helper_alloc_drm_device(struct kunit *test,
- u32 features,
- char *name);
+ u32 features);
#endif // DRM_KUNIT_HELPERS_H_
--
2.38.1-b4-0.11.0-dev-d416f
More information about the dri-devel
mailing list