[PATCH v2] tests/intel/xe_exec_compute_mode: Fix assertion of batch buffer size

Shuicheng Lin shuicheng.lin at intel.com
Thu Jun 12 08:09:27 UTC 2025


The batch buffer pointer is data[EXEC_DATA] not data. Correct it in the assertion.
Fix 2 other issues reported by checkpatch.pl:
"
WARNING: please, no space before tabs

ERROR: code indent should use tabs where possible
"

v2: fix issues reported by checkpatch.pl

Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin at intel.com>
---
 tests/intel/xe_exec_compute_mode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/intel/xe_exec_compute_mode.c b/tests/intel/xe_exec_compute_mode.c
index 8fba9daef..a7ea56327 100644
--- a/tests/intel/xe_exec_compute_mode.c
+++ b/tests/intel/xe_exec_compute_mode.c
@@ -24,7 +24,7 @@
 #include "xe/xe_spin.h"
 #include <string.h>
 
-#define MAX_N_EXECQUEUES 	16
+#define MAX_N_EXECQUEUES		16
 #define USERPTR				(0x1 << 0)
 #define REBIND				(0x1 << 1)
 #define INVALIDATE			(0x1 << 2)
@@ -272,7 +272,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
 				map_fd = open("/tmp", O_TMPFILE | O_RDWR,
 					      0x666);
 				igt_assert_eq(write(map_fd, data, bo_size),
-				              bo_size);
+					      bo_size);
 				data = mmap((void *)MAP_ADDRESS, bo_size,
 					    PROT_READ | PROT_WRITE, MAP_SHARED |
 					    MAP_FIXED, map_fd, 0);
@@ -393,7 +393,7 @@ static void non_block(int fd, int expect)
 	data[EXEC_DATA].batch[b++] = sdi_addr >> 32;
 	data[EXEC_DATA].batch[b++] = value;
 	data[EXEC_DATA].batch[b++] = MI_BATCH_BUFFER_END;
-	igt_assert(b <= ARRAY_SIZE(data->batch));
+	igt_assert(b <= ARRAY_SIZE(data[EXEC_DATA].batch));
 
 	sync[0].addr = addr + (char *)&data[EXEC_DATA].exec_sync - (char *)data;
 	exec.num_syncs = 0;
-- 
2.25.1



More information about the igt-dev mailing list