mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 17:01:14 +00:00
67 lines
2.1 KiB
Diff
67 lines
2.1 KiB
Diff
|
From 3a47f6ffdf0cdfd2c59105322ea75796c2708586 Mon Sep 17 00:00:00 2001
|
||
|
From: Maxime Ripard <maxime@cerno.tech>
|
||
|
Date: Mon, 21 Nov 2022 13:25:32 +0100
|
||
|
Subject: [PATCH] drm/tests: helpers: Remove the name parameter
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
The device name isn't really useful, we can just define it instead of
|
||
|
exposing it in the API.
|
||
|
|
||
|
Reviewed-by: Maíra Canal <mcanal@igalia.com>
|
||
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||
|
---
|
||
|
drivers/gpu/drm/tests/drm_kunit_helpers.c | 7 ++++---
|
||
|
include/drm/drm_kunit_helpers.h | 3 +--
|
||
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
||
|
|
||
|
--- a/drivers/gpu/drm/tests/drm_kunit_helpers.c
|
||
|
+++ b/drivers/gpu/drm/tests/drm_kunit_helpers.c
|
||
|
@@ -8,6 +8,8 @@
|
||
|
|
||
|
#include <linux/device.h>
|
||
|
|
||
|
+#define KUNIT_DEVICE_NAME "drm-kunit-mock-device"
|
||
|
+
|
||
|
struct kunit_dev {
|
||
|
struct drm_device base;
|
||
|
};
|
||
|
@@ -39,7 +41,6 @@ static void dev_free(struct kunit_resour
|
||
|
* drm_kunit_helper_alloc_drm_device - Allocates a mock DRM device for KUnit tests
|
||
|
* @test: The test context object
|
||
|
* @features: Mocked DRM device driver features
|
||
|
- * @name: Name of the struct &device to allocate
|
||
|
*
|
||
|
* This function allocates a new struct &device, creates a struct
|
||
|
* &drm_driver and will create a struct &drm_device using both.
|
||
|
@@ -54,7 +55,7 @@ static void dev_free(struct kunit_resour
|
||
|
*/
|
||
|
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;
|
||
|
@@ -62,7 +63,7 @@ drm_kunit_helper_alloc_drm_device(struct
|
||
|
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, KUNIT_DEVICE_NAME);
|
||
|
if (!dev)
|
||
|
return ERR_PTR(-ENOMEM);
|
||
|
|
||
|
--- a/include/drm/drm_kunit_helpers.h
|
||
|
+++ b/include/drm/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_
|