Commit 4ab764c3 authored by Thomas Gleixner's avatar Thomas Gleixner

genirq: Remove pointless gfp argument

All callers hand in GPF_KERNEL. No point to have an extra argument for
that.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Link: http://lkml.kernel.org/r/20170619235446.082544752@linutronix.de
parent 047dc633
...@@ -54,14 +54,14 @@ static void __init init_irq_default_affinity(void) ...@@ -54,14 +54,14 @@ static void __init init_irq_default_affinity(void)
#endif #endif
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node) static int alloc_masks(struct irq_desc *desc, int node)
{ {
if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity, if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity,
gfp, node)) GFP_KERNEL, node))
return -ENOMEM; return -ENOMEM;
#ifdef CONFIG_GENERIC_PENDING_IRQ #ifdef CONFIG_GENERIC_PENDING_IRQ
if (!zalloc_cpumask_var_node(&desc->pending_mask, gfp, node)) { if (!zalloc_cpumask_var_node(&desc->pending_mask, GFP_KERNEL, node)) {
free_cpumask_var(desc->irq_common_data.affinity); free_cpumask_var(desc->irq_common_data.affinity);
return -ENOMEM; return -ENOMEM;
} }
...@@ -86,7 +86,7 @@ static void desc_smp_init(struct irq_desc *desc, int node, ...@@ -86,7 +86,7 @@ static void desc_smp_init(struct irq_desc *desc, int node,
#else #else
static inline int static inline int
alloc_masks(struct irq_desc *desc, gfp_t gfp, int node) { return 0; } alloc_masks(struct irq_desc *desc, int node) { return 0; }
static inline void static inline void
desc_smp_init(struct irq_desc *desc, int node, const struct cpumask *affinity) { } desc_smp_init(struct irq_desc *desc, int node, const struct cpumask *affinity) { }
#endif #endif
...@@ -344,9 +344,8 @@ static struct irq_desc *alloc_desc(int irq, int node, unsigned int flags, ...@@ -344,9 +344,8 @@ static struct irq_desc *alloc_desc(int irq, int node, unsigned int flags,
struct module *owner) struct module *owner)
{ {
struct irq_desc *desc; struct irq_desc *desc;
gfp_t gfp = GFP_KERNEL;
desc = kzalloc_node(sizeof(*desc), gfp, node); desc = kzalloc_node(sizeof(*desc), GFP_KERNEL, node);
if (!desc) if (!desc)
return NULL; return NULL;
/* allocate based on nr_cpu_ids */ /* allocate based on nr_cpu_ids */
...@@ -354,7 +353,7 @@ static struct irq_desc *alloc_desc(int irq, int node, unsigned int flags, ...@@ -354,7 +353,7 @@ static struct irq_desc *alloc_desc(int irq, int node, unsigned int flags,
if (!desc->kstat_irqs) if (!desc->kstat_irqs)
goto err_desc; goto err_desc;
if (alloc_masks(desc, gfp, node)) if (alloc_masks(desc, node))
goto err_kstat; goto err_kstat;
raw_spin_lock_init(&desc->lock); raw_spin_lock_init(&desc->lock);
...@@ -525,7 +524,7 @@ int __init early_irq_init(void) ...@@ -525,7 +524,7 @@ int __init early_irq_init(void)
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
desc[i].kstat_irqs = alloc_percpu(unsigned int); desc[i].kstat_irqs = alloc_percpu(unsigned int);
alloc_masks(&desc[i], GFP_KERNEL, node); alloc_masks(&desc[i], node);
raw_spin_lock_init(&desc[i].lock); raw_spin_lock_init(&desc[i].lock);
lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
desc_set_defaults(i, &desc[i], node, NULL, NULL); desc_set_defaults(i, &desc[i], node, NULL, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment