Skip to contentSkip to conversation

tests/intel/xe_exec_compute_mode: Fix assertion of batch buffer size

PATCH Superseded Shuicheng Lin 1 participant 1 message Jun 12, 2025

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

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

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 <[email protected]>
---
 tests/intel/xe_exec_compute_mode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/intel/xe_exec_compute_mode.c +3 -3
index 8fba9daef..a7ea56327 100644
@@ -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;
Signature · 1 line
2.25.1