[PATCH 2/3] irqchip/gic-v3-its: Spin off GICv4 init into a separate function

Marc Zyngier maz at kernel.org
Sat Feb 24 03:10:21 PST 2024


On Sat, 24 Feb 2024 11:02:40 +0000,
Oliver Upton <oliver.upton at linux.dev> 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 <oliver.upton at linux.dev> 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.



More information about the linux-arm-kernel mailing list