]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen/setup: Only print "Freeing XXX-YYY pfn range: Z pages freed" if Z > 0
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 30 Mar 2012 19:37:07 +0000 (15:37 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 11 May 2012 18:15:00 +0000 (14:15 -0400)
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"

[upstream git commit ca1182387e57470460294ce1e39e2d5518809811]
Acked-by: David Vrabel <david.vrabel@citrix.com>
[v1: Extended to the summary printks]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/setup.c

index 6338655e2c9527523f03c1d6665f129fe36a9323..f1b95ed74c759cbd9f10e26b79dffebc23758e70 100644 (file)
@@ -109,8 +109,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;
 }
@@ -157,8 +158,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;
 }