Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

genirq: Unexport nr_irqs

Unexport nr_irqs and declare it static now that all code that reads or
modifies nr_irqs has been converted to number_of_interrupts() /
set_number_of_interrupts(). Change the type of 'nr_irqs' from 'int' into
'unsigned int' to match the return type and argument type of the
irq_get_nr_iqs() / irq_set_nr_irqs() functions.

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-23-bvanassche@acm.org

authored by

Bart Van Assche and committed by
Thomas Gleixner
ef4c675d 1ad2048b

+1 -3
-1
include/linux/irqnr.h
··· 5 5 #include <uapi/linux/irqnr.h> 6 6 7 7 8 - extern int nr_irqs; 9 8 unsigned int irq_get_nr_irqs(void) __pure; 10 9 unsigned int irq_set_nr_irqs(unsigned int nr); 11 10 extern struct irq_desc *irq_to_desc(unsigned int irq);
+1 -2
kernel/irq/irqdesc.c
··· 138 138 desc_smp_init(desc, node, affinity); 139 139 } 140 140 141 - int nr_irqs = NR_IRQS; 142 - EXPORT_SYMBOL_GPL(nr_irqs); 141 + static unsigned int nr_irqs = NR_IRQS; 143 142 144 143 /** 145 144 * irq_get_nr_irqs() - Number of interrupts supported by the system.