From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 03/16] tmem: cleanup: rm unused tmem_op Date: Fri, 22 Nov 2013 12:38:42 -0500 Message-ID: <20131122173842.GA8120@phenom.dumpdata.com> References: <1384937185-24749-1-git-send-email-bob.liu@oracle.com> <1384937185-24749-3-git-send-email-bob.liu@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vjugt-0003ow-4l for xen-devel@lists.xenproject.org; Fri, 22 Nov 2013 17:38:51 +0000 Content-Disposition: inline In-Reply-To: <1384937185-24749-3-git-send-email-bob.liu@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Bob Liu Cc: xen-devel@lists.xenproject.org, keir@xen.org, ian.campbell@citrix.com, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On Wed, Nov 20, 2013 at 04:46:12PM +0800, Bob Liu wrote: > TMEM_READ/TMEM_WRITE/TMEM_XCHG/TMEM_NEW_PAGE are never be used. You also need to delete them in include/public/tmem.h and rev up the TMEM_SPEC_VERSION I think? > > Signed-off-by: Bob Liu > --- > xen/common/tmem.c | 21 --------------------- > 1 file changed, 21 deletions(-) > > diff --git a/xen/common/tmem.c b/xen/common/tmem.c > index 081772e..c272930 100644 > --- a/xen/common/tmem.c > +++ b/xen/common/tmem.c > @@ -2646,11 +2646,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops) > rc = do_tmem_new_pool(TMEM_CLI_ID_NULL, 0, op.u.creat.flags, > op.u.creat.uuid[0], op.u.creat.uuid[1]); > break; > - case TMEM_NEW_PAGE: > - tmem_ensure_avail_pages(); > - rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn, 0, 0, 0, > - tmem_cli_buf_null); > - break; > case TMEM_PUT_PAGE: > tmem_ensure_avail_pages(); > rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn, 0, 0, > @@ -2676,22 +2671,6 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops) > flush = 1; > rc = do_tmem_destroy_pool(op.pool_id); > break; > - case TMEM_READ: > - rc = do_tmem_get(pool, oidp, op.u.gen.index, op.u.gen.cmfn, > - op.u.gen.tmem_offset, op.u.gen.pfn_offset, > - op.u.gen.len, tmem_cli_buf_null); > - break; > - case TMEM_WRITE: > - rc = do_tmem_put(pool, oidp, > - op.u.gen.index, op.u.gen.cmfn, > - op.u.gen.tmem_offset, op.u.gen.pfn_offset, > - op.u.gen.len, tmem_cli_buf_null); > - break; > - case TMEM_XCHG: > - /* need to hold global lock to ensure xchg is atomic */ > - tmem_client_warn("tmem_xchg op not implemented yet\n"); > - rc = 0; > - break; Hm, they end up at the default which has 'rc=0'. That is incorrect. It should actually be -ENOSYS. > default: > tmem_client_warn("tmem: op %d not implemented\n", op.cmd); > rc = 0; > -- > 1.7.10.4 >