]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel: armsr: remove duplicated field_get from rzv2h irqchip
authorMathew McBride <matt@traverse.com.au>
Sun, 29 Mar 2026 23:30:00 +0000 (10:30 +1100)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 25 May 2026 20:12:02 +0000 (22:12 +0200)
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.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/21433
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/armsr/patches-6.18/801-irqchip-renesas-rzv2h-remove-backported-field_get.patch [new file with mode: 0644]

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 (file)
index 0000000..6b376ad
--- /dev/null
@@ -0,0 +1,43 @@
+From 1a675d560de624e2954557e495d3386ac5b0063f Mon Sep 17 00:00:00 2001
+From: Mathew McBride <matt@traverse.com.au>
+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 <matt@traverse.com.au>
+---
+ 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