Re: [PATCH] pinctrl: qcom: Replace open coded eoi call with irq_chip_eoi_parent()
From: Bjorn Andersson
Date: Mon May 18 2026 - 23:36:13 EST
On Mon, May 18, 2026 at 10:20:55PM -0500, Bjorn Andersson wrote:
> On Thu, May 14, 2026 at 02:08:25PM +0530, Maulik Shah wrote:
> > Replace open coded eoi call to parent irqchip with irq_chip_eoi_parent().
> >
> > No functional impact.
> >
>
> Reviewed-by: Bjorn Andersson <andersson@xxxxxxxxxx>
>
On second though, I'm not sure I want to r-b this patch.
The commit message explains the action of the patch, not the reasons for
the patch. From the description I inferred that irq_chip_eoi_parent()
does implement what is open coded here, and a quick glance confirms
that.
I'm guessing that irq_chip_eoi_parent() didn't exist when
msm_gpio_irq_eoi() was written? Or was it not used for some reason?
> Regards,
> Bjorn
>
> > Signed-off-by: Maulik Shah <maulik.shah@xxxxxxxxxxxxxxxx>
> > ---
> > drivers/pinctrl/qcom/pinctrl-msm.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
> > index 45b3a2763eb8..6771f5eb29e4 100644
> > --- a/drivers/pinctrl/qcom/pinctrl-msm.c
> > +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
> > @@ -1012,10 +1012,8 @@ static void msm_gpio_irq_ack(struct irq_data *d)
> >
> > static void msm_gpio_irq_eoi(struct irq_data *d)
> > {
> > - d = d->parent_data;
> > -
> > - if (d)
> > - d->chip->irq_eoi(d);
> > + if (d->parent_data)
"I know that irq_chip_eoi_parent() will peak into d->parent_data, so
let's peek into the object first to avoid it dereferencing a NULL
pointer".
I see one other caller to irq_chip_eoi_parent() doing this, most
everyone else just register irq_chip_eoi_parent directly in the ops
struct.
Are we doing it right?
Regards,
Bjorn
> > + irq_chip_eoi_parent(d);
> > }
> >
> > static bool msm_gpio_needs_dual_edge_parent_workaround(struct irq_data *d,
> >
> > ---
> > base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
> > change-id: 20260514-pinctrl_msm_irq_eoi-ab736e16d411
> >
> > Best regards,
> > --
> > Maulik Shah <maulik.shah@xxxxxxxxxxxxxxxx>
> >
>