[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241025091310.15380-1-wanghai38@huawei.com>
Date: Fri, 25 Oct 2024 17:13:10 +0800
From: Wang Hai <wanghai38@...wei.com>
To: <lucas.demarchi@...el.com>, <thomas.hellstrom@...ux.intel.com>,
<rodrigo.vivi@...el.com>, <maarten.lankhorst@...ux.intel.com>,
<mripard@...nel.org>, <tzimmermann@...e.de>, <airlied@...il.com>,
<simona@...ll.ch>, <matthew.auld@...el.com>, <matthew.brost@...el.com>,
<michal.wajdeczko@...el.com>, <akshata.jahagirdar@...el.com>,
<david.kershner@...el.com>, <matthew.d.roper@...el.com>,
<zhangxiaoxu5@...wei.com>
CC: <intel-xe@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>, <wanghai38@...wei.com>
Subject: [PATCH] drm/xe/migrate: Fix inappropriate error printing in xe_migrate_sanity_test()
When creating pin map for tiny fails, the PTR_ERR(pt) is printed instead
of PTR_ERR(tiny), which makes it impossible to accurately get the true
cause of the error.
Print PTR_ERR(tiny) after creating pin map for tiny fails.
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Wang Hai <wanghai38@...wei.com>
---
drivers/gpu/drm/xe/tests/xe_migrate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c
index 1a192a2a941b..4542925445de 100644
--- a/drivers/gpu/drm/xe/tests/xe_migrate.c
+++ b/drivers/gpu/drm/xe/tests/xe_migrate.c
@@ -224,8 +224,8 @@ static void xe_migrate_sanity_test(struct xe_migrate *m, struct kunit *test)
XE_BO_FLAG_VRAM_IF_DGFX(tile) |
XE_BO_FLAG_PINNED);
if (IS_ERR(tiny)) {
- KUNIT_FAIL(test, "Failed to allocate fake pt: %li\n",
- PTR_ERR(pt));
+ KUNIT_FAIL(test, "Failed to allocate fake tiny: %li\n",
+ PTR_ERR(tiny));
goto free_pt;
}
--
2.17.1
Powered by blists - more mailing lists