powerpc: remove unnecessary unlikely()
authorIgor Stoppa <igor.stoppa@gmail.com>
Fri, 7 Sep 2018 15:35:26 +0000 (18:35 +0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Jan 2019 00:38:05 +0000 (11:38 +1100)
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.

Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
Cc: Arseny Solokha <asolokha@kb.kras.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/tlb_nohash.c
arch/powerpc/sysdev/xive/common.c

index ae5d568e267f681d43367b19e9b21f7307debfe3..ac23dc1c653520d3e152e9807919f5080c408819 100644 (file)
@@ -302,7 +302,7 @@ void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
         * This function as well as __local_flush_tlb_page() must only be called
         * for user contexts.
         */
-       if (unlikely(WARN_ON(!mm)))
+       if (WARN_ON(!mm))
                return;
 
        preempt_disable();
index 94a69a62f5db868a3c97367b64c3e2a3ae9754d3..70a8f9e31a2dc79a7b1db4c0dd63d1ea46793019 100644 (file)
@@ -442,7 +442,7 @@ static void xive_dec_target_count(int cpu)
        struct xive_cpu *xc = per_cpu(xive_cpu, cpu);
        struct xive_q *q = &xc->queue[xive_irq_priority];
 
-       if (unlikely(WARN_ON(cpu < 0 || !xc))) {
+       if (WARN_ON(cpu < 0 || !xc)) {
                pr_err("%s: cpu=%d xc=%p\n", __func__, cpu, xc);
                return;
        }