summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/tests/xe_test.h
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-07-05 21:10:56 +0200
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2024-07-12 10:34:46 +0200
commitbd85e00fa489f5374c2bad0eac15842d2ec68045 (patch)
treee36bf3f329949025e6a8a31ad57950d4f582cf56 /drivers/gpu/drm/xe/tests/xe_test.h
parentf6ca930d974e473fd608fc9aa1759fbe731fe44d (diff)
downloadlwn-bd85e00fa489f5374c2bad0eac15842d2ec68045.tar.gz
lwn-bd85e00fa489f5374c2bad0eac15842d2ec68045.zip
drm/xe/kunit: Kill xe_cur_kunit()
We shouldn't use custom helper if there is a official one. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240705191057.1110-2-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/tests/xe_test.h')
-rw-r--r--drivers/gpu/drm/xe/tests/xe_test.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/tests/xe_test.h b/drivers/gpu/drm/xe/tests/xe_test.h
index 7a1ae213e750..55e5b5bedccc 100644
--- a/drivers/gpu/drm/xe/tests/xe_test.h
+++ b/drivers/gpu/drm/xe/tests/xe_test.h
@@ -9,8 +9,8 @@
#include <linux/types.h>
#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
-#include <linux/sched.h>
#include <kunit/test.h>
+#include <kunit/test-bug.h>
/*
* Each test that provides a kunit private test structure, place a test id
@@ -32,7 +32,6 @@ struct xe_test_priv {
#define XE_TEST_DECLARE(x) x
#define XE_TEST_ONLY(x) unlikely(x)
#define XE_TEST_EXPORT
-#define xe_cur_kunit() current->kunit_test
/**
* xe_cur_kunit_priv - Obtain the struct xe_test_priv pointed to by
@@ -48,10 +47,10 @@ xe_cur_kunit_priv(enum xe_test_priv_id id)
{
struct xe_test_priv *priv;
- if (!xe_cur_kunit())
+ if (!kunit_get_current_test())
return NULL;
- priv = xe_cur_kunit()->priv;
+ priv = kunit_get_current_test()->priv;
return priv->id == id ? priv : NULL;
}
@@ -60,7 +59,6 @@ xe_cur_kunit_priv(enum xe_test_priv_id id)
#define XE_TEST_DECLARE(x)
#define XE_TEST_ONLY(x) 0
#define XE_TEST_EXPORT static
-#define xe_cur_kunit() NULL
#define xe_cur_kunit_priv(_id) NULL
#endif