[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] tmem: cleanup


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Wed, 26 Sep 2012 02:55:14 +0000
  • Delivery-date: Wed, 26 Sep 2012 02:55:22 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1348568936 -7200
# Node ID 0c3286621912623e8fa78b6d27f4f2680662f2ac
# Parent  00ff640ebc7bd22b67b4c69f51dd44954c78dca8
tmem: cleanup

- one more case of checking for a specific rather than any error
- drop redundant casts

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
xen-unstable changeset: 25860:e4cb84111610
xen-unstable date: Tue Sep 11 12:19:29 UTC 2012
---


diff -r 00ff640ebc7b -r 0c3286621912 xen/common/tmem.c
--- a/xen/common/tmem.c Tue Sep 25 12:28:24 2012 +0200
+++ b/xen/common/tmem.c Tue Sep 25 12:28:56 2012 +0200
@@ -1471,7 +1471,7 @@ static NOINLINE int do_tmem_put_compress
         pgp_free_data(pgp, pgp->us.obj->pool);
     START_CYC_COUNTER(compress);
     ret = tmh_compress_from_client(cmfn, &dst, &size, clibuf);
-    if ( (ret == -EFAULT) || (ret == 0) )
+    if ( ret <= 0 )
         goto out;
     else if ( (size == 0) || (size >= tmem_subpage_maxsize()) ) {
         ret = 0;
diff -r 00ff640ebc7b -r 0c3286621912 xen/common/tmem_xen.c
--- a/xen/common/tmem_xen.c     Tue Sep 25 12:28:24 2012 +0200
+++ b/xen/common/tmem_xen.c     Tue Sep 25 12:28:56 2012 +0200
@@ -121,7 +121,7 @@ static inline void *cli_get_page(tmem_cl
     if ( !ret )
         return NULL;
     *pcli_mfn = cli_mfn;
-    *pcli_pfp = (pfp_t *)page;
+    *pcli_pfp = page;
     return map_domain_page(cli_mfn);
 }
 
@@ -130,11 +130,11 @@ static inline void cli_put_page(void *cl
 {
     if ( mark_dirty )
     {
-        put_page_and_type((struct page_info *)cli_pfp);
+        put_page_and_type(cli_pfp);
         paging_mark_dirty(current->domain,cli_mfn);
     }
     else
-        put_page((struct page_info *)cli_pfp);
+        put_page(cli_pfp);
     unmap_domain_page(cli_va);
 }
 #endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.