All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Bob Liu <lliubbo@gmail.com>
Cc: xen-devel@lists.xenproject.org, keir@xen.org,
	ian.campbell@citrix.com, JBeulich@suse.com
Subject: Re: [PATCH 08/16] tmem: cleanup: rm useless EXPORT/FORWARD define
Date: Fri, 22 Nov 2013 13:05:59 -0500	[thread overview]
Message-ID: <20131122180559.GE8120@phenom.dumpdata.com> (raw)
In-Reply-To: <1384937185-24749-8-git-send-email-bob.liu@oracle.com>

On Wed, Nov 20, 2013 at 04:46:17PM +0800, Bob Liu wrote:
> It's meanless to define EXPORT/FORWARD and nobody use them.
       ^^^^^^^^ meaningless

> 
> Signed-off-by: Bob Liu <bob.liu@oracle.com>
> ---
>  xen/common/tmem.c     |   16 ++++++----------
>  xen/common/tmem_xen.c |   38 ++++++++++++++++++--------------------
>  2 files changed, 24 insertions(+), 30 deletions(-)
> 
> diff --git a/xen/common/tmem.c b/xen/common/tmem.c
> index f37e054..6afbdbc 100644
> --- a/xen/common/tmem.c
> +++ b/xen/common/tmem.c
> @@ -24,9 +24,6 @@
>  #include <xen/list.h>
>  #include <xen/init.h>
>  
> -#define EXPORT /* indicates code other modules are dependent upon */
> -#define FORWARD
> -
>  #define TMEM_SPEC_VERSION 1
>  
>  /* global statistics (none need to be locked) */
> @@ -212,8 +209,8 @@ static int tmem_initialized = 0;
>  
>  /************ CONCURRENCY  ***********************************************/
>  
> -EXPORT DEFINE_SPINLOCK(tmem_spinlock);  /* used iff tmem_lock_all */
> -EXPORT DEFINE_RWLOCK(tmem_rwlock);      /* used iff !tmem_lock_all */
> +DEFINE_SPINLOCK(tmem_spinlock);  /* used iff tmem_lock_all */
> +DEFINE_RWLOCK(tmem_rwlock);      /* used iff !tmem_lock_all */
>  static DEFINE_SPINLOCK(eph_lists_spinlock); /* protects global AND clients */
>  static DEFINE_SPINLOCK(pers_lists_spinlock);
>  
> @@ -2538,7 +2535,7 @@ static int do_tmem_control(struct tmem_op *op)
>  
>  /************ EXPORTed FUNCTIONS **************************************/
>  
> -EXPORT long do_tmem_op(tmem_cli_op_t uops)
> +long do_tmem_op(tmem_cli_op_t uops)
>  {
>      struct tmem_op op;
>      struct client *client = tmem_client_from_current();
> @@ -2703,7 +2700,7 @@ out:
>  }
>  
>  /* this should be called when the host is destroying a client */
> -EXPORT void tmem_destroy(void *v)
> +void tmem_destroy(void *v)
>  {
>      struct client *client = (struct client *)v;
>  
> @@ -2732,7 +2729,7 @@ EXPORT void tmem_destroy(void *v)
>  }
>  
>  /* freezing all pools guarantees that no additional memory will be consumed */
> -EXPORT void tmem_freeze_all(unsigned char key)
> +void tmem_freeze_all(unsigned char key)
>  {
>      static int freeze = 0;
>   
> @@ -2751,8 +2748,7 @@ EXPORT void tmem_freeze_all(unsigned char key)
>  }
>  
>  #define MAX_EVICTS 10  /* should be variable or set via TMEMC_ ?? */
> -
> -EXPORT void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
> +void *tmem_relinquish_pages(unsigned int order, unsigned int memflags)
>  {
>      struct page_info *pfp;
>      unsigned long evicts_per_relinq = 0;
> diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c
> index efc2259..fbd1acc 100644
> --- a/xen/common/tmem_xen.c
> +++ b/xen/common/tmem_xen.c
> @@ -14,27 +14,25 @@
>  #include <xen/cpu.h>
>  #include <xen/init.h>
>  
> -#define EXPORT /* indicates code other modules are dependent upon */
> -
> -EXPORT bool_t __read_mostly opt_tmem = 0;
> +bool_t __read_mostly opt_tmem = 0;
>  boolean_param("tmem", opt_tmem);
>  
> -EXPORT bool_t __read_mostly opt_tmem_compress = 0;
> +bool_t __read_mostly opt_tmem_compress = 0;
>  boolean_param("tmem_compress", opt_tmem_compress);
>  
> -EXPORT bool_t __read_mostly opt_tmem_dedup = 0;
> +bool_t __read_mostly opt_tmem_dedup = 0;
>  boolean_param("tmem_dedup", opt_tmem_dedup);
>  
> -EXPORT bool_t __read_mostly opt_tmem_tze = 0;
> +bool_t __read_mostly opt_tmem_tze = 0;
>  boolean_param("tmem_tze", opt_tmem_tze);
>  
> -EXPORT bool_t __read_mostly opt_tmem_shared_auth = 0;
> +bool_t __read_mostly opt_tmem_shared_auth = 0;
>  boolean_param("tmem_shared_auth", opt_tmem_shared_auth);
>  
> -EXPORT int __read_mostly opt_tmem_lock = 0;
> +int __read_mostly opt_tmem_lock = 0;
>  integer_param("tmem_lock", opt_tmem_lock);
>  
> -EXPORT atomic_t freeable_page_count = ATOMIC_INIT(0);
> +atomic_t freeable_page_count = ATOMIC_INIT(0);
>  
>  /* these are a concurrency bottleneck, could be percpu and dynamically
>   * allocated iff opt_tmem_compress */
> @@ -99,7 +97,7 @@ static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
>  }
>  #endif
>  
> -EXPORT int tmem_copy_from_client(struct page_info *pfp,
> +int tmem_copy_from_client(struct page_info *pfp,
>      xen_pfn_t cmfn, tmem_cli_va_param_t clibuf)
>  {
>      unsigned long tmem_mfn, cli_mfn = 0;
> @@ -131,7 +129,7 @@ EXPORT int tmem_copy_from_client(struct page_info *pfp,
>      return rc;
>  }
>  
> -EXPORT int tmem_compress_from_client(xen_pfn_t cmfn,
> +int tmem_compress_from_client(xen_pfn_t cmfn,
>      void **out_va, size_t *out_len, tmem_cli_va_param_t clibuf)
>  {
>      int ret = 0;
> @@ -163,7 +161,7 @@ EXPORT int tmem_compress_from_client(xen_pfn_t cmfn,
>      return 1;
>  }
>  
> -EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
> +int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
>      tmem_cli_va_param_t clibuf)
>  {
>      unsigned long tmem_mfn, cli_mfn = 0;
> @@ -192,7 +190,7 @@ EXPORT int tmem_copy_to_client(xen_pfn_t cmfn, struct page_info *pfp,
>      return rc;
>  }
>  
> -EXPORT int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
> +int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
>                                      size_t size, tmem_cli_va_param_t clibuf)
>  {
>      unsigned long cli_mfn = 0;
> @@ -221,7 +219,7 @@ EXPORT int tmem_decompress_to_client(xen_pfn_t cmfn, void *tmem_va,
>      return 1;
>  }
>  
> -EXPORT int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
> +int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
>                                      pagesize_t len)
>  {
>      void *cli_va;
> @@ -245,12 +243,12 @@ EXPORT int tmem_copy_tze_to_client(xen_pfn_t cmfn, void *tmem_va,
>  
>  /******************  XEN-SPECIFIC MEMORY ALLOCATION ********************/
>  
> -EXPORT struct xmem_pool *tmem_mempool = 0;
> -EXPORT unsigned int tmem_mempool_maxalloc = 0;
> +struct xmem_pool *tmem_mempool = 0;
> +unsigned int tmem_mempool_maxalloc = 0;
>  
> -EXPORT DEFINE_SPINLOCK(tmem_page_list_lock);
> -EXPORT PAGE_LIST_HEAD(tmem_page_list);
> -EXPORT unsigned long tmem_page_list_pages = 0;
> +DEFINE_SPINLOCK(tmem_page_list_lock);
> +PAGE_LIST_HEAD(tmem_page_list);
> +unsigned long tmem_page_list_pages = 0;
>  
>  static noinline void *tmem_mempool_page_get(unsigned long size)
>  {
> @@ -352,7 +350,7 @@ static struct notifier_block cpu_nfb = {
>      .notifier_call = cpu_callback
>  };
>  
> -EXPORT int __init tmem_init(void)
> +int __init tmem_init(void)
>  {
>      unsigned int cpu;
>  
> -- 
> 1.7.10.4
> 

  reply	other threads:[~2013-11-22 18:06 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  8:46 [PATCH 01/16] tmem: cleanup: drop some debug code Bob Liu
2013-11-20  8:46 ` [PATCH 02/16] tmem: cleanup: drop useless function 'tmem_copy_page' Bob Liu
2013-11-20  8:46 ` [PATCH 03/16] tmem: cleanup: rm unused tmem_op Bob Liu
2013-11-22 17:38   ` Konrad Rzeszutek Wilk
2013-11-25  9:43     ` Jan Beulich
2013-11-25  9:52       ` Ian Campbell
2013-11-25  9:58         ` Jan Beulich
2013-11-25 16:37         ` Konrad Rzeszutek Wilk
2013-11-25 16:40           ` Ian Campbell
2013-11-25 17:09             ` Konrad Rzeszutek Wilk
2013-11-25 17:12               ` Ian Campbell
2013-11-25 19:56                 ` Konrad Rzeszutek Wilk
2013-11-26  8:56                   ` Bob Liu
2013-11-20  8:46 ` [PATCH 04/16] tmem: cleanup: rm unneeded parameters from put path Bob Liu
2013-11-22 17:54   ` Konrad Rzeszutek Wilk
2013-11-26  8:22     ` Bob Liu
2013-11-20  8:46 ` [PATCH 05/16] tmem: cleanup: rm unneeded parameters from get path Bob Liu
2013-11-22 17:55   ` Konrad Rzeszutek Wilk
2013-11-20  8:46 ` [PATCH 06/16] tmem: cleanup: reorg do_tmem_put() Bob Liu
2013-11-22 18:04   ` Konrad Rzeszutek Wilk
2013-11-20  8:46 ` [PATCH 07/16] tmem: drop unneeded is_ephemeral() and is_private() Bob Liu
2013-11-20  8:46 ` [PATCH 08/16] tmem: cleanup: rm useless EXPORT/FORWARD define Bob Liu
2013-11-22 18:05   ` Konrad Rzeszutek Wilk [this message]
2013-11-20  8:46 ` [PATCH 09/16] tmem: cleanup: drop tmemc_list() temporary Bob Liu
2013-11-22 18:07   ` Konrad Rzeszutek Wilk
2013-11-26  8:28     ` Bob Liu
2013-11-22 21:00   ` Konrad Rzeszutek Wilk
2013-11-20  8:46 ` [PATCH 10/16] tmem: cleanup: drop runtime statistics Bob Liu
2013-11-22 18:08   ` Konrad Rzeszutek Wilk
2013-11-20  8:46 ` [PATCH 11/16] tmem: cleanup: drop tmem_lock_all Bob Liu
2013-11-20  8:46 ` [PATCH 12/16] tmem: cleanup: refactor the alloc/free path Bob Liu
2013-11-20  8:46 ` [PATCH 13/16] tmem: cleanup: __tmem_alloc_page: drop unneed parameters Bob Liu
2013-11-22 18:17   ` Konrad Rzeszutek Wilk
2013-11-26  8:41     ` Bob Liu
2013-11-26 17:38       ` Konrad Rzeszutek Wilk
2013-11-20  8:46 ` [PATCH 14/16] tmem: cleanup: drop useless functions from head file Bob Liu
2013-11-27 14:38   ` Andrew Cooper
2013-11-27 14:52     ` Konrad Rzeszutek Wilk
2013-11-27 14:59       ` Andrew Cooper
2013-11-27 15:55         ` Jan Beulich
2013-11-20  8:46 ` [PATCH 15/16] tmem: refator function tmem_ensure_avail_pages() Bob Liu
2013-11-22 18:22   ` Konrad Rzeszutek Wilk
2013-11-20  8:46 ` [PATCH 16/16] tmem: cleanup: rename tmem_relinquish_npages() Bob Liu
2013-11-20  9:08 ` [PATCH 01/16] tmem: cleanup: drop some debug code Jan Beulich
2013-11-20  9:19   ` Bob Liu
2013-11-20  9:25     ` Jan Beulich
2013-11-20 13:51       ` Konrad Rzeszutek Wilk
2013-11-20 14:21         ` Jan Beulich
2013-11-20 18:46           ` Konrad Rzeszutek Wilk

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=20131122180559.GE8120@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=lliubbo@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.