[igt-dev] [PATCH i-g-t 2/2] tests/i915_pipe_stress: Remove stack variables

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Sep 13 14:24:17 UTC 2023


They are unused and what's worse unassigned. Get rid of them keeping
x/y_rand only.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
---
 tests/intel/i915_pipe_stress.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/intel/i915_pipe_stress.c b/tests/intel/i915_pipe_stress.c
index 9ceb056a09..f9da5f0232 100644
--- a/tests/intel/i915_pipe_stress.c
+++ b/tests/intel/i915_pipe_stress.c
@@ -241,7 +241,6 @@ static void *gpu_load(void *ptr)
 	int frame_height;
 	drmModeModeInfo *mode;
 	int frame = 0;
-	int x, y;
 	int rect = 0, total_rects = 0;
 	int pixels = 0;
 
@@ -273,8 +272,8 @@ static void *gpu_load(void *ptr)
 			x_rand = hars_petruska_f54_1_random_unsafe_max(frame_width - rect_width);
 			y_rand = hars_petruska_f54_1_random_unsafe_max(frame_height/2 - rect_height);
 
-			context->blt_rect.x = x + x_rand;
-			context->blt_rect.y = y + y_rand;
+			context->blt_rect.x = x_rand;
+			context->blt_rect.y = y_rand;
 
 			/* Fill randomly sized and positioned rectangles */
 			fill_gpu(context, context->blt_rect.x, context->blt_rect.y,
-- 
2.34.1



More information about the igt-dev mailing list