aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-25 12:28:56 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-25 12:28:56 +0200
commit1eee390a34219eb5a402696ea6b79ce41122c283 (patch)
tree04197e887660eb8a8ec75a19a1fec758d7c7b160
parent4fced9a7e7154e35dca3efbbee823b7c6c9e2608 (diff)
downloadxen-1eee390a34219eb5a402696ea6b79ce41122c283.tar.gz
xen-1eee390a34219eb5a402696ea6b79ce41122c283.tar.bz2
xen-1eee390a34219eb5a402696ea6b79ce41122c283.zip
tmem: cleanup
- one more case of checking for a specific rather than any error - drop redundant casts Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> xen-unstable changeset: 25860:e4cb84111610 xen-unstable date: Tue Sep 11 12:19:29 UTC 2012
-rw-r--r--xen/common/tmem.c2
-rw-r--r--xen/common/tmem_xen.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 8834e214e0..f442e777b4 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1471,7 +1471,7 @@ static NOINLINE int do_tmem_put_compress(pgp_t *pgp, tmem_cli_mfn_t cmfn,
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 --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
index d549839cd6..fbbf488046 100644
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -121,7 +121,7 @@ static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn,
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 *cli_va, pfp_t *cli_pfp,
{
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