* [PATCH] x86: remove (null) in /sys kernel_page_tables
@ 2009-04-14 6:51 Yinghai Lu
2009-04-14 10:02 ` [tip:x86/mm] " tip-bot for Yinghai Lu
0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2009-04-14 6:51 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel@vger.kernel.org
Impact: clearnup
%p prints out 0x000000000000000 as (null)
so use %lx instead.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/mm/dump_pagetables.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: linux-2.6/arch/x86/mm/dump_pagetables.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/dump_pagetables.c
+++ linux-2.6/arch/x86/mm/dump_pagetables.c
@@ -161,13 +161,14 @@ static void note_page(struct seq_file *m
st->current_address >= st->marker[1].start_address) {
const char *unit = units;
unsigned long delta;
+ int width = sizeof(unsigned long) * 2;
/*
* Now print the actual finished series
*/
- seq_printf(m, "0x%p-0x%p ",
- (void *)st->start_address,
- (void *)st->current_address);
+ seq_printf(m, "0x%0*lx-0x%0*lx ",
+ width, st->start_address,
+ width, st->current_address);
delta = (st->current_address - st->start_address) >> 10;
while (!(delta & 1023) && unit[1]) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/mm] x86: remove (null) in /sys kernel_page_tables
2009-04-14 6:51 [PATCH] x86: remove (null) in /sys kernel_page_tables Yinghai Lu
@ 2009-04-14 10:02 ` tip-bot for Yinghai Lu
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Yinghai Lu @ 2009-04-14 10:02 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, tglx, mingo
Commit-ID: 6424fb38667fffbbb1b90be0ffd9a0c540db6a4b
Gitweb: http://git.kernel.org/tip/6424fb38667fffbbb1b90be0ffd9a0c540db6a4b
Author: Yinghai Lu <yinghai@kernel.org>
AuthorDate: Mon, 13 Apr 2009 23:51:46 -0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 14 Apr 2009 11:50:22 +0200
x86: remove (null) in /sys kernel_page_tables
Impact: cleanup
%p prints out 0x000000000000000 as (null)
so use %lx instead.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <49E43282.1090607@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/mm/dump_pagetables.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index e7277cb..a725b7f 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -161,13 +161,14 @@ static void note_page(struct seq_file *m, struct pg_state *st,
st->current_address >= st->marker[1].start_address) {
const char *unit = units;
unsigned long delta;
+ int width = sizeof(unsigned long) * 2;
/*
* Now print the actual finished series
*/
- seq_printf(m, "0x%p-0x%p ",
- (void *)st->start_address,
- (void *)st->current_address);
+ seq_printf(m, "0x%0*lx-0x%0*lx ",
+ width, st->start_address,
+ width, st->current_address);
delta = (st->current_address - st->start_address) >> 10;
while (!(delta & 1023) && unit[1]) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-14 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14 6:51 [PATCH] x86: remove (null) in /sys kernel_page_tables Yinghai Lu
2009-04-14 10:02 ` [tip:x86/mm] " tip-bot for Yinghai Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox