* [PATCH 03/19] rtc: asm9260: use guard
[not found] <20261019211827.126262-1-alexandre.belloni@bootlin.com>
@ 2026-10-19 21:18 ` alexandre.belloni
2026-10-19 21:18 ` [PATCH 18/19] rtc: stm32: " alexandre.belloni
1 sibling, 0 replies; 2+ messages in thread
From: alexandre.belloni @ 2026-10-19 21:18 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alexandre Belloni
Cc: linux-arm-kernel, linux-rtc, linux-kernel
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use guard() to simplify error handling
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-asm9260.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c
index 705470ae8428..422c2e5d83aa 100644
--- a/drivers/rtc/rtc-asm9260.c
+++ b/drivers/rtc/rtc-asm9260.c
@@ -116,15 +116,13 @@ static irqreturn_t asm9260_rtc_irq(int irq, void *dev_id)
u32 isr;
unsigned long events = 0;
- rtc_lock(priv->rtc);
+ guard(rtc_ops)(priv->rtc);
isr = ioread32(priv->iobase + HW_CIIR);
if (!isr) {
- rtc_unlock(priv->rtc);
return IRQ_NONE;
}
iowrite32(0, priv->iobase + HW_CIIR);
- rtc_unlock(priv->rtc);
events |= RTC_AF | RTC_IRQF;
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 18/19] rtc: stm32: use guard
[not found] <20261019211827.126262-1-alexandre.belloni@bootlin.com>
2026-10-19 21:18 ` [PATCH 03/19] rtc: asm9260: use guard alexandre.belloni
@ 2026-10-19 21:18 ` alexandre.belloni
1 sibling, 0 replies; 2+ messages in thread
From: alexandre.belloni @ 2026-10-19 21:18 UTC (permalink / raw)
To: Alexandre Belloni, Maxime Coquelin, Alexandre Torgue
Cc: linux-rtc, linux-stm32, linux-arm-kernel, linux-kernel
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Use guard() to simplify locking
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-stm32.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c
index d4ebf3eb54aa..1c4e4bd7afe4 100644
--- a/drivers/rtc/rtc-stm32.c
+++ b/drivers/rtc/rtc-stm32.c
@@ -465,7 +465,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id)
const struct stm32_rtc_events *evts = &rtc->data->events;
unsigned int status, cr;
- rtc_lock(rtc->rtc_dev);
+ guard(rtc_ops)(rtc->rtc_dev);
status = readl_relaxed(rtc->base + regs->sr);
cr = readl_relaxed(rtc->base + regs->cr);
@@ -482,8 +482,6 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id)
stm32_rtc_clear_event_flags(rtc, evts->alra);
}
- rtc_unlock(rtc->rtc_dev);
-
return IRQ_HANDLED;
}
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-19 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261019211827.126262-1-alexandre.belloni@bootlin.com>
2026-10-19 21:18 ` [PATCH 03/19] rtc: asm9260: use guard alexandre.belloni
2026-10-19 21:18 ` [PATCH 18/19] rtc: stm32: " alexandre.belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox