public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] pinctrl: intel: Inline intel_gpio_community_irq_handler()
@ 2024-09-02 14:14 Andy Shevchenko
  2024-09-03  4:54 ` Mika Westerberg
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2024-09-02 14:14 UTC (permalink / raw)
  To: Andy Shevchenko, linux-gpio, linux-kernel
  Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij

Since we have for_each_intel_pad_group() helper, there is
no advantage of having intel_gpio_community_irq_handler().
Inline it into intel_gpio_irq().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-intel.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 02dd8107e250..a2194d2ab178 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -1256,14 +1256,16 @@ static const struct irq_chip intel_gpio_irq_chip = {
 	GPIOCHIP_IRQ_RESOURCE_HELPERS,
 };
 
-static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl,
-					    const struct intel_community *community)
+static irqreturn_t intel_gpio_irq(int irq, void *data)
 {
+	const struct intel_community *community;
 	const struct intel_padgroup *padgrp;
-	struct gpio_chip *gc = &pctrl->chip;
+	struct intel_pinctrl *pctrl = data;
 	int ret = 0;
 
-	for_each_intel_community_pad_group(community, padgrp) {
+	/* Need to check all communities for pending interrupts */
+	for_each_intel_pad_group(pctrl, community, padgrp) {
+		struct gpio_chip *gc = &pctrl->chip;
 		unsigned long pending, enabled;
 		unsigned int gpp, gpp_offset;
 		void __iomem *reg, *is;
@@ -1287,19 +1289,6 @@ static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl,
 		ret += pending ? 1 : 0;
 	}
 
-	return ret;
-}
-
-static irqreturn_t intel_gpio_irq(int irq, void *data)
-{
-	const struct intel_community *community;
-	struct intel_pinctrl *pctrl = data;
-	int ret = 0;
-
-	/* Need to check all communities for pending interrupts */
-	for_each_intel_pin_community(pctrl, community)
-		ret += intel_gpio_community_irq_handler(pctrl, community);
-
 	return IRQ_RETVAL(ret);
 }
 
-- 
2.43.0.rc1.1336.g36b5255a03ac


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] pinctrl: intel: Inline intel_gpio_community_irq_handler()
  2024-09-02 14:14 [PATCH v1 1/1] pinctrl: intel: Inline intel_gpio_community_irq_handler() Andy Shevchenko
@ 2024-09-03  4:54 ` Mika Westerberg
  2024-09-03 14:09   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2024-09-03  4:54 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-gpio, linux-kernel, Andy Shevchenko, Linus Walleij

On Mon, Sep 02, 2024 at 05:14:41PM +0300, Andy Shevchenko wrote:
> Since we have for_each_intel_pad_group() helper, there is
> no advantage of having intel_gpio_community_irq_handler().
> Inline it into intel_gpio_irq().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] pinctrl: intel: Inline intel_gpio_community_irq_handler()
  2024-09-03  4:54 ` Mika Westerberg
@ 2024-09-03 14:09   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-09-03 14:09 UTC (permalink / raw)
  To: Mika Westerberg; +Cc: linux-gpio, linux-kernel, Linus Walleij

On Tue, Sep 03, 2024 at 07:54:57AM +0300, Mika Westerberg wrote:
> On Mon, Sep 02, 2024 at 05:14:41PM +0300, Andy Shevchenko wrote:
> > Since we have for_each_intel_pad_group() helper, there is
> > no advantage of having intel_gpio_community_irq_handler().
> > Inline it into intel_gpio_irq().
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Pushed to my review and testing queue, thanks!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-03 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-02 14:14 [PATCH v1 1/1] pinctrl: intel: Inline intel_gpio_community_irq_handler() Andy Shevchenko
2024-09-03  4:54 ` Mika Westerberg
2024-09-03 14:09   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox