mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bob Liu <lliubbo@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org, konrad.wilk@oracle.com,
	JBeulich@suse.com, ian.campbell@citrix.com, keir@xen.org,
	Bob Liu <bob.liu@oracle.com>
Subject: [PATCH] xen: tmem: rmove useless parameters
Date: Wed, 20 Nov 2013 16:52:55 +0800	[thread overview]
Message-ID: <1384937575-25168-1-git-send-email-bob.liu@oracle.com> (raw)

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@oracle.com>
---
 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


             reply	other threads:[~2013-11-20  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  8:52 Bob Liu [this message]
2013-11-20  9:10 ` Jan Beulich
2013-11-20  9:22   ` Bob Liu
2013-11-20  9:26     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384937575-25168-1-git-send-email-bob.liu@oracle.com \
    --to=lliubbo@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=bob.liu@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®