genirq: Switch to irq_get_nr_irqs()
authorBart Van Assche <bvanassche@acm.org>
Tue, 15 Oct 2024 19:09:52 +0000 (12:09 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Oct 2024 19:56:59 +0000 (21:56 +0200)
commit1ad2048bf7146efb83bc033147ca1611a7fe8494
treeaf3b86fae07871cfe8d621d777bf9cd23f942360
parentf4dd946c775e85e4f9aa460cd3dba197c35e43f1
genirq: Switch to irq_get_nr_irqs()

Use the irq_get_nr_irqs() function instead of the global variable
'nr_irqs'. Cache the result of this function in a local variable in
order not to rely on CSE (common subexpression elimination). Prepare
for changing 'nr_irqs' from an exported global variable into a variable
with file scope.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241015190953.1266194-22-bvanassche@acm.org
include/linux/irqnr.h
kernel/irq/irqdomain.c
kernel/irq/proc.c