From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36886C3DA4A for ; Thu, 1 Aug 2024 23:18:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A739010E0FC; Thu, 1 Aug 2024 23:18:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cfD6MRH4"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 00E0710E0FC for ; Thu, 1 Aug 2024 23:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722554308; x=1754090308; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=XWH6kYDSRN0YlKkMkzsi0aQSt9P5P2LTR+h6AQ0Ozt0=; b=cfD6MRH4pgL256f6p26Fd/kbq6A9MpWsrxzvjRCNWZjpIeBibNUNG9sW FOV2zNjjTXsrx7yQxycXHyQyrFBVqkQMb73a1LANaUEHthC8Zlh9CZsBL g6nuk0HAFUnNGX5VodI3JAbkB76oWuoVA+vK4OpUoeRnuZA8uhHvE+8/0 /0XXluiMC1zD3jIUiHJko+U3H/KzvTEINzNS7D5GmA8cRB6elBHZeifMi wh5noP0DzoI3Mh2xtsBQAIEYi8/qaLNNJcCxRc5bs/3Iv2C9XXOihA9DV DY30iiTp6B30WHrR5zISvwThX5UvjwWs80DHb9hU6ZAZB0B1QzpsQYymq w==; X-CSE-ConnectionGUID: T057bCyDSbu/BNs6RmRRFg== X-CSE-MsgGUID: 8SqcnG6ETQSYaw7sWeWCvA== X-IronPort-AV: E=McAfee;i="6700,10204,11151"; a="20684201" X-IronPort-AV: E=Sophos;i="6.09,255,1716274800"; d="scan'208";a="20684201" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2024 16:18:25 -0700 X-CSE-ConnectionGUID: D2ODnwUeR2iv1BZ+KMezIw== X-CSE-MsgGUID: XFyOVOU0SuCYECCr9NoUKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,256,1716274800"; d="scan'208";a="55120981" Received: from rcespiri-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.124.165.91]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2024 16:18:23 -0700 Date: Thu, 01 Aug 2024 16:17:11 -0700 Message-ID: <871q376dfs.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Matt Roper Cc: Subject: Re: [PATCH i-g-t] tests/intel: Drop unused local variables In-Reply-To: <20240801225224.3744479-1-matthew.d.roper@intel.com> References: <20240801225224.3744479-1-matthew.d.roper@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" On Thu, 01 Aug 2024 15:52:24 -0700, Matt Roper wrote: > > After applying igt.cocci to the Intel tests, several open-coded swap > implementations were replaced with calls to igt_swap, leaving behind > unused local variables. Drop those variables to eliminate the compiler > warnings. Thanks for fixing this quickly, the build is clean now: Reviewed-by: Ashutosh Dixit > > Cc: Ashutosh Dixit > Fixes: dd461382e ("tests/intel: Apply igt.cocci transforms") > Signed-off-by: Matt Roper > --- > tests/intel/gem_ctx_create.c | 4 ++-- > tests/intel/gem_exec_big.c | 1 - > tests/intel/gem_exec_gttfill.c | 1 - > tests/intel/gem_softpin.c | 1 - > tests/intel/gem_tiled_fence_blits.c | 2 +- > 5 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/tests/intel/gem_ctx_create.c b/tests/intel/gem_ctx_create.c > index 0332ecbb9..5c2b0ef65 100644 > --- a/tests/intel/gem_ctx_create.c > +++ b/tests/intel/gem_ctx_create.c > @@ -295,14 +295,14 @@ static void active(int fd, const intel_ctx_cfg_t *cfg, > > static void xchg_u32(void *array, unsigned i, unsigned j) > { > - uint32_t *a = array, tmp; > + uint32_t *a = array; > > igt_swap(a[i], a[j]); > } > > static void xchg_ptr(void *array, unsigned i, unsigned j) > { > - void **a = array, *tmp; > + void **a = array; > > igt_swap(a[i], a[j]); > } > diff --git a/tests/intel/gem_exec_big.c b/tests/intel/gem_exec_big.c > index 86849f322..cdefce5db 100644 > --- a/tests/intel/gem_exec_big.c > +++ b/tests/intel/gem_exec_big.c > @@ -141,7 +141,6 @@ static void xchg_reloc(void *array, unsigned i, unsigned j) > struct drm_i915_gem_relocation_entry *reloc = array; > struct drm_i915_gem_relocation_entry *a = &reloc[i]; > struct drm_i915_gem_relocation_entry *b = &reloc[j]; > - struct drm_i915_gem_relocation_entry tmp; > > igt_swap(*a, *b); > } > diff --git a/tests/intel/gem_exec_gttfill.c b/tests/intel/gem_exec_gttfill.c > index ff600e0ca..3f0501777 100644 > --- a/tests/intel/gem_exec_gttfill.c > +++ b/tests/intel/gem_exec_gttfill.c > @@ -64,7 +64,6 @@ struct batch { > static void xchg_batch(void *array, unsigned int i, unsigned int j) > { > struct batch *batches = array; > - struct batch tmp; > > igt_swap(batches[i], batches[j]); > } > diff --git a/tests/intel/gem_softpin.c b/tests/intel/gem_softpin.c > index c542bf741..d8b99a2ae 100644 > --- a/tests/intel/gem_softpin.c > +++ b/tests/intel/gem_softpin.c > @@ -967,7 +967,6 @@ struct batch { > static void xchg_batch(void *array, unsigned int i, unsigned int j) > { > struct batch *batches = array; > - struct batch tmp; > > igt_swap(batches[i], batches[j]); > } > diff --git a/tests/intel/gem_tiled_fence_blits.c b/tests/intel/gem_tiled_fence_blits.c > index f5a3d9311..c11eb73e3 100644 > --- a/tests/intel/gem_tiled_fence_blits.c > +++ b/tests/intel/gem_tiled_fence_blits.c > @@ -156,7 +156,7 @@ update_batch(int fd, uint32_t bb_handle, > > static void xchg_u32(void *array, unsigned i, unsigned j) > { > - uint32_t tmp, *base = array; > + uint32_t *base = array; > > igt_swap(base[i], base[j]); > } > -- > 2.45.2 >