diff --git a/target/linux/armsr/patches-6.18/801-irqchip-renesas-rzv2h-remove-backported-field_get.patch b/target/linux/armsr/patches-6.18/801-irqchip-renesas-rzv2h-remove-backported-field_get.patch new file mode 100644 index 00000000000..6b376ad15af --- /dev/null +++ b/target/linux/armsr/patches-6.18/801-irqchip-renesas-rzv2h-remove-backported-field_get.patch @@ -0,0 +1,43 @@ +From 1a675d560de624e2954557e495d3386ac5b0063f Mon Sep 17 00:00:00 2001 +From: Mathew McBride +Date: Sat, 25 Apr 2026 10:30:28 +1000 +Subject: [PATCH] irqchip/renesas-rzv2h: remove backported field_get definition + +(This is specific to OpenWrt's kernel 6.18 and is not +relevant to upstream) + +In OpenWrt we have backported changes to bitfield.h +from kernel 6.19. + +A backport fix, 9966c8cc987e ("irqchip/renesas-rzv2h: +Prevent TINT spurious interrupt during resume") into +linux-stable/linux-6.18.y modified irq-renesas-rzv2h.c +to include it's own field_get, which does not exist +in the 6.18 branch, causing a compile error: + +drivers/irqchip/irq-renesas-rzv2h.c:92:9: error: "field_get" redefined [-Werror] + 92 | #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1)) + | ^~~~~~~~~ +In file included from drivers/irqchip/irq-renesas-rzv2h.c:12: +./include/linux/bitfield.h:299:9: note: this is the location of the previous definition + 299 | #define field_get(mask, reg) + | ^~~~~~~~~ + +cc1: all warnings being treated as errors + +Signed-off-by: Mathew McBride +--- + drivers/irqchip/irq-renesas-rzv2h.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/irqchip/irq-renesas-rzv2h.c ++++ b/drivers/irqchip/irq-renesas-rzv2h.c +@@ -89,8 +89,6 @@ + #define ICU_RZG3E_TSSEL_MAX_VAL 0x8c + #define ICU_RZV2H_TSSEL_MAX_VAL 0x55 + +-#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1)) +- + /** + * struct rzv2h_hw_info - Interrupt Control Unit controller hardware info structure. + * @tssel_lut: TINT lookup table