Skip to contentSkip to conversation

gpiolib: Drop unused domain_ops memeber of GPIO IRQ chip

PATCH Applied Andy Shevchenko 4 participants 5 messages Jun 16, 2023 – Jun 19, 2023 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpiolib: Drop unused domain_ops memeber of GPIO IRQ chip

It seems there is no driver that requires custom IRQ chip domain options. Drop the member and respective code.

---
 drivers/gpio/gpiolib.c      | 3 +--
 include/linux/gpio/driver.h | 7 -------
 2 files changed, 1 insertion(+), 9 deletions(-)
drivers/gpio/gpiolib.c +1 -2
index 5fb64c7d7473..4b404beddcf2 100644
@@ -1668,11 +1668,10 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc,
 		if (ret)
 			return ret;
 	} else {
-		/* Some drivers provide custom irqdomain ops */
 		gc->irq.domain = irq_domain_create_simple(fwnode,
 			gc->ngpio,
 			gc->irq.first,
-			gc->irq.domain_ops ?: &gpiochip_domain_ops,
+			&gpiochip_domain_ops,
 			gc);
 		if (!gc->irq.domain)
 			return -EINVAL;
include/linux/gpio/driver.h +0 -7
index 5c6db5533be6..6879b5436480 100644
@@ -61,13 +61,6 @@ struct gpio_irq_chip {
 	 */
 	struct irq_domain *domain;
 
-	/**
-	 * @domain_ops:
-	 *
-	 * Table of interrupt domain operations for this IRQ chip.
-	 */
-	const struct irq_domain_ops *domain_ops;
-
 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
 	/**
 	 * @fwnode:
Signature · 1 line
2.40.0.1.gaa8946217a0b
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andy Shevchenko

It seems there is no driver that requires custom IRQ chip domain options. Drop the member and respective code.

(...)

drivers/gpio/gpiolib.c static int gpiochip_add_irqchip(struct gpio_chip *gc, · line 1674

Quoted 6 lines
drivers/gpio/gpiolib.c +1 -2
-               /* Some drivers provide custom irqdomain ops */
                gc->irq.domain = irq_domain_create_simple(fwnode,
                        gc->ngpio,
                        gc->irq.first,
-                       gc->irq.domain_ops ?: &gpiochip_domain_ops,
+                       &gpiochip_domain_ops,

We better run this by Marc Zyngier, and Thierry who introduced it.

But some grepping and looking seems to conclude you are righ!

Yours,
Linus Walleij

Acked-by
#2 lore raw
Quoted 16 lines · Linus Walleij
Quoted 4 lines · Andy Shevchenko

It seems there is no driver that requires custom IRQ chip domain options. Drop the member and respective code.

(...)

drivers/gpio/gpiolib.c static int gpiochip_add_irqchip(struct gpio_chip *gc, · line 1674

Quoted 6 lines
drivers/gpio/gpiolib.c +1 -2
-               /* Some drivers provide custom irqdomain ops */
                gc->irq.domain = irq_domain_create_simple(fwnode,
                        gc->ngpio,
                        gc->irq.first,
-                       gc->irq.domain_ops ?: &gpiochip_domain_ops,
+                       &gpiochip_domain_ops,
Quoted 4 lines

We better run this by Marc Zyngier, and Thierry who introduced it.

But some grepping and looking seems to conclude you are righ!

No objection from my end. If this is unused, let's kill it.

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
#3 lore raw
Quoted 4 lines · Marc Zyngier
Quoted 2 lines · Linus Walleij

On Fri, Jun 16, 2023 at 3:53 PM Andy Shevchenko
<[email protected]> wrote:

(...)

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
drivers/gpio/gpiolib.c +1 -2
-               /* Some drivers provide custom irqdomain ops */
                gc->irq.domain = irq_domain_create_simple(fwnode,
                        gc->ngpio,
                        gc->irq.first,
-                       gc->irq.domain_ops ?: &gpiochip_domain_ops,
+                       &gpiochip_domain_ops,
Quoted 6 lines
Quoted 4 lines

We better run this by Marc Zyngier, and Thierry who introduced it.

But some grepping and looking seems to conclude you are righ!

No objection from my end. If this is unused, let's kill it.

Grepping by two independent people and so far no complains from CI, I believe the patch tells truth.

Quoted 1 line

Thank you!

Signature · 2 lines
With Best Regards,
Andy Shevchenko