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 25235D3E775 for ; Tue, 5 Nov 2024 22:04:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7A6110E0F9; Tue, 5 Nov 2024 22:04:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="A4lxpIdw"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC16710E0F9 for ; Tue, 5 Nov 2024 22:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730844273; x=1762380273; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=Rw36ppaDuBNw4ENFRq2wCOKPKg1uc4xbKA3q50rg/O0=; b=A4lxpIdw1yBDamCD9UBkFJku6DFWk6i4uJ5wzSsHXs0ckJ+RLb2OTZeh Crmmytefhyss8WY5rCzWMpfDwAzFn8xVP88/UpiaAEH56eg7loAY2gD5s EqcyL4dQCEdmMw/o1/TCuBOQcnlEtP1rr+nOQLnjas8YpcI+h2YIDDTMP o1r54UN2pzrW0BTOT3ZA9+a27xXL/3SSYp/jzhB0/+SE5NXK+AfBl/9gF X0JwtSG84C/MZkYfc56VGRmHdQyCO8JLphe68Ku99NkusynRp9D50b6tH TyMesCGPGLW94MgAuD0SXgtwdvT9gfrV/07zv2VOW6KRfpbGyqjebgU6m g==; X-CSE-ConnectionGUID: YbV1JC1oQd2wGent0HeFbg== X-CSE-MsgGUID: 5EsUNtK4TymBOvBllLbPlQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="34312904" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="34312904" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2024 14:04:33 -0800 X-CSE-ConnectionGUID: xSwfMhQ5Sfe6yrKelPAjhw== X-CSE-MsgGUID: Ndt2gnR3RzygGjjVtTqIyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,261,1725346800"; d="scan'208";a="84318399" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.142]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2024 14:04:33 -0800 Date: Tue, 05 Nov 2024 14:04:32 -0800 Message-ID: <85r07pxrpr.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: "Dong, Zhanjun" Cc: "Teres Alexis, Alan Previn" , "intel-xe@lists.freedesktop.org" Subject: Re: [PATCH v2] drm/xe/guc: Fix missing init value and add register order check In-Reply-To: <10b081e9-1cf6-44d9-9ee2-3ce47e099273@intel.com> References: <20241104182425.162007-1-zhanjun.dong@intel.com> <10b081e9-1cf6-44d9-9ee2-3ce47e099273@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=US-ASCII X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Tue, 05 Nov 2024 12:54:49 -0800, Dong, Zhanjun wrote: > >> + Hi Zhanjun, > >> + case REG_64BIT_HI_DW: { > > alan: nit: now that you have moved to a switch statement, is this { really required? > Few concerns: > 1. Have {} here will make it works on most compilers and ANSIC settings. > 2. Local variable "u64 value_qw" will be limited within this case > statement, I don't want it to be referenced on other case statement. Do you have a compiler where it doesn't compile? Looks like you can declare the variable following case without the brace, compiles at least with gcc. Also, if you need the brace, the 'break' at the end should be inside the brace. This is used in a few places in xe, you can see how it's done :) Thanks. -- Ashutosh