Thread (33 messages) 33 messages, 5 authors, 18h ago

Re: [PATCH RFC 04/11] clocksource/drivers/arm_arch_timer_mmio: Dispose IRQ mappings on probe failure

flat view

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2026-09-25 09:52:17
Also in: driver-core, linux-acpi, linux-watchdog, lkml

On Fri, Sep 25, 2026 at 09:48:03AM +0200, Lorenzo Pieralisi wrote:
On probe failure the driver does not dispose the IRQ mappings that
were carried out before the probe function hit an error condition.

Add code to dispose the IRQ mappings on driver probe failure.
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
---
Same here about Cc list...

...
quoted hunk ↗ jump to hunk
+static void arch_timer_mmio_unmap_irq(int *irq)
+{
+	if (irq && *irq) {
Would be better to read and maintain with the negative check.
quoted hunk ↗ jump to hunk
+		irq_dispose_mapping(*irq);
+		*irq = 0;
+	}
+}
...
quoted hunk ↗ jump to hunk
+static void arch_timer_mmio_unmap_irqs(struct arch_timer_mem *gt_block)
+{
+	int i;
Why signed?
+	for (i = 0; i < ARCH_TIMER_MEM_MAX_FRAMES; i++) {
	for (unsigned int i = 0; i < ARCH_TIMER_MEM_MAX_FRAMES; i++) {
quoted hunk ↗ jump to hunk
+		struct arch_timer_mem_frame *frame = &gt_block->frame[i];
+
+		if (!frame->valid)
+			continue;
+
+		arch_timer_mmio_unmap_frame_irqs(frame);
+	}
+}
-- 
With Best Regards,
Andy Shevchenko


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help