[PATCH] drm/xe/tests: Fix the shrinker test compiler warnings.
Thomas Hellström
thomas.hellstrom at linux.intel.com
Fri Oct 4 12:39:22 UTC 2024
The xe_bo_shrink_kunit test has an uninitialized value and illegal
integer size conversions on 32-bit. Fix.
Reported-by: Nathan Chancellor <nathan at kernel.org>
Closes: https://lore.kernel.org/20240913195649.GA61514@thelio-3990X/
Fixes: 5a90b60db5e6 ("drm/xe: Add a xe_bo subtest for shrinking / swapping")
Cc: Matthew Auld <matthew.auld at intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
---
drivers/gpu/drm/xe/tests/xe_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 7d3fd720478b..1562c08aaf34 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -440,7 +440,7 @@ static int shrink_test_run_device(struct xe_device *xe)
LIST_HEAD(bos);
struct xe_bo_link *link, *next;
struct sysinfo si;
- size_t ram, ram_and_swap, purgeable, alloced, to_alloc, limit;
+ u64 ram, ram_and_swap, purgeable = 0, alloced, to_alloc, limit;
unsigned int interrupted = 0, successful = 0, count = 0;
struct rnd_state prng;
u64 rand_seed;
--
2.46.0
More information about the Intel-xe
mailing list