[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1342273267-2108-2-git-send-email-penberg@kernel.org>
Date: Sat, 14 Jul 2012 16:41:06 +0300
From: Pekka Enberg <penberg@...nel.org>
To: mingo@...nel.org
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
Pekka Enberg <penberg@...nel.org>, Tejun Heo <tj@...nel.org>,
Yinghai Lu <yinghai@...nel.org>
Subject: [PATCH 2/3] x86/mm: Simplify for-loop in free_init_pages()
As a cleanup, move initial "addr" assignment to the for-loop construct
in free_init_pages().
Cc: Tejun Heo <tj@...nel.org>
Cc: Yinghai Lu <yinghai@...nel.org>
Signed-off-by: Pekka Enberg <penberg@...nel.org>
---
arch/x86/mm/init.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 9eb53c2..e270f94 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -349,8 +349,6 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
if (begin >= end)
return;
- addr = begin;
-
/*
* If debugging page accesses then do not free this memory but
* mark them not present - any buggy init-section access will
@@ -371,7 +369,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10);
- for (; addr < end; addr += PAGE_SIZE) {
+ for (addr = begin; addr < end; addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE);
--
1.7.7.6
--
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