mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] gpio: mvebu: Convert generic irqchip locking to guard()
Date: Mon, 07 Apr 2025 07:53:50 -0000	[thread overview]
Message-ID: <174401243064.31282.13006765449893061189.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250313142524.262678485@linutronix.de>

The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     9949aec666eb3e55522409f243fa6e873424fdc5
Gitweb:        https://git.kernel.org/tip/9949aec666eb3e55522409f243fa6e873424fdc5
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Thu, 13 Mar 2025 15:31:25 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 07 Apr 2025 09:43:20 +02:00

gpio: mvebu: Convert generic irqchip locking to guard()

Conversion was done with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/all/20250313142524.262678485@linutronix.de

---
 drivers/gpio/gpio-mvebu.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 3604abc..2581fbb 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -408,9 +408,8 @@ static void mvebu_gpio_irq_ack(struct irq_data *d)
 	struct mvebu_gpio_chip *mvchip = gc->private;
 	u32 mask = d->mask;
 
-	irq_gc_lock(gc);
+	guard(raw_spinlock)(&gc->lock);
 	mvebu_gpio_write_edge_cause(mvchip, ~mask);
-	irq_gc_unlock(gc);
 }
 
 static void mvebu_gpio_edge_irq_mask(struct irq_data *d)
@@ -420,10 +419,9 @@ static void mvebu_gpio_edge_irq_mask(struct irq_data *d)
 	struct irq_chip_type *ct = irq_data_get_chip_type(d);
 	u32 mask = d->mask;
 
-	irq_gc_lock(gc);
+	guard(raw_spinlock)(&gc->lock);
 	ct->mask_cache_priv &= ~mask;
 	mvebu_gpio_write_edge_mask(mvchip, ct->mask_cache_priv);
-	irq_gc_unlock(gc);
 }
 
 static void mvebu_gpio_edge_irq_unmask(struct irq_data *d)
@@ -433,11 +431,10 @@ static void mvebu_gpio_edge_irq_unmask(struct irq_data *d)
 	struct irq_chip_type *ct = irq_data_get_chip_type(d);
 	u32 mask = d->mask;
 
-	irq_gc_lock(gc);
+	guard(raw_spinlock)(&gc->lock);
 	mvebu_gpio_write_edge_cause(mvchip, ~mask);
 	ct->mask_cache_priv |= mask;
 	mvebu_gpio_write_edge_mask(mvchip, ct->mask_cache_priv);
-	irq_gc_unlock(gc);
 }
 
 static void mvebu_gpio_level_irq_mask(struct irq_data *d)
@@ -447,10 +444,9 @@ static void mvebu_gpio_level_irq_mask(struct irq_data *d)
 	struct irq_chip_type *ct = irq_data_get_chip_type(d);
 	u32 mask = d->mask;
 
-	irq_gc_lock(gc);
+	guard(raw_spinlock)(&gc->lock);
 	ct->mask_cache_priv &= ~mask;
 	mvebu_gpio_write_level_mask(mvchip, ct->mask_cache_priv);
-	irq_gc_unlock(gc);
 }
 
 static void mvebu_gpio_level_irq_unmask(struct irq_data *d)
@@ -460,10 +456,9 @@ static void mvebu_gpio_level_irq_unmask(struct irq_data *d)
 	struct irq_chip_type *ct = irq_data_get_chip_type(d);
 	u32 mask = d->mask;
 
-	irq_gc_lock(gc);
+	guard(raw_spinlock)(&gc->lock);
 	ct->mask_cache_priv |= mask;
 	mvebu_gpio_write_level_mask(mvchip, ct->mask_cache_priv);
-	irq_gc_unlock(gc);
 }
 
 /*****************************************************************************

  parent reply	other threads:[~2025-04-07  7:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 14:31 [patch 0/7] genirq/generic_chip: Convert locking to guards Thomas Gleixner
2025-03-13 14:31 ` [patch 1/7] genirq/generic-chip: Make locking unconditional Thomas Gleixner
2025-04-07  7:53   ` [tip: irq/drivers] " tip-bot2 for Thomas Gleixner
2025-03-13 14:31 ` [patch 2/7] genirq/generic-chip: Convert core code to lock guards Thomas Gleixner
2025-03-14 10:55   ` Linus Walleij
2025-04-07  7:53   ` [tip: irq/drivers] " tip-bot2 for Thomas Gleixner
2025-04-08 18:10   ` [patch 2/7] " Geert Uytterhoeven
2025-03-13 14:31 ` [patch 3/7] soc: dove: Convert generic irqchip locking to guard() Thomas Gleixner
2025-03-13 14:48   ` Andrew Lunn
2025-03-14 10:57   ` Linus Walleij
2025-04-07  7:53   ` [tip: irq/drivers] " tip-bot2 for Thomas Gleixner
2025-03-13 14:31 ` [patch 4/7] ARM: orion/gpio:: " Thomas Gleixner
2025-03-14 10:56   ` Linus Walleij
2025-04-07  7:53   ` [tip: irq/drivers] " tip-bot2 for Thomas Gleixner
2025-04-14 14:29   ` [patch 4/7] " Gregory CLEMENT
2025-03-13 14:31 ` [patch 5/7] gpio: mvebu: " Thomas Gleixner
2025-03-14 10:19   ` Bartosz Golaszewski
2025-03-14 11:07   ` Linus Walleij
2025-04-07  7:53   ` tip-bot2 for Thomas Gleixner [this message]
2025-03-13 14:31 ` [patch 6/7] irqchip: Convert generic irqchip locking to guards Thomas Gleixner
2025-03-14 10:56   ` Linus Walleij
2025-03-14 17:20   ` Herve Codina
2025-04-07  7:53   ` [tip: irq/drivers] " tip-bot2 for Thomas Gleixner
2025-03-13 14:31 ` [patch 7/7] genirq/generic-chip: Remove unused lock wrappers Thomas Gleixner
2025-04-07  7:53   ` [tip: irq/drivers] " tip-bot2 for Thomas Gleixner
2025-03-16  8:50 ` [patch 0/7] genirq/generic_chip: Convert locking to guards Markus Elfring

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=174401243064.31282.13006765449893061189.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®