From: Magnus Damm <magnus@valinux.co.jp>
To: linux-kernel@vger.kernel.org
Cc: Magnus Damm <magnus@valinux.co.jp>,
magnus.damm@gmail.com, Andi Kleen <ak@muc.de>
Subject: [PATCH] x86_64: e820.c - end_pfn namespace fixes
Date: Thu, 02 Nov 2006 22:20:53 +0900 [thread overview]
Message-ID: <20061102132053.24699.24665.sendpatchset@localhost> (raw)
x86_64: e820.c - end_pfn namespace fixes
The functions e820_end_of_ram() and e820_register_active_regions() both
use local variables named end_pfn. A global variable with the same name
is exported from the same file. This patch renames the local variables
to _end_pfn to avoid namespace mistakes.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
---
Applies to 2.6.19-rc4.
arch/x86_64/kernel/e820.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
--- 0005/arch/x86_64/kernel/e820.c
+++ work/arch/x86_64/kernel/e820.c 2006-11-02 21:44:59.000000000 +0900
@@ -167,20 +167,19 @@ unsigned long __init find_e820_area(unsi
*/
unsigned long __init e820_end_of_ram(void)
{
- unsigned long end_pfn = 0;
- end_pfn = find_max_pfn_with_active_regions();
+ unsigned long _end_pfn = find_max_pfn_with_active_regions();
- if (end_pfn > end_pfn_map)
- end_pfn_map = end_pfn;
+ if (_end_pfn > end_pfn_map)
+ end_pfn_map = _end_pfn;
if (end_pfn_map > MAXMEM>>PAGE_SHIFT)
end_pfn_map = MAXMEM>>PAGE_SHIFT;
- if (end_pfn > end_user_pfn)
- end_pfn = end_user_pfn;
- if (end_pfn > end_pfn_map)
- end_pfn = end_pfn_map;
+ if (_end_pfn > end_user_pfn)
+ _end_pfn = end_user_pfn;
+ if (_end_pfn > end_pfn_map)
+ _end_pfn = end_pfn_map;
printk("end_pfn_map = %lu\n", end_pfn_map);
- return end_pfn;
+ return _end_pfn;
}
/*
@@ -267,7 +266,7 @@ void __init e820_mark_nosave_regions(voi
/* Walk the e820 map and register active regions within a node */
void __init
e820_register_active_regions(int nid, unsigned long start_pfn,
- unsigned long end_pfn)
+ unsigned long _end_pfn)
{
int i;
unsigned long ei_startpfn, ei_endpfn;
@@ -288,14 +287,14 @@ e820_register_active_regions(int nid, un
/* Skip if map is outside the node */
if (ei->type != E820_RAM ||
ei_endpfn <= start_pfn ||
- ei_startpfn >= end_pfn)
+ ei_startpfn >= _end_pfn)
continue;
/* Check for overlaps */
if (ei_startpfn < start_pfn)
ei_startpfn = start_pfn;
- if (ei_endpfn > end_pfn)
- ei_endpfn = end_pfn;
+ if (ei_endpfn > _end_pfn)
+ ei_endpfn = _end_pfn;
/* Obey end_user_pfn to save on memmap */
if (ei_startpfn >= end_user_pfn)
reply other threads:[~2006-11-02 13:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20061102132053.24699.24665.sendpatchset@localhost \
--to=magnus@valinux.co.jp \
--cc=ak@muc.de \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.