From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Christoph Lameter <cl@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Jan Beulich <JBeulich@novell.com>, linux-mm <linux-mm@kvack.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] make new gfp.h BUG_ON() in to VM_BUG_ON()
Date: Fri, 15 Apr 2011 12:16:29 -0700 [thread overview]
Message-ID: <1302894989.16562.3884.camel@nimitz> (raw)
In-Reply-To: <alpine.DEB.2.00.1104150945230.5863@router.home>
On Fri, 2011-04-15 at 09:45 -0500, Christoph Lameter wrote:
> You can also remove the #ifdef. Use VM_BUG_ON.
Gotcha.
--
This goes on top of
include-linux-gfph-work-around-apparent-sparse-confusion.patch
already in the -mm tree.
VM_BUG_ON() if effectively a BUG_ON() undef #ifdef CONFIG_DEBUG_VM.
That is exactly what we have here now, and two different folks have
suggested doing it this way.
Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
---
linux-2.6.git-dave/include/linux/gfp.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff -puN include/linux/gfp.h~make-gfp_h-BUG_ON-in-too-VM_BUG_ON include/linux/gfp.h
--- linux-2.6.git/include/linux/gfp.h~make-gfp_h-BUG_ON-in-too-VM_BUG_ON 2011-04-15 10:59:24.192432223 -0700
+++ linux-2.6.git-dave/include/linux/gfp.h 2011-04-15 10:59:39.384429223 -0700
@@ -249,9 +249,7 @@ static inline enum zone_type gfp_zone(gf
z = (GFP_ZONE_TABLE >> (bit * ZONES_SHIFT)) &
((1 << ZONES_SHIFT) - 1);
-#ifdef CONFIG_DEBUG_VM
- BUG_ON((GFP_ZONE_BAD >> bit) & 1);
-#endif
+ VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1);
return z;
}
_
-- Dave
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-04-15 19:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 15:41 BUILD_BUG_ON() breaks sparse gfp_t checks Dave Hansen
2011-04-14 20:22 ` Andrew Morton
2011-04-14 21:39 ` Dave Hansen
2011-04-15 14:45 ` Christoph Lameter
2011-04-15 19:16 ` Dave Hansen [this message]
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=1302894989.16562.3884.camel@nimitz \
--to=dave@linux.vnet.ibm.com \
--cc=JBeulich@novell.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rusty@rustcorp.com.au \
/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;
as well as URLs for NNTP newsgroup(s).