]> git.ipfire.org Git - thirdparty/linux.git/commit
irqchip/renesas-rzv2h: Clarify IRQ range definitions and tighten TINT validation
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Wed, 4 Mar 2026 11:33:14 +0000 (11:33 +0000)
committerThomas Gleixner <tglx@kernel.org>
Tue, 10 Mar 2026 17:34:51 +0000 (18:34 +0100)
commit9dc4335758c983045ab38871e2411fa1ae7e438d
tree34d8b1e7be0ae33af74daf9710301acd5d70706e
parentc34368b0404b8fd610b4f589481a1339bab76e0f
irqchip/renesas-rzv2h: Clarify IRQ range definitions and tighten TINT validation

Introduce ICU_IRQ_LAST and ICU_TINT_LAST macros to make range boundaries
explicit and reduce the chance of off-by-one errors.

Extract the TINT information up front in rzv2h_icu_alloc() and validate
the resulting hardware IRQ against the full TINT range
[ICU_TINT_START, ICU_TINT_LAST].

[ tglx: Convert the hard to parse inverse conditions to use a simple helper
   macro hwirq_within() which is easy to read, less error prone and
   avoids a lot of typing ]

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260304113317.129339-5-prabhakar.mahadev-lad.rj@bp.renesas.com
drivers/irqchip/irq-renesas-rzv2h.c