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 8D6D3C3DA64 for ; Thu, 1 Aug 2024 21:46:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EB3C10E0CD; Thu, 1 Aug 2024 21:46:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="dXKqVVqf"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 50BAB10E0CD for ; Thu, 1 Aug 2024 21:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722548762; x=1754084762; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version:content-transfer-encoding; bh=EIakCfHCVCq40KdsABWLFAy3yD2vjUStZ85sLDU5oVA=; b=dXKqVVqf4JBNpf1bx8GUzwV44uFcj+lklYa8vk9C27+eFpSAFoBduqyO kFrHn6+f0SimfwL/6iMfhPXra9Vg9V9YwrxT8touU+3iKQTUDpqL5BNfN wzTMJ7ii/9W1ZFJWLJttVladWInTz9j7RaYQBTECqVJy0jxdtGV0nUfhJ 3bXYoTcJ20jwCM7sgqeDb9VXYrcFzJA3leBEd4ypS/PH6YWYN32vzgqmC /0Zye2jahRrooylJniMx/KeOqukYbFZ7XTy0jL/TKCY1UEYq71Ukvfh3a sGkqEDpPmvdswqCkltDI9RqjybwHsFyt90cNvekWUs4OEhiSl73xYq6IO g==; X-CSE-ConnectionGUID: Q9t3IlTsRki3w2LPH3qoJg== X-CSE-MsgGUID: fXX7HmXrSkCT910UgWHL3w== X-IronPort-AV: E=McAfee;i="6700,10204,11151"; a="31940683" X-IronPort-AV: E=Sophos;i="6.09,255,1716274800"; d="scan'208";a="31940683" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2024 14:46:01 -0700 X-CSE-ConnectionGUID: DTjFrDzxTKWKrK4KPU8J9w== X-CSE-MsgGUID: BvNHT92EQsWhhBkevuDeoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,255,1716274800"; d="scan'208";a="54825000" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.138]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2024 14:46:01 -0700 Date: Thu, 01 Aug 2024 14:46:01 -0700 Message-ID: <85wmkz7w86.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Matt Roper Cc: igt-dev@lists.freedesktop.org Subject: Re: [PATCH i-g-t 2/2] tests/intel: Apply igt.cocci transforms In-Reply-To: <20240729220251.3353533-2-matthew.d.roper@intel.com> References: <20240729220251.3353533-1-matthew.d.roper@intel.com> <20240729220251.3353533-2-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/28.2 (x86_64-redhat-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable 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 Mon, 29 Jul 2024 15:02:51 -0700, Matt Roper wrote: > > A number of Intel tests are using checks like "igt_assert(x < y)" rather > than using the dedicated comparison assertions that print the actual > values on assertion failure. Run the Intel test directory through > Coccinelle to apply these conversions and also apply some other general > coding style cleanup: > > spatch --in-place --sp-file lib/igt.cocci tests/intel Seems to have caused a bunch of unused variable warnings: $ gcc --version gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4) ninja: Entering directory `build' [34/912] Compiling C object tests/drm_fdinfo.p/intel_drm_fdinfo.c.o In file included from ../lib/igt.h:29, from ../tests/intel/drm_fdinfo.c:28: ../tests/intel/drm_fdinfo.c: In function =A1read_fdinfo=A2: ../lib/igt_aux.h:229:35: warning: comparison of distinct pointer types lack= s a cast 229 | (!!(sizeof((typeof(x) *)1 =3D=3D (typeof(y) *)1))) | ^~ ../lib/igt_aux.h:246:10: note: in expansion of macro =A1__typecheck=A2 246 | (__typecheck(x, y) && __no_side_effects(x, y)) | ^~~~~~~~~~~ ../lib/igt_aux.h:249:31: note: in expansion of macro =A1__safe_cmp=A2 249 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~ ../lib/igt_aux.h:254:25: note: in expansion of macro =A1__careful_cmp=A2 254 | #define max(x, y) __careful_cmp(x, y, >, max) | ^~~~~~~~~~~~~ ../tests/intel/drm_fdinfo.c:808:16: note: in expansion of macro =A1max=A2 808 | return max(count, 0); | ^~~ [35/912] Compiling C object tests/gem_ctx_create.p/intel_gem_ctx_create.c.o ../tests/intel/gem_ctx_create.c: In function =A1xchg_u32=A2: ../tests/intel/gem_ctx_create.c:298:30: warning: unused variable =A1tmp=A2 = [-Wunused-variable] 298 | uint32_t *a =3D array, tmp; | ^~~ ../tests/intel/gem_ctx_create.c: In function =A1xchg_ptr=A2: ../tests/intel/gem_ctx_create.c:305:28: warning: unused variable =A1tmp=A2 = [-Wunused-variable] 305 | void **a =3D array, *tmp; | ^~~ [36/912] Compiling C object tests/gem_exec_big.p/intel_gem_exec_big.c.o ../tests/intel/gem_exec_big.c: In function =A1xchg_reloc=A2: ../tests/intel/gem_exec_big.c:144:46: warning: unused variable =A1tmp=A2 [-= Wunused-variable] 144 | struct drm_i915_gem_relocation_entry tmp; | ^~~ [37/912] Compiling C object tests/gem_exec_gttfill.p/intel_gem_exec_gttfill= .c.o ../tests/intel/gem_exec_gttfill.c: In function =A1xchg_batch=A2: ../tests/intel/gem_exec_gttfill.c:67:22: warning: unused variable =A1tmp=A2= [-Wunused-variable] 67 | struct batch tmp; | ^~~ [38/912] Compiling C object tests/gem_softpin.p/intel_gem_softpin.c.o ../tests/intel/gem_softpin.c: In function =A1xchg_batch=A2: ../tests/intel/gem_softpin.c:970:22: warning: unused variable =A1tmp=A2 [-W= unused-variable] 970 | struct batch tmp; | ^~~ [39/912] Compiling C object tests/gem_tiled_fence_blits.p/intel_gem_tiled_f= ence_blits.c.o ../tests/intel/gem_tiled_fence_blits.c: In function =A1xchg_u32=A2: ../tests/intel/gem_tiled_fence_blits.c:159:18: warning: unused variable =A1= tmp=A2 [-Wunused-variable] 159 | uint32_t tmp, *base =3D array; | ^~~