[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALq1K=JTWq+p0M+45nKm4yMs06k=Mt3y7+hbv6Usx+eX+=2MLQ@mail.gmail.com>
Date: Sun, 4 Oct 2015 14:02:38 +0300
From: Leon Romanovsky <leon@...n.nu>
To: Geliang Tang <geliangtang@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Hugh Dickins <hughd@...gle.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Davidlohr Bueso <dave@...olabs.net>,
Joonsoo Kim <js1304@...il.com>, Arnd Bergmann <arnd@...db.de>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Oleg Nesterov <oleg@...hat.com>, Linux-MM <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] mm/nommu: drop unlikely behind BUG_ON()
On Sun, Oct 4, 2015 at 9:18 AM, Geliang Tang <geliangtang@....com> wrote:
> BUG_ON() already contain an unlikely compiler flag. Drop it.
It is not the case if CONFIG_BUG and HAVE_ARCH_BUG_ON are not set.
>
> Signed-off-by: Geliang Tang <geliangtang@....com>
> ---
> mm/nommu.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/mm/nommu.c b/mm/nommu.c
> index 1e0f168..92be862 100644
> --- a/mm/nommu.c
> +++ b/mm/nommu.c
> @@ -578,16 +578,16 @@ static noinline void validate_nommu_regions(void)
> return;
>
> last = rb_entry(lastp, struct vm_region, vm_rb);
> - BUG_ON(unlikely(last->vm_end <= last->vm_start));
> - BUG_ON(unlikely(last->vm_top < last->vm_end));
> + BUG_ON(last->vm_end <= last->vm_start);
> + BUG_ON(last->vm_top < last->vm_end);
>
> while ((p = rb_next(lastp))) {
> region = rb_entry(p, struct vm_region, vm_rb);
> last = rb_entry(lastp, struct vm_region, vm_rb);
>
> - BUG_ON(unlikely(region->vm_end <= region->vm_start));
> - BUG_ON(unlikely(region->vm_top < region->vm_end));
> - BUG_ON(unlikely(region->vm_start < last->vm_top));
> + BUG_ON(region->vm_end <= region->vm_start);
> + BUG_ON(region->vm_top < region->vm_end);
> + BUG_ON(region->vm_start < last->vm_top);
>
> lastp = p;
> }
> --
> 2.5.0
>
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
--
Leon Romanovsky | Independent Linux Consultant
www.leon.nu | leon@...n.nu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists