genirq: Make a few functions static
Subsystems (2)
PATCH 1/1 genirq: Make a few functions static
None of these functions are used outside of their source files.
Signed-off-by Thomas Gleixner <[email protected]>
--- include/linux/irqdomain.h | 3 --- kernel/irq/chip.c | 30 +++++++++++++++--------------- kernel/irq/internals.h | 9 --------- kernel/irq/irqdesc.c | 2 +- kernel/irq/irqdomain.c | 5 ++--- kernel/irq/manage.c | 7 ++++--- 6 files changed, 22 insertions(+), 34 deletions(-)
include/linux/irqdomain.h +0 -3
@@ -628,9 +628,6 @@ static inline int irq_domain_alloc_irqs( NULL); } -extern int irq_domain_alloc_irqs_hierarchy (struct irq_domain *domain, -unsigned int irq_base, -unsigned int nr_irqs,void *arg); extern int irq_domain_set_hwirq_and_chip(struct irq_domain *domain, unsigned int virq, irq_hw_number_t hwirq,
kernel/irq/chip.c +15 -15
@@ -232,6 +232,21 @@ static __always_inline int }#endif +static void irq_enable (struct irq_desc *desc) +{ +if (!irqd_irq_disabled (&desc->irq_data)) { +unmask_irq (desc); + }else { +irq_state_clr_disabled (desc); +if (desc->irq_data.chip->irq_enable) { + desc->irq_data.chip->irq_enable (&desc->irq_data); +irq_state_clr_masked (desc); + }else { +unmask_irq (desc); + } + } +} +static int __irq_startup (struct irq_desc *desc) {struct irq_data *d =irq_desc_get_irq_data (desc);
@@ -332,21 +347,6 @@ void irq_shutdown_and_deactivate(structirq_domain_deactivate_irq (&desc->irq_data); } -void irq_enable (struct irq_desc *desc) -{ -if (!irqd_irq_disabled (&desc->irq_data)) { -unmask_irq (desc); - }else { -irq_state_clr_disabled (desc); -if (desc->irq_data.chip->irq_enable) { - desc->irq_data.chip->irq_enable (&desc->irq_data); -irq_state_clr_masked (desc); - }else { -unmask_irq (desc); - } - } -} -static void __irq_disable (struct irq_desc *desc,bool mask) {if (irqd_irq_disabled (&desc->irq_data)) {
kernel/irq/internals.h +0 -9
@@ -90,7 +90,6 @@ extern int irq_startup(struct irq_desc *extern void irq_shutdown (struct irq_desc *desc);extern void irq_shutdown_and_deactivate (struct irq_desc *desc); -extern void irq_enable (struct irq_desc *desc);extern void irq_disable (struct irq_desc *desc);extern void irq_percpu_enable (struct irq_desc *desc,unsigned int cpu);extern void irq_percpu_disable (struct irq_desc *desc,unsigned int cpu);
@@ -98,18 +97,12 @@ extern void mask_irq(struct irq_desc *deextern void unmask_irq (struct irq_desc *desc);extern void unmask_threaded_irq (struct irq_desc *desc); -extern unsigned int kstat_irqs_desc (struct irq_desc *desc,const struct cpumask *cpumask); -#ifdef CONFIG_SPARSE_IRQ static inline void irq_mark_irq (unsigned int irq) { }#else extern void irq_mark_irq (unsigned int irq);#endif -extern int __irq_get_irqchip_state (struct irq_data *data, -enum irqchip_irq_state which, -bool *state); -irqreturn_t __handle_irq_event_percpu (struct irq_desc *desc);irqreturn_t handle_irq_event_percpu (struct irq_desc *desc);irqreturn_t handle_irq_event (struct irq_desc *desc);
@@ -139,8 +132,6 @@ static inline void unregister_handler_prextern bool irq_can_set_affinity_usr (unsigned int irq); -extern void irq_set_thread_affinity (struct irq_desc *desc); -extern int irq_do_set_affinity (struct irq_data *data,const struct cpumask *dest,bool force);
kernel/irq/irqdesc.c +1 -1
@@ -991,7 +991,7 @@ unsigned int kstat_irqs_cpu(unsigned intreturn desc && desc->kstat_irqs ?per_cpu (desc->kstat_irqs->cnt, cpu) :0 ; } -unsigned int kstat_irqs_desc (struct irq_desc *desc,const struct cpumask *cpumask) +static unsigned int kstat_irqs_desc (struct irq_desc *desc,const struct cpumask *cpumask) {unsigned int sum =0 ;int cpu;
kernel/irq/irqdomain.c +2 -3
@@ -1589,9 +1589,8 @@ static void irq_domain_free_irqs_hierarc } } -int irq_domain_alloc_irqs_hierarchy (struct irq_domain *domain, -unsigned int irq_base, -unsigned int nr_irqs,void *arg) +static int irq_domain_alloc_irqs_hierarchy (struct irq_domain *domain,unsigned int irq_base, +unsigned int nr_irqs,void *arg) {if (!domain->ops->alloc) {pr_debug ("domain->ops->alloc() is NULL\n" );
kernel/irq/manage.c +4 -3
@@ -35,6 +35,8 @@ static int __init setup_forced_irqthreadearly_param ("threadirqs" , setup_forced_irqthreads);#endif +static int __irq_get_irqchip_state (struct irq_data *d,enum irqchip_irq_state which,bool *state); +static void __synchronize_hardirq (struct irq_desc *desc,bool sync_chip) {struct irq_data *irqd =irq_desc_get_irq_data (desc);
@@ -187,7 +189,7 @@ bool irq_can_set_affinity_usr(unsigned i* set_cpus_allowed_ptr() here as we hold desc->lock and this * code can be called from hard interrupt context. */ -void irq_set_thread_affinity (struct irq_desc *desc) +static void irq_set_thread_affinity (struct irq_desc *desc) {struct irqaction *action;
@@ -2789,8 +2791,7 @@ void teardown_percpu_nmi(unsigned int irirq_put_desc_unlock (desc, flags); } -int __irq_get_irqchip_state (struct irq_data *data,enum irqchip_irq_state which, -bool *state) +static int __irq_get_irqchip_state (struct irq_data *data,enum irqchip_irq_state which,bool *state) {struct irq_chip *chip;int err = -EINVAL ;
Quoted 1 line · Thomas Gleixner
None of these functions are used outside of their source files.
Thanks for letting me know, there is only an easy conflict in irqdomain.h with my series. (And it LGTM.)
Signature · 2 lines
js suse labs
The following commit has been merged into the irq/core branch of tip:
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 827bafd527dde5a6e81421e88fb2144adac1f36c Gitweb: https://git.kernel.org/tip/827bafd527dde5a6e81421e88fb2144adac1f36c Author: Thomas Gleixner <[email protected]> AuthorDate: Sun, 09 Mar 2025 19:38:26 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Mon, 10 Mar 2025 10:01:20 +01:00
genirq: Make a few functions static
None of these functions are used outside of their source files.
Signed-off-by Thomas Gleixner <[email protected]>
--- include/linux/irqdomain.h | 3 --- kernel/irq/chip.c | 30 +++++++++++++++--------------- kernel/irq/internals.h | 9 --------- kernel/irq/irqdesc.c | 2 +- kernel/irq/irqdomain.c | 5 ++--- kernel/irq/manage.c | 7 ++++--- 6 files changed, 22 insertions(+), 34 deletions(-)
include/linux/irqdomain.h +0 -3
@@ -630,9 +630,6 @@ static inline int irq_domain_alloc_irqs(struct irq_domain *domain, NULL); } -int irq_domain_alloc_irqs_hierarchy (struct irq_domain *domain, -unsigned int irq_base, -unsigned int nr_irqs,void *arg); int irq_domain_set_hwirq_and_chip(struct irq_domain *domain, unsigned int virq, irq_hw_number_t hwirq,
kernel/irq/chip.c +15 -15
@@ -232,6 +232,21 @@ __irq_startup_managed(struct irq_desc *desc, const struct cpumask *aff, }#endif +static void irq_enable (struct irq_desc *desc) +{ +if (!irqd_irq_disabled (&desc->irq_data)) { +unmask_irq (desc); + }else { +irq_state_clr_disabled (desc); +if (desc->irq_data.chip->irq_enable) { + desc->irq_data.chip->irq_enable (&desc->irq_data); +irq_state_clr_masked (desc); + }else { +unmask_irq (desc); + } + } +} +static int __irq_startup (struct irq_desc *desc) {struct irq_data *d =irq_desc_get_irq_data (desc);
@@ -332,21 +347,6 @@ void irq_shutdown_and_deactivate(struct irq_desc *desc)irq_domain_deactivate_irq (&desc->irq_data); } -void irq_enable (struct irq_desc *desc) -{ -if (!irqd_irq_disabled (&desc->irq_data)) { -unmask_irq (desc); - }else { -irq_state_clr_disabled (desc); -if (desc->irq_data.chip->irq_enable) { - desc->irq_data.chip->irq_enable (&desc->irq_data); -irq_state_clr_masked (desc); - }else { -unmask_irq (desc); - } - } -} -static void __irq_disable (struct irq_desc *desc,bool mask) {if (irqd_irq_disabled (&desc->irq_data)) {
kernel/irq/internals.h +0 -9
@@ -90,7 +90,6 @@ extern int irq_startup(struct irq_desc *desc, bool resend, bool force);extern void irq_shutdown (struct irq_desc *desc);extern void irq_shutdown_and_deactivate (struct irq_desc *desc); -extern void irq_enable (struct irq_desc *desc);extern void irq_disable (struct irq_desc *desc);extern void irq_percpu_enable (struct irq_desc *desc,unsigned int cpu);extern void irq_percpu_disable (struct irq_desc *desc,unsigned int cpu);
@@ -98,18 +97,12 @@ extern void mask_irq(struct irq_desc *desc);extern void unmask_irq (struct irq_desc *desc);extern void unmask_threaded_irq (struct irq_desc *desc); -extern unsigned int kstat_irqs_desc (struct irq_desc *desc,const struct cpumask *cpumask); -#ifdef CONFIG_SPARSE_IRQ static inline void irq_mark_irq (unsigned int irq) { }#else extern void irq_mark_irq (unsigned int irq);#endif -extern int __irq_get_irqchip_state (struct irq_data *data, -enum irqchip_irq_state which, -bool *state); -irqreturn_t __handle_irq_event_percpu (struct irq_desc *desc);irqreturn_t handle_irq_event_percpu (struct irq_desc *desc);irqreturn_t handle_irq_event (struct irq_desc *desc);
@@ -139,8 +132,6 @@ static inline void unregister_handler_proc(unsigned int irq,extern bool irq_can_set_affinity_usr (unsigned int irq); -extern void irq_set_thread_affinity (struct irq_desc *desc); -extern int irq_do_set_affinity (struct irq_data *data,const struct cpumask *dest,bool force);
kernel/irq/irqdesc.c +1 -1
@@ -991,7 +991,7 @@ unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)return desc && desc->kstat_irqs ?per_cpu (desc->kstat_irqs->cnt, cpu) :0 ; } -unsigned int kstat_irqs_desc (struct irq_desc *desc,const struct cpumask *cpumask) +static unsigned int kstat_irqs_desc (struct irq_desc *desc,const struct cpumask *cpumask) {unsigned int sum =0 ;int cpu;
kernel/irq/irqdomain.c +2 -3
@@ -1589,9 +1589,8 @@ static void irq_domain_free_irqs_hierarchy(struct irq_domain *domain, } } -int irq_domain_alloc_irqs_hierarchy (struct irq_domain *domain, -unsigned int irq_base, -unsigned int nr_irqs,void *arg) +static int irq_domain_alloc_irqs_hierarchy (struct irq_domain *domain,unsigned int irq_base, +unsigned int nr_irqs,void *arg) {if (!domain->ops->alloc) {pr_debug ("domain->ops->alloc() is NULL\n" );
kernel/irq/manage.c +4 -3
@@ -35,6 +35,8 @@ static int __init setup_forced_irqthreads(char *arg)early_param ("threadirqs" , setup_forced_irqthreads);#endif +static int __irq_get_irqchip_state (struct irq_data *d,enum irqchip_irq_state which,bool *state); +static void __synchronize_hardirq (struct irq_desc *desc,bool sync_chip) {struct irq_data *irqd =irq_desc_get_irq_data (desc);
@@ -187,7 +189,7 @@ bool irq_can_set_affinity_usr(unsigned int irq)* set_cpus_allowed_ptr() here as we hold desc->lock and this * code can be called from hard interrupt context. */ -void irq_set_thread_affinity (struct irq_desc *desc) +static void irq_set_thread_affinity (struct irq_desc *desc) {struct irqaction *action;
@@ -2789,8 +2791,7 @@ out:irq_put_desc_unlock (desc, flags); } -int __irq_get_irqchip_state (struct irq_data *data,enum irqchip_irq_state which, -bool *state) +static int __irq_get_irqchip_state (struct irq_data *data,enum irqchip_irq_state which,bool *state) {struct irq_chip *chip;int err = -EINVAL ;