Patch "drm/xe/tests: Fix printf format specifiers in xe_migrate test" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/xe/tests: Fix printf format specifiers in xe_migrate test

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-xe-tests-fix-printf-format-specifiers-in-xe_migr.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3ca3b1a6662f503ff565fe9a1e5f3f5fd9e57a2c
Author: David Gow <davidgow@xxxxxxxxxx>
Date:   Wed Feb 21 17:27:21 2024 +0800

    drm/xe/tests: Fix printf format specifiers in xe_migrate test
    
    [ Upstream commit 689a930b93c5c20294df5da0407df361c5412eac ]
    
    KUNIT_FAIL() is used to fail the xe_migrate test when an error occurs.
    However, there's a mismatch in the format specifier: '%li' is used to
    log 'err', which is an 'int'.
    
    Use '%i' instead of '%li', and for the case where we're printing an
    error pointer, just use '%pe', instead of extracting the error code
    manually with PTR_ERR(). (This also results in a nicer output when the
    error code is known.)
    
    Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
    Signed-off-by: David Gow <davidgow@xxxxxxxxxx>
    Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Reviewed-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
    Acked-by: Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c
index a6523df0f1d39..c347e2c29f81f 100644
--- a/drivers/gpu/drm/xe/tests/xe_migrate.c
+++ b/drivers/gpu/drm/xe/tests/xe_migrate.c
@@ -114,21 +114,21 @@ static void test_copy(struct xe_migrate *m, struct xe_bo *bo,
 						   region |
 						   XE_BO_NEEDS_CPU_ACCESS);
 	if (IS_ERR(remote)) {
-		KUNIT_FAIL(test, "Failed to allocate remote bo for %s: %li\n",
-			   str, PTR_ERR(remote));
+		KUNIT_FAIL(test, "Failed to allocate remote bo for %s: %pe\n",
+			   str, remote);
 		return;
 	}
 
 	err = xe_bo_validate(remote, NULL, false);
 	if (err) {
-		KUNIT_FAIL(test, "Failed to validate system bo for %s: %li\n",
+		KUNIT_FAIL(test, "Failed to validate system bo for %s: %i\n",
 			   str, err);
 		goto out_unlock;
 	}
 
 	err = xe_bo_vmap(remote);
 	if (err) {
-		KUNIT_FAIL(test, "Failed to vmap system bo for %s: %li\n",
+		KUNIT_FAIL(test, "Failed to vmap system bo for %s: %i\n",
 			   str, err);
 		goto out_unlock;
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux