[igt-dev] [PATCH i-g-t v5 05/30] i915/perf: Use ARRAY_SIZE for buffer-fill test

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Thu Mar 23 22:55:09 UTC 2023


A prior patch changed the way size of properties is calculated. It
missed one test. Replace the sizeof with ARRAY_SIZE for buffer-fill
test.

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
 tests/i915/perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/perf.c b/tests/i915/perf.c
index bd1fcc28..865858fe 100644
--- a/tests/i915/perf.c
+++ b/tests/i915/perf.c
@@ -2560,7 +2560,7 @@ test_buffer_fill(void)
 	};
 	struct drm_i915_perf_open_param param = {
 		.flags = I915_PERF_FLAG_FD_CLOEXEC,
-		.num_properties = sizeof(properties) / 16,
+		.num_properties = ARRAY_SIZE(properties) / 2,
 		.properties_ptr = to_user_pointer(properties),
 	};
 	struct drm_i915_perf_record_header *header;
-- 
2.36.1



More information about the igt-dev mailing list