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

[Xen-devel] [PATCH] xen: tmem: rmove useless parameters



tmem only takes a page as unit, so parameters tmem_offset, pfn_offset and len
are meanless, this patch remove those always 0 parameters.

Signed-off-by: Bob Liu <bob.liu@xxxxxxxxxx>
---
 drivers/xen/tmem.c |   18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c
index 83b5c53..9fd0fdc 100644
--- a/drivers/xen/tmem.c
+++ b/drivers/xen/tmem.c
@@ -89,7 +89,7 @@ struct tmem_oid {
 /* xen tmem foundation ops/hypercalls */
 
 static inline int xen_tmem_op(u32 tmem_cmd, u32 tmem_pool, struct tmem_oid oid,
-       u32 index, unsigned long gmfn, u32 tmem_offset, u32 pfn_offset, u32 len)
+               u32 index, unsigned long gmfn)
 {
        struct tmem_op op;
        int rc = 0;
@@ -100,9 +100,6 @@ static inline int xen_tmem_op(u32 tmem_cmd, u32 tmem_pool, 
struct tmem_oid oid,
        op.u.gen.oid[1] = oid.oid[1];
        op.u.gen.oid[2] = oid.oid[2];
        op.u.gen.index = index;
-       op.u.gen.tmem_offset = tmem_offset;
-       op.u.gen.pfn_offset = pfn_offset;
-       op.u.gen.len = len;
        set_xen_guest_handle(op.u.gen.gmfn, (void *)gmfn);
        rc = HYPERVISOR_tmem_op(&op);
        return rc;
@@ -133,8 +130,7 @@ static int xen_tmem_put_page(u32 pool_id, struct tmem_oid 
oid,
 {
        unsigned long gmfn = xen_pv_domain() ? pfn_to_mfn(pfn) : pfn;
 
-       return xen_tmem_op(TMEM_PUT_PAGE, pool_id, oid, index,
-               gmfn, 0, 0, 0);
+       return xen_tmem_op(TMEM_PUT_PAGE, pool_id, oid, index, gmfn);
 }
 
 static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
@@ -142,19 +138,17 @@ static int xen_tmem_get_page(u32 pool_id, struct tmem_oid 
oid,
 {
        unsigned long gmfn = xen_pv_domain() ? pfn_to_mfn(pfn) : pfn;
 
-       return xen_tmem_op(TMEM_GET_PAGE, pool_id, oid, index,
-               gmfn, 0, 0, 0);
+       return xen_tmem_op(TMEM_GET_PAGE, pool_id, oid, index, gmfn);
 }
 
 static int xen_tmem_flush_page(u32 pool_id, struct tmem_oid oid, u32 index)
 {
-       return xen_tmem_op(TMEM_FLUSH_PAGE, pool_id, oid, index,
-               0, 0, 0, 0);
+       return xen_tmem_op(TMEM_FLUSH_PAGE, pool_id, oid, index, 0);
 }
 
 static int xen_tmem_flush_object(u32 pool_id, struct tmem_oid oid)
 {
-       return xen_tmem_op(TMEM_FLUSH_OBJECT, pool_id, oid, 0, 0, 0, 0, 0);
+       return xen_tmem_op(TMEM_FLUSH_OBJECT, pool_id, oid, 0, 0);
 }
 
 
@@ -163,7 +157,7 @@ static int xen_tmem_destroy_pool(u32 pool_id)
 {
        struct tmem_oid oid = { { 0 } };
 
-       return xen_tmem_op(TMEM_DESTROY_POOL, pool_id, oid, 0, 0, 0, 0, 0);
+       return xen_tmem_op(TMEM_DESTROY_POOL, pool_id, oid, 0, 0);
 }
 
 /* cleancache ops */
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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