]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
genirq/cpuhotplug: Dont claim success on error
authorThomas Gleixner <tglx@linutronix.de>
Mon, 19 Jun 2017 23:37:26 +0000 (01:37 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 22 Jun 2017 16:21:16 +0000 (18:21 +0200)
In case the affinity of an interrupt was broken, a printk is emitted.

But if the affinity cannot be set at all due to a missing
irq_set_affinity() callback or due to a failing callback, the message is
still printed preceeded by a warning/error.

That makes no sense whatsoever.

Signed-off-by: Thomas 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/20170619235445.274852976@linutronix.de
kernel/irq/cpuhotplug.c

index 7051398315900db6dadbe1d7ecf3a596a05cd146..9c5521b247d56fc38641b6562dcf7c2d5c1fccaf 100644 (file)
@@ -37,11 +37,14 @@ static bool migrate_one_irq(struct irq_desc *desc)
        c = irq_data_get_irq_chip(d);
        if (!c->irq_set_affinity) {
                pr_debug("IRQ%u: unable to set affinity\n", d->irq);
+               ret = false;
        } else {
                int r = irq_do_set_affinity(d, affinity, false);
-               if (r)
+               if (r) {
                        pr_warn_ratelimited("IRQ%u: set affinity failed(%d).\n",
                                            d->irq, r);
+                       ret = false;
+               }
        }
 
        return ret;