Skip to content

Commit

Permalink
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:
 "Two fixes: use bool type consistently, plus a irq_matrix_available()
  bugfix"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqdesc: Use bool return type instead of int
  genirq/matrix: Fix the precedence fix for real
  • Loading branch information
torvalds committed Dec 6, 2017
2 parents dabe589 + 4ce413d commit 61d6be3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/linux/irqdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,23 +230,23 @@ irq_set_chip_handler_name_locked(struct irq_data *data, struct irq_chip *chip,
data->chip = chip;
}

static inline int irq_balancing_disabled(unsigned int irq)
static inline bool irq_balancing_disabled(unsigned int irq)
{
struct irq_desc *desc;

desc = irq_to_desc(irq);
return desc->status_use_accessors & IRQ_NO_BALANCING_MASK;
}

static inline int irq_is_percpu(unsigned int irq)
static inline bool irq_is_percpu(unsigned int irq)
{
struct irq_desc *desc;

desc = irq_to_desc(irq);
return desc->status_use_accessors & IRQ_PER_CPU;
}

static inline int irq_is_percpu_devid(unsigned int irq)
static inline bool irq_is_percpu_devid(unsigned int irq)
{
struct irq_desc *desc;

Expand Down
4 changes: 3 additions & 1 deletion kernel/irq/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ unsigned int irq_matrix_available(struct irq_matrix *m, bool cpudown)
{
struct cpumap *cm = this_cpu_ptr(m->maps);

return (m->global_available - cpudown) ? cm->available : 0;
if (!cpudown)
return m->global_available;
return m->global_available - cm->available;
}

/**
Expand Down

0 comments on commit 61d6be3

Please sign in to comment.