Re: [PATCH 10/10] pinctrl: starfive: Switch to dynamic chip name output

From: Marc Zyngier
Date: Thu Feb 10 2022 - 09:34:13 EST


[resending, as I managed to royally screw up my initial email]

On Thu, 10 Feb 2022 14:14:19 +0000,
Emil Renner Berthing <kernel@xxxxxxxx> wrote:
>
> On Thu, 10 Feb 2022 at 14:50, Marc Zyngier <maz@xxxxxxxxxx> wrote:
> > On Thu, 10 Feb 2022 13:44:12 +0000,
> > Emil Renner Berthing <kernel@xxxxxxxx> wrote:
> > >
> > > Gotcha. The SoC has been out in very few numbers for less than a year
> > > and the driver only entered mainline in 5.17-rc1, so I doubt anyone
> > > has had time to write scripts that check for this, but I'll let it be
> > > up to you.
> >
> > Ah, I should have checked that. In which case, would you be OK if I
> > simply pushed the removal of this label as a fix for 5.17, and just
> > have it to say "Star5 GPIO", for example, without any indication of
> > the device (which appears in debugfs anyway as part of the irqdomain)?
>
> I'm fine with it although I'd prefer "StarFive GPIO". I haven't seen
> star5 used anywhere.

Fair enough.

> But shouldn't changes like this normally go through Linus Walleij's
> tree?

Either way, I don't mind. For the record, see below what I'm
suggesting we take in before 5.17-final.

Linus?

Thanks,

M.

From a84b83c32048de2ba72e5d05645eabc95ffabe49 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz@xxxxxxxxxx>
Date: Thu, 10 Feb 2022 14:13:36 +0000
Subject: [PATCH] pinctrl: starfive: Use a static name for the GPIO irq_chip

Drop the device name used for the GPIO irq_chip and replace it
with something static. The information is still available from
debugfs and carried as part of the irqdomain.

Suggested-by: Emil Renner Berthing <kernel@xxxxxxxx>
Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
---
drivers/pinctrl/pinctrl-starfive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index 0b912152a405..266da41a6162 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1164,6 +1164,7 @@ static int starfive_irq_set_type(struct irq_data *d, unsigned int trigger)
}

static struct irq_chip starfive_irq_chip = {
+ .name = "StarFive GPIO",
.irq_ack = starfive_irq_ack,
.irq_mask = starfive_irq_mask,
.irq_mask_ack = starfive_irq_mask_ack,
@@ -1308,7 +1309,6 @@ static int starfive_probe(struct platform_device *pdev)
sfp->gc.ngpio = NR_GPIOS;

starfive_irq_chip.parent_device = dev;
- starfive_irq_chip.name = sfp->gc.label;

sfp->gc.irq.chip = &starfive_irq_chip;
sfp->gc.irq.parent_handler = starfive_gpio_irq_handler;
--
2.34.1


--
Without deviation from the norm, progress is not possible.

--
Without deviation from the norm, progress is not possible.