mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Coly Li <bosong.ly@taobao.com>
To: linux-kernel@vger.kernel.org
Cc: Coly Li <bosong.ly@taobao.com>,
	David Howells <dhowells@redhat.com>,
	Christoph Hellwig <hch@lst.de>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 1/6] mm: use BUG_ON correctly in nommu.c
Date: Thu, 27 Jan 2011 02:54:50 +0800	[thread overview]
Message-ID: <1296068095-16988-2-git-send-email-bosong.ly@taobao.com> (raw)
In-Reply-To: <1296068095-16988-1-git-send-email-bosong.ly@taobao.com>

This patch makes BUG_ON() usage correct in mm/nommu.c. Since there
are 2 lines even before 2.6.12, I am not able to find out the original
author, Cc Andrew as well.

Signed-off-by: Coly Li <bosong.ly@taobao.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 mm/nommu.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mm/nommu.c b/mm/nommu.c
index f59e142..eccff36 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -534,16 +534,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;
 	}
-- 
1.7.3.2


  reply	other threads:[~2011-01-26 18:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 18:54 [PATCH 0/6] use BUG_ON correctly Coly Li
2011-01-26 18:54 ` Coly Li [this message]
2011-01-26 18:54 ` [PATCH 2/6] dma: use BUG_ON correctly in iop-adma.c Coly Li
2011-01-26 18:54 ` [PATCH 3/6] dma: use BUG_ON correctly in mv_xor.c Coly Li
2011-01-26 18:54 ` [PATCH 4/6] dma: use BUG_ON correctly in ppc4xx/adam.c Coly Li
2011-01-26 18:54 ` [PATCH 5/6] wl_cfg80211.c: use BUG_ON correctly Coly Li
2011-01-26 18:54 ` [PATCH 6/6] scsi_lib.c: " Coly Li
  -- strict thread matches above, loose matches on Subject: below --
2011-01-26 18:39 [PATCH 0/6] " Coly Li
2011-01-26 18:39 ` [PATCH 1/6] mm: use BUG_ON correctly in nommu.c Coly Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296068095-16988-2-git-send-email-bosong.ly@taobao.com \
    --to=bosong.ly@taobao.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®