From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id CAC6110E26D for ; Wed, 13 Sep 2023 15:15:15 +0000 (UTC) Date: Wed, 13 Sep 2023 18:15:04 +0300 From: "Lisovskiy, Stanislav" To: Zbigniew =?utf-8?Q?Kempczy=C5=84ski?= Message-ID: References: <20230913142417.584184-1-zbigniew.kempczynski@intel.com> <20230913142417.584184-3-zbigniew.kempczynski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230913142417.584184-3-zbigniew.kempczynski@intel.com> Subject: Re: [igt-dev] [PATCH i-g-t 2/2] tests/i915_pipe_stress: Remove stack variables List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Wed, Sep 13, 2023 at 04:24:17PM +0200, Zbigniew Kempczyński wrote: > They are unused and what's worse unassigned. Get rid of them keeping > x/y_rand only. > > Signed-off-by: Zbigniew Kempczyński > Cc: Stanislav Lisovskiy > --- > 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; Thanks for spotting, Reviewed-by: Stanislav Lisovskiy > > /* Fill randomly sized and positioned rectangles */ > fill_gpu(context, context->blt_rect.x, context->blt_rect.y, > -- > 2.34.1 >