[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240930181600.1684198-22-bvanassche@acm.org>
Date: Mon, 30 Sep 2024 11:16:00 -0700
From: Bart Van Assche <bvanassche@....org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Russell King <linux@...linux.org.uk>,
linux-kernel@...r.kernel.org,
Bart Van Assche <bvanassche@....org>
Subject: [PATCH 21/21] 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().
Signed-off-by: Bart Van Assche <bvanassche@....org>
---
include/linux/irqnr.h | 1 -
kernel/irq/irqdesc.c | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index 81b76949c52e..82060d75642c 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -5,7 +5,6 @@
#include <uapi/linux/irqnr.h>
-extern int nr_irqs;
int number_of_interrupts(void) __pure;
int set_number_of_interrupts(int nr);
extern struct irq_desc *irq_to_desc(unsigned int irq);
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 8c6280843964..dea51c641f87 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -138,8 +138,7 @@ static void desc_set_defaults(unsigned int irq, struct irq_desc *desc, int node,
desc_smp_init(desc, node, affinity);
}
-int nr_irqs = NR_IRQS;
-EXPORT_SYMBOL_GPL(nr_irqs);
+static int nr_irqs = NR_IRQS;
int number_of_interrupts(void)
{
Powered by blists - more mailing lists