Skip to content

Commit

Permalink
xen/setup: Only print "Freeing XXX-YYY pfn range: Z pages freed" if Z…
Browse files Browse the repository at this point in the history
… > 0

Otherwise we can get these meaningless:
Freeing  bad80-badf4 pfn range: 0 pages freed

We also can do this for the summary ones - no point of printing
"Set 0 page(s) to 1-1 mapping"

Acked-by: David Vrabel <[email protected]>
[v1: Extended to the summary printks]
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
  • Loading branch information
konradwilk committed May 7, 2012
1 parent 940713b commit ca11823
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions arch/x86/xen/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ static unsigned long __init xen_release_chunk(unsigned long start,
len++;
}
}
printk(KERN_INFO "Freeing %lx-%lx pfn range: %lu pages freed\n",
start, end, len);
if (len)
printk(KERN_INFO "Freeing %lx-%lx pfn range: %lu pages freed\n",
start, end, len);

return len;
}
Expand Down Expand Up @@ -162,8 +163,10 @@ static unsigned long __init xen_set_identity_and_release(
}
}

printk(KERN_INFO "Released %lu pages of unused memory\n", released);
printk(KERN_INFO "Set %ld page(s) to 1-1 mapping\n", identity);
if (released)
printk(KERN_INFO "Released %lu pages of unused memory\n", released);
if (identity)
printk(KERN_INFO "Set %ld page(s) to 1-1 mapping\n", identity);

return released;
}
Expand Down

0 comments on commit ca11823

Please sign in to comment.