Skip to content

Commit

Permalink
x86: remove (null) in /sys kernel_page_tables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Apr 14, 2009
1 parent 66aa230 commit 6424fb3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/x86/mm/dump_pagetables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit 6424fb3

Please sign in to comment.