
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug1-dave/mm/page_alloc.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff -puN mm/page_alloc.c~K5-compile-fixes mm/page_alloc.c
--- memhotplug1/mm/page_alloc.c~K5-compile-fixes	2004-11-04 16:45:52.000000000 -0800
+++ memhotplug1-dave/mm/page_alloc.c	2004-11-04 16:45:52.000000000 -0800
@@ -615,7 +615,8 @@ static inline int first_uncaptured_page(
 {
 	int i;
 	int res = -1;
-	int count = 0;;
+	int count = 0;
+	unsigned long end_pfn = start_pfn + nr_pages;
 
 	printk(KERN_DEBUG "%s(%ld, %d) begin\n",
 			__func__, start_pfn, nr_pages);
@@ -675,7 +676,6 @@ int capture_page_range(unsigned long sta
 	struct page *page;
 	int i;
 	unsigned long nr_pages;
-	unsigned long end_pfn;
 
 	/* If the start_pfn is not aligned with the order return failure */
 	if (start_pfn % (1 << order) != 0)
@@ -704,8 +704,7 @@ int capture_page_range(unsigned long sta
 	 * to walk the entire range each time
 	 */
 	fup = start_pfn;
-	end_pfn = start_pfn + nr_pages;
-	while((fp = first_uncaptured_page(fup, end_pfn)) >= 0) {
+	while((fup = first_uncaptured_page(fup, nr_pages)) >= 0) {
 		if (i++ < 100)
 			while (shrink_all_memory(10000));
 		msleep(100);
@@ -715,7 +714,7 @@ int capture_page_range(unsigned long sta
 }
 
 #else /* CONFIG_MEMORY_HOTPLUG */
-int capture_page_range(unsigned long pfn, unsigned long size)
+int capture_page_range(unsigned long pfn, int order)
 {
 	return -ENOSYS;
 }
_
