mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 16:23:59 -04:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user