mm: percpu: remove unnecessary unlikely()
authorIgor Stoppa <igor.stoppa@gmail.com>
Fri, 31 Aug 2018 19:44:22 +0000 (22:44 +0300)
committerDennis Zhou <dennis@kernel.org>
Thu, 13 Sep 2018 04:23:23 +0000 (21:23 -0700)
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: Tejun Heo <tj@kernel.org>
Cc: zijun_hu <zijun_hu@htc.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Dennis Zhou <dennis@kernel.org>
mm/percpu.c

index a749d4d..f5c2796 100644 (file)
@@ -2588,7 +2588,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size,
        BUG_ON(ai->nr_groups != 1);
        upa = ai->alloc_size/ai->unit_size;
        nr_g0_units = roundup(num_possible_cpus(), upa);
-       if (unlikely(WARN_ON(ai->groups[0].nr_units != nr_g0_units))) {
+       if (WARN_ON(ai->groups[0].nr_units != nr_g0_units)) {
                pcpu_free_alloc_info(ai);
                return -EINVAL;
        }