Skip to content

Commit ef4c675

Browse files
bvanasscheKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 1ad2048 commit ef4c675

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

include/linux/irqnr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <uapi/linux/irqnr.h>
66

77

8-
extern int nr_irqs;
98
unsigned int irq_get_nr_irqs(void) __pure;
109
unsigned int irq_set_nr_irqs(unsigned int nr);
1110
extern struct irq_desc *irq_to_desc(unsigned int irq);

kernel/irq/irqdesc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ static void desc_set_defaults(unsigned int irq, struct irq_desc *desc, int node,
138138
desc_smp_init(desc, node, affinity);
139139
}
140140

141-
int nr_irqs = NR_IRQS;
142-
EXPORT_SYMBOL_GPL(nr_irqs);
141+
static unsigned int nr_irqs = NR_IRQS;
143142

144143
/**
145144
* irq_get_nr_irqs() - Number of interrupts supported by the system.

0 commit comments

Comments
 (0)