Skip to content

Commit

Permalink
kernel/irq: fix sparse warning: make symbol static
Browse files Browse the repository at this point in the history
While being at it make every occurrence of 'do_irq_select_affinity'
have the same signature in terms of signedness of the first argument.

Fix this sparse warning:
  kernel/irq/manage.c:112:5: warning: symbol 'do_irq_select_affinity' was not declared. Should it be static?

Also rename do_irq_select_affinity() to setup_affinity() - shorter name
and clearer naming.

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Hannes Eder authored and Ingo Molnar committed Feb 9, 2009
1 parent d5b5623 commit 548c893
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
/*
* Generic version of the affinity autoselector.
*/
int do_irq_select_affinity(unsigned int irq, struct irq_desc *desc)
static int setup_affinity(unsigned int irq, struct irq_desc *desc)
{
if (!irq_can_set_affinity(irq))
return 0;
Expand All @@ -133,7 +133,7 @@ int do_irq_select_affinity(unsigned int irq, struct irq_desc *desc)
return 0;
}
#else
static inline int do_irq_select_affinity(unsigned int irq, struct irq_desc *d)
static inline int setup_affinity(unsigned int irq, struct irq_desc *d)
{
return irq_select_affinity(irq);
}
Expand All @@ -149,14 +149,14 @@ int irq_select_affinity_usr(unsigned int irq)
int ret;

spin_lock_irqsave(&desc->lock, flags);
ret = do_irq_select_affinity(irq, desc);
ret = setup_affinity(irq, desc);
spin_unlock_irqrestore(&desc->lock, flags);

return ret;
}

#else
static inline int do_irq_select_affinity(int irq, struct irq_desc *desc)
static inline int setup_affinity(unsigned int irq, struct irq_desc *desc)
{
return 0;
}
Expand Down Expand Up @@ -488,7 +488,7 @@ __setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new)
desc->status |= IRQ_NO_BALANCING;

/* Set default affinity mask once everything is setup */
do_irq_select_affinity(irq, desc);
setup_affinity(irq, desc);

} else if ((new->flags & IRQF_TRIGGER_MASK)
&& (new->flags & IRQF_TRIGGER_MASK)
Expand Down

0 comments on commit 548c893

Please sign in to comment.