Skip to content

Commit

Permalink
genirq: Rremove redundant check
Browse files Browse the repository at this point in the history
IRQ_NO_BALANCING is already checked in irq_can_set_affinity() above,
no need to check it again.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Feb 19, 2011
1 parent 1fa46f1 commit b008207
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,15 @@ EXPORT_SYMBOL_GPL(irq_set_affinity_notifier);
*/
static int setup_affinity(unsigned int irq, struct irq_desc *desc)
{
/* Excludes PER_CPU and NO_BALANCE interrupts */
if (!irq_can_set_affinity(irq))
return 0;

/*
* Preserve an userspace affinity setup, but make sure that
* one of the targets is online.
*/
if (desc->status & (IRQ_AFFINITY_SET | IRQ_NO_BALANCING)) {
if (desc->status & (IRQ_AFFINITY_SET)) {
if (cpumask_any_and(desc->irq_data.affinity, cpu_online_mask)
< nr_cpu_ids)
goto set_affinity;
Expand Down

0 comments on commit b008207

Please sign in to comment.