linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/hotplug: remove unnecessary BUG_ON in __offline_pages()
@ 2013-07-30  6:49 Xishi Qiu
  2013-07-30 15:39 ` Toshi Kani
  2013-07-31 16:55 ` Dave Hansen
  0 siblings, 2 replies; 4+ messages in thread
From: Xishi Qiu @ 2013-07-30  6:49 UTC (permalink / raw)
  To: linux-mm, LKML, Andrew Morton

I think we can remove "BUG_ON(start_pfn >= end_pfn)" in __offline_pages(),
because in memory_block_action() "nr_pages = PAGES_PER_SECTION * sections_per_block" 
is always greater than 0.

memory_block_action()
	offline_pages()
		__offline_pages()
			BUG_ON(start_pfn >= end_pfn)

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
---
 mm/memory_hotplug.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index ca1dd3a..8e333f9 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1472,7 +1472,6 @@ static int __ref __offline_pages(unsigned long start_pfn,
 	struct zone *zone;
 	struct memory_notify arg;
 
-	BUG_ON(start_pfn >= end_pfn);
 	/* at least, alignment against pageblock is necessary */
 	if (!IS_ALIGNED(start_pfn, pageblock_nr_pages))
 		return -EINVAL;
-- 
1.8.2.2

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-01  1:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30  6:49 [PATCH] mm/hotplug: remove unnecessary BUG_ON in __offline_pages() Xishi Qiu
2013-07-30 15:39 ` Toshi Kani
2013-07-31 16:55 ` Dave Hansen
2013-08-01  1:35   ` Xishi Qiu

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).