summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-12-06 15:47:51 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-06 15:47:51 -0800
commit61d6be3a7a1139285e16a672be72caefd4b1126b (patch)
treed1203b382576b0d33c1d0c5d66e4c1f4cd61dd73 /kernel
parentdabe589657ad0f9a0d6f4101e2171574f74b00bf (diff)
parent4ce413d1840b25b101be3c0559161db8891f3360 (diff)
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/matrix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c
index 7df2480005f8..0ba0dd8863a7 100644
--- a/kernel/irq/matrix.c
+++ b/kernel/irq/matrix.c
@@ -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;
}
/**