[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5nq9kyq.wl-maz@kernel.org>
Date: Sat, 24 Feb 2024 11:10:21 +0000
From: Marc Zyngier <maz@...nel.org>
To: Oliver Upton <oliver.upton@...ux.dev>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Zenghui Yu <yuzenghui@...wei.com>,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
kvmarm@...ts.linux.dev,
Jing Zhang <jingzhangos@...gle.com>
Subject: Re: [PATCH 2/3] irqchip/gic-v3-its: Spin off GICv4 init into a separate function
On Sat, 24 Feb 2024 11:02:40 +0000,
Oliver Upton <oliver.upton@...ux.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@...ux.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.
Powered by blists - more mailing lists