Skip to content

Commit 827bafd

Browse files
committed
genirq: Make a few functions static
None of these functions are used outside of their source files. Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/878qpe2gnx.ffs@tglx
1 parent aa4a1d5 commit 827bafd

File tree

6 files changed

+22
-34
lines changed

6 files changed

+22
-34
lines changed

include/linux/irqdomain.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,6 @@ static inline int irq_domain_alloc_irqs(struct irq_domain *domain,
630630
NULL);
631631
}
632632

633-
int irq_domain_alloc_irqs_hierarchy(struct irq_domain *domain,
634-
unsigned int irq_base,
635-
unsigned int nr_irqs, void *arg);
636633
int irq_domain_set_hwirq_and_chip(struct irq_domain *domain,
637634
unsigned int virq,
638635
irq_hw_number_t hwirq,

kernel/irq/chip.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,21 @@ __irq_startup_managed(struct irq_desc *desc, const struct cpumask *aff,
232232
}
233233
#endif
234234

235+
static void irq_enable(struct irq_desc *desc)
236+
{
237+
if (!irqd_irq_disabled(&desc->irq_data)) {
238+
unmask_irq(desc);
239+
} else {
240+
irq_state_clr_disabled(desc);
241+
if (desc->irq_data.chip->irq_enable) {
242+
desc->irq_data.chip->irq_enable(&desc->irq_data);
243+
irq_state_clr_masked(desc);
244+
} else {
245+
unmask_irq(desc);
246+
}
247+
}
248+
}
249+
235250
static int __irq_startup(struct irq_desc *desc)
236251
{
237252
struct irq_data *d = irq_desc_get_irq_data(desc);
@@ -332,21 +347,6 @@ void irq_shutdown_and_deactivate(struct irq_desc *desc)
332347
irq_domain_deactivate_irq(&desc->irq_data);
333348
}
334349

335-
void irq_enable(struct irq_desc *desc)
336-
{
337-
if (!irqd_irq_disabled(&desc->irq_data)) {
338-
unmask_irq(desc);
339-
} else {
340-
irq_state_clr_disabled(desc);
341-
if (desc->irq_data.chip->irq_enable) {
342-
desc->irq_data.chip->irq_enable(&desc->irq_data);
343-
irq_state_clr_masked(desc);
344-
} else {
345-
unmask_irq(desc);
346-
}
347-
}
348-
}
349-
350350
static void __irq_disable(struct irq_desc *desc, bool mask)
351351
{
352352
if (irqd_irq_disabled(&desc->irq_data)) {

kernel/irq/internals.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,19 @@ extern int irq_startup(struct irq_desc *desc, bool resend, bool force);
9090

9191
extern void irq_shutdown(struct irq_desc *desc);
9292
extern void irq_shutdown_and_deactivate(struct irq_desc *desc);
93-
extern void irq_enable(struct irq_desc *desc);
9493
extern void irq_disable(struct irq_desc *desc);
9594
extern void irq_percpu_enable(struct irq_desc *desc, unsigned int cpu);
9695
extern void irq_percpu_disable(struct irq_desc *desc, unsigned int cpu);
9796
extern void mask_irq(struct irq_desc *desc);
9897
extern void unmask_irq(struct irq_desc *desc);
9998
extern void unmask_threaded_irq(struct irq_desc *desc);
10099

101-
extern unsigned int kstat_irqs_desc(struct irq_desc *desc, const struct cpumask *cpumask);
102-
103100
#ifdef CONFIG_SPARSE_IRQ
104101
static inline void irq_mark_irq(unsigned int irq) { }
105102
#else
106103
extern void irq_mark_irq(unsigned int irq);
107104
#endif
108105

109-
extern int __irq_get_irqchip_state(struct irq_data *data,
110-
enum irqchip_irq_state which,
111-
bool *state);
112-
113106
irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc);
114107
irqreturn_t handle_irq_event_percpu(struct irq_desc *desc);
115108
irqreturn_t handle_irq_event(struct irq_desc *desc);
@@ -139,8 +132,6 @@ static inline void unregister_handler_proc(unsigned int irq,
139132

140133
extern bool irq_can_set_affinity_usr(unsigned int irq);
141134

142-
extern void irq_set_thread_affinity(struct irq_desc *desc);
143-
144135
extern int irq_do_set_affinity(struct irq_data *data,
145136
const struct cpumask *dest, bool force);
146137

kernel/irq/irqdesc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
991991
return desc && desc->kstat_irqs ? per_cpu(desc->kstat_irqs->cnt, cpu) : 0;
992992
}
993993

994-
unsigned int kstat_irqs_desc(struct irq_desc *desc, const struct cpumask *cpumask)
994+
static unsigned int kstat_irqs_desc(struct irq_desc *desc, const struct cpumask *cpumask)
995995
{
996996
unsigned int sum = 0;
997997
int cpu;

kernel/irq/irqdomain.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,9 +1589,8 @@ static void irq_domain_free_irqs_hierarchy(struct irq_domain *domain,
15891589
}
15901590
}
15911591

1592-
int irq_domain_alloc_irqs_hierarchy(struct irq_domain *domain,
1593-
unsigned int irq_base,
1594-
unsigned int nr_irqs, void *arg)
1592+
static int irq_domain_alloc_irqs_hierarchy(struct irq_domain *domain, unsigned int irq_base,
1593+
unsigned int nr_irqs, void *arg)
15951594
{
15961595
if (!domain->ops->alloc) {
15971596
pr_debug("domain->ops->alloc() is NULL\n");

kernel/irq/manage.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ static int __init setup_forced_irqthreads(char *arg)
3535
early_param("threadirqs", setup_forced_irqthreads);
3636
#endif
3737

38+
static int __irq_get_irqchip_state(struct irq_data *d, enum irqchip_irq_state which, bool *state);
39+
3840
static void __synchronize_hardirq(struct irq_desc *desc, bool sync_chip)
3941
{
4042
struct irq_data *irqd = irq_desc_get_irq_data(desc);
@@ -187,7 +189,7 @@ bool irq_can_set_affinity_usr(unsigned int irq)
187189
* set_cpus_allowed_ptr() here as we hold desc->lock and this
188190
* code can be called from hard interrupt context.
189191
*/
190-
void irq_set_thread_affinity(struct irq_desc *desc)
192+
static void irq_set_thread_affinity(struct irq_desc *desc)
191193
{
192194
struct irqaction *action;
193195

@@ -2789,8 +2791,7 @@ void teardown_percpu_nmi(unsigned int irq)
27892791
irq_put_desc_unlock(desc, flags);
27902792
}
27912793

2792-
int __irq_get_irqchip_state(struct irq_data *data, enum irqchip_irq_state which,
2793-
bool *state)
2794+
static int __irq_get_irqchip_state(struct irq_data *data, enum irqchip_irq_state which, bool *state)
27942795
{
27952796
struct irq_chip *chip;
27962797
int err = -EINVAL;

0 commit comments

Comments
 (0)