From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Liu Subject: [PATCH v3 03/15] tmem: cleanup: drop useless function 'tmem_copy_page' Date: Wed, 11 Dec 2013 16:50:32 +0800 Message-ID: <1386751844-32387-4-git-send-email-bob.liu@oracle.com> References: <1386751844-32387-1-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 1VqfWL-0007K6-U4 for xen-devel@lists.xenproject.org; Wed, 11 Dec 2013 08:51:54 +0000 Received: by mail-pb0-f53.google.com with SMTP id ma3so9471609pbc.26 for ; Wed, 11 Dec 2013 00:51:50 -0800 (PST) In-Reply-To: <1386751844-32387-1-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: xen-devel@lists.xenproject.org Cc: james.harper@bendigoit.com.au, ian.campbell@citrix.com, andrew.cooper3@citrix.com, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org Use memcpy directly. Signed-off-by: Bob Liu --- xen/common/tmem_xen.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c index 1e002ae..af67703 100644 --- a/xen/common/tmem_xen.c +++ b/xen/common/tmem_xen.c @@ -44,11 +44,6 @@ static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, workmem); static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, dstmem); static DEFINE_PER_CPU_READ_MOSTLY(void *, scratch_page); -void tmem_copy_page(char *to, char*from) -{ - memcpy(to, from, PAGE_SIZE); -} - #if defined(CONFIG_ARM) static inline void *cli_get_page(xen_pfn_t cmfn, unsigned long *pcli_mfn, struct page_info **pcli_pfp, bool_t cli_write) @@ -135,7 +130,7 @@ EXPORT int tmem_copy_from_client(struct page_info *pfp, } smp_mb(); if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va ) - tmem_copy_page(tmem_va, cli_va); + memcpy(tmem_va, cli_va, PAGE_SIZE); else if ( (tmem_offset+len <= PAGE_SIZE) && (pfn_offset+len <= PAGE_SIZE) ) { @@ -206,7 +201,7 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp, tmem_mfn = page_to_mfn(pfp); tmem_va = map_domain_page(tmem_mfn); if ( len == PAGE_SIZE && !tmem_offset && !pfn_offset && cli_va ) - tmem_copy_page(cli_va, tmem_va); + memcpy(cli_va, tmem_va, PAGE_SIZE); else if ( (tmem_offset+len <= PAGE_SIZE) && (pfn_offset+len <= PAGE_SIZE) ) { if ( cli_va ) -- 1.7.10.4