From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 387312260B; Sat, 24 Feb 2024 11:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708773025; cv=none; b=a502LBAUQLj1jEDoqxnh1STfZ/oOAX+5yjcXxa4VyoREkYCbe9GRX70lYRbe5Q1unyGFK6DjHs7njplcEL24kROwfwLzJ7coGYusmdZjn6mLFVFIYLQZQZePg6yGq0pp+gXc9tBMDufZS11vElVKX7QVATDrEnR5wahejw6ACB4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708773025; c=relaxed/simple; bh=m49QT+idwaeh0In0nycFo1IXbGgzrKJZswe/n72NjQ0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=JhPCbpU2hyEvSR7hWMQVakj3PlvchX/oFpisFiD87OcK6q+uTGgujz8kMwhFCPn4j08siOKsCdao6FidGPtauzAKsyFUhYuBsqkB5XTEKQ8Y4OrimB7xs1BaFxpxmPwxNoxdroHqyc1nhDadNu2dE/PLsHUpCEQxE/LnNHjwa+c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ir74/rFK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ir74/rFK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A83E2C433C7; Sat, 24 Feb 2024 11:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708773024; bh=m49QT+idwaeh0In0nycFo1IXbGgzrKJZswe/n72NjQ0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ir74/rFKX8LjcfnIudalqZ1q8xK5ha8zdz5j+QLlCC8o6JgVifNggcG1W94cbzOVu aJlVZyGxmLQvvBvTT5seofDYJ9pGay8h9ByZ1XehfNL/Vy/n03E2FhmOL0EAGNTMbs O8HA2DxYhETMakF6o/DmbB7i+qywv0VScrOOUJHOihvyZvqMu9jvEgKH/h7ww6IQNR f96Ha9M8h2vdm01olw1R6sILnsYPSzWvF6pqhXG16F54P9gdZq/Ni/x7XPreIGqFAA +Tp5yboP34eASil67VQIlW8yUt0u9lxXyc3C7uCJPxBdKb9IQh91IRip29etG1Gpdw nXnpmK73ld0CA== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rdpvC-006Lvp-JE; Sat, 24 Feb 2024 11:10:22 +0000 Date: Sat, 24 Feb 2024 11:10:21 +0000 Message-ID: <87a5nq9kyq.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Thomas Gleixner , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, Jing Zhang Subject: Re: [PATCH 2/3] irqchip/gic-v3-its: Spin off GICv4 init into a separate function In-Reply-To: References: <20240219185809.286724-1-oliver.upton@linux.dev> <20240219185809.286724-3-oliver.upton@linux.dev> <87cysm9mtv.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, tglx@linutronix.de, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, jingzhangos@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Sat, 24 Feb 2024 11:02:40 +0000, Oliver Upton wrote: > > On Sat, Feb 24, 2024 at 10:30:04AM +0000, Marc Zyngier wrote: > > On Mon, 19 Feb 2024 18:58:07 +0000, Oliver Upton wrote: > > > @@ -3193,7 +3210,8 @@ static void its_cpu_init_lpis(void) > > > * ancient programming gets left in and has possibility of > > > * corrupting memory. > > > */ > > > - val = its_clear_vpend_valid(vlpi_base, 0, 0); > > > + its_clear_vpend_valid(vlpi_base, 0, 0); > > > + return; > > > > I'm not sure about the necessity of this return statement. > > allocate_vpe_l1_table() checks for rvpeid already, so it should be > > fine to carry on. > > Yup, definitely not necessary. My aim was to have the control flow make > it a bit more obvious to the reader what's going on. > > Having what reads as an allocation helper do a feature check isn't > entirely obvious. > > I have no opinion either way though. You could move the if (allocate_vpe_l1_table()) as an 'else' branch, as the two are mutually exclusive. Thanks, M. -- Without deviation from the norm, progress is not possible.