From: Wang Hai <wanghai38@huawei.com>
To: <lucas.demarchi@intel.com>, <thomas.hellstrom@linux.intel.com>,
<rodrigo.vivi@intel.com>, <maarten.lankhorst@linux.intel.com>,
<mripard@kernel.org>, <tzimmermann@suse.de>, <airlied@gmail.com>,
<simona@ffwll.ch>, <matthew.auld@intel.com>,
<matthew.brost@intel.com>, <michal.wajdeczko@intel.com>,
<akshata.jahagirdar@intel.com>, <david.kershner@intel.com>,
<matthew.d.roper@intel.com>, <zhangxiaoxu5@huawei.com>
Cc: <intel-xe@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<wanghai38@huawei.com>
Subject: [PATCH] drm/xe/migrate: Fix inappropriate error printing in xe_migrate_sanity_test()
Date: Fri, 25 Oct 2024 17:13:10 +0800 [thread overview]
Message-ID: <20241025091310.15380-1-wanghai38@huawei.com> (raw)
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@huawei.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
next reply other threads:[~2024-10-28 18:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 9:13 Wang Hai [this message]
2024-10-28 18:33 ` ✓ CI.Patch_applied: success for drm/xe/migrate: Fix inappropriate error printing in xe_migrate_sanity_test() Patchwork
2024-10-28 18:34 ` ✓ CI.checkpatch: " Patchwork
2024-10-28 18:35 ` ✓ CI.KUnit: " Patchwork
2024-10-28 18:46 ` ✓ CI.Build: " Patchwork
2024-10-28 18:49 ` ✓ CI.Hooks: " Patchwork
2024-10-28 18:50 ` ✓ CI.checksparse: " Patchwork
2024-10-28 19:14 ` ✓ CI.BAT: " Patchwork
2024-10-28 20:07 ` ✗ CI.FULL: failure " Patchwork
2024-10-29 12:02 ` Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241025091310.15380-1-wanghai38@huawei.com \
--to=wanghai38@huawei.com \
--cc=airlied@gmail.com \
--cc=akshata.jahagirdar@intel.com \
--cc=david.kershner@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=mripard@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tzimmermann@suse.de \
--cc=zhangxiaoxu5@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox