All of lore.kernel.org
 help / color / mirror / Atom feed
From: "irqchip-bot for Marc Zyngier" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Marc Zyngier <maz@kernel.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	tglx@linutronix.de
Subject: [irqchip: irq/irqchip-next] pinctrl: npcm: Fix broken references to chip->parent_device
Date: Wed, 09 Feb 2022 16:17:52 -0000	[thread overview]
Message-ID: <164442347295.16921.7533185762525759717.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220201120310.878267-11-maz@kernel.org>

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     03182a20db448774a4cf5f2e5b1c4bd660746ebe
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/03182a20db448774a4cf5f2e5b1c4bd660746ebe
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:08 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:54 

pinctrl: npcm: Fix broken references to chip->parent_device

The npcm driver has a bunch of references to the irq_chip parent_device
field, but never sets it.

Fix it by fishing that reference from somewhere else, but it is
obvious that these debug statements were never used. Also remove
an unused field in a local data structure.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-11-maz@kernel.org
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 ++++++++++------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4d81908..3995e5f 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -78,7 +78,6 @@ struct npcm7xx_gpio {
 	struct gpio_chip	gc;
 	int			irqbase;
 	int			irq;
-	void			*priv;
 	struct irq_chip		irq_chip;
 	u32			pinctrl_id;
 	int (*direction_input)(struct gpio_chip *chip, unsigned offset);
@@ -226,7 +225,7 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	chained_irq_enter(chip, desc);
 	sts = ioread32(bank->base + NPCM7XX_GP_N_EVST);
 	en  = ioread32(bank->base + NPCM7XX_GP_N_EVEN);
-	dev_dbg(chip->parent_device, "==> got irq sts %.8x %.8x\n", sts,
+	dev_dbg(bank->gc.parent, "==> got irq sts %.8x %.8x\n", sts,
 		en);
 
 	sts &= en;
@@ -241,33 +240,33 @@ static int npcmgpio_set_irq_type(struct irq_data *d, unsigned int type)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = BIT(d->hwirq);
 
-	dev_dbg(d->chip->parent_device, "setirqtype: %u.%u = %u\n", gpio,
+	dev_dbg(bank->gc.parent, "setirqtype: %u.%u = %u\n", gpio,
 		d->irq, type);
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		dev_dbg(d->chip->parent_device, "edge.rising\n");
+		dev_dbg(bank->gc.parent, "edge.rising\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		dev_dbg(d->chip->parent_device, "edge.falling\n");
+		dev_dbg(bank->gc.parent, "edge.falling\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		dev_dbg(d->chip->parent_device, "edge.both\n");
+		dev_dbg(bank->gc.parent, "edge.both\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		dev_dbg(d->chip->parent_device, "level.low\n");
+		dev_dbg(bank->gc.parent, "level.low\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		dev_dbg(d->chip->parent_device, "level.high\n");
+		dev_dbg(bank->gc.parent, "level.high\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	default:
-		dev_dbg(d->chip->parent_device, "invalid irq type\n");
+		dev_dbg(bank->gc.parent, "invalid irq type\n");
 		return -EINVAL;
 	}
 
@@ -289,7 +288,7 @@ static void npcmgpio_irq_ack(struct irq_data *d)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = d->hwirq;
 
-	dev_dbg(d->chip->parent_device, "irq_ack: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_ack: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVST);
 }
 
@@ -301,7 +300,7 @@ static void npcmgpio_irq_mask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Clear events */
-	dev_dbg(d->chip->parent_device, "irq_mask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_mask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENC);
 }
 
@@ -313,7 +312,7 @@ static void npcmgpio_irq_unmask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Enable events */
-	dev_dbg(d->chip->parent_device, "irq_unmask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_unmask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENS);
 }
 
@@ -323,7 +322,7 @@ static unsigned int npcmgpio_irq_startup(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* active-high, input, clear interrupt, enable interrupt */
-	dev_dbg(d->chip->parent_device, "startup: %u.%u\n", gpio, d->irq);
+	dev_dbg(gc_parent, "startup: %u.%u\n", gpio, d->irq);
 	npcmgpio_direction_input(gc, gpio);
 	npcmgpio_irq_ack(d);
 	npcmgpio_irq_unmask(d);

  reply	other threads:[~2022-02-09 16:18 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 12:02 [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain Marc Zyngier
2022-02-01 12:02 ` Marc Zyngier
2022-02-01 12:02 ` Marc Zyngier
2022-02-01 12:02 ` [PATCH 01/12] genirq: Allow the PM device to originate from " Marc Zyngier
2022-02-01 12:02   ` Marc Zyngier
2022-02-01 12:02   ` Marc Zyngier
2022-02-02 14:25   ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-03  7:04   ` Tony Lindgren
2022-02-03  7:04     ` Tony Lindgren
2022-02-03  7:04     ` Tony Lindgren
2022-02-09 16:18   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 02/12] irqchip/gic: Move PM device over to " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:25   ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-09 16:18   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 03/12] irqchip/renesas-intc-gpio: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:27   ` Geert Uytterhoeven
2022-02-02 14:27     ` Geert Uytterhoeven
2022-02-02 14:27     ` Geert Uytterhoeven
2022-02-09 13:40     ` Marc Zyngier
2022-02-09 13:40       ` Marc Zyngier
2022-02-09 13:40       ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] irqchip/renesas-intc-irqpin: " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 04/12] irqchip/renesas-irqc: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:28   ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 05/12] irqchip/imx-intmux: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 06/12] gpio: mt7621: Kill parent_device usage Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 07/12] gpio: omap: Move PM device over to irq domain Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-03  7:05   ` Tony Lindgren
2022-02-03  7:05     ` Tony Lindgren
2022-02-03  7:05     ` Tony Lindgren
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 08/12] gpio: rcar: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:28   ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 09/12] gpio: tpmx86: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` irqchip-bot for Marc Zyngier [this message]
2022-02-10 11:09   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-11  0:42   ` [PATCH 10/12] " Linus Walleij
2022-02-11  0:42     ` Linus Walleij
2022-02-11  0:42     ` Linus Walleij
2022-02-01 12:03 ` [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 15:16   ` Emil Renner Berthing
2022-02-01 15:16     ` Emil Renner Berthing
2022-02-01 15:16     ` Emil Renner Berthing
2022-02-01 15:30     ` Emil Renner Berthing
2022-02-01 15:30       ` Emil Renner Berthing
2022-02-01 15:30       ` Emil Renner Berthing
2022-02-01 16:06     ` Marc Zyngier
2022-02-01 16:06       ` Marc Zyngier
2022-02-01 16:06       ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 12/12] genirq: Kill irq_chip::parent_device Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
2022-02-08 11:13 ` [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain Bartosz Golaszewski
2022-02-08 11:13   ` Bartosz Golaszewski
2022-02-08 11:13   ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=164442347295.16921.7533185762525759717.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=brgl@bgdev.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.