WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [PATCH] Fix a couple of typos

To: XenPPC-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [XenPPC] [PATCH] Fix a couple of typos
From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Aug 2006 16:49:47 +1000
Delivery-date: Mon, 28 Aug 2006 23:49:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: XenPPC-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>

While getting xend/domU up and runngin today I noticed what
look like a couple of typos.

AFAICT do_dom0_op will return 0 or -1, so the failure test in
tools/libxc/powerpc64/xc_memory.c has the wrong operator.

Also in xen/arch/powerpc/shadow.c:shadow_set_allocation() rc is unused
and thus returning stack garbage.


Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>

---
 tools/libxc/powerpc64/xc_memory.c |    2 +-
 xen/arch/powerpc/shadow.c         |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff -r f05a3e9d3e8f tools/libxc/powerpc64/xc_memory.c
--- a/tools/libxc/powerpc64/xc_memory.c Mon Aug 28 18:35:29 2006 -0500
+++ b/tools/libxc/powerpc64/xc_memory.c Tue Aug 29 16:44:42 2006 +1000
@@ -35,7 +35,7 @@ int xc_alloc_real_mode_area(int xc_handl
 
     err = do_dom0_op(xc_handle, &op);
 
-    if (err > 0)
+    if (err < 0)
         DPRINTF("Failed real mode area allocation for dom %u (log %u)\n",
                 domain, log);
 
diff -r f05a3e9d3e8f xen/arch/powerpc/shadow.c
--- a/xen/arch/powerpc/shadow.c Mon Aug 28 18:35:29 2006 -0500
+++ b/xen/arch/powerpc/shadow.c Tue Aug 29 16:44:42 2006 +1000
@@ -79,7 +79,6 @@ unsigned int shadow_set_allocation(struc
                                     unsigned int megabytes,
                                     int *preempted)
 {
-    unsigned int rc;
     uint pages;
     uint p;
     uint order;
@@ -113,7 +112,7 @@ unsigned int shadow_set_allocation(struc
     for (p = 0; p < (1 << order); p++)
         clear_page((void *)(addr + (p << PAGE_SHIFT)));
 
-    return rc;
+    return 0;
 }
 
 int shadow_control_op(struct domain *d, 



Yours Tony

   linux.conf.au       http://linux.conf.au/ || http://lca2007.linux.org.au/
   Jan 15-20 2007      The Australian Linux Technical Conference!


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>