Skip to content

Commit

Permalink
mm/zswap: add __init to some functions in zswap
Browse files Browse the repository at this point in the history
zswap_cpu_init/zswap_comp_exit/zswap_entry_cache_create is only called by
__init init_zswap()

Signed-off-by: Mahendran Ganesh <[email protected]>
Cc: Seth Jennings <[email protected]>
Cc: Dan Streetman <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
yzkqfll authored and torvalds committed Dec 13, 2014
1 parent 083914e commit dd01d7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm/zswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static int __init zswap_comp_init(void)
return 0;
}

static void zswap_comp_exit(void)
static void __init zswap_comp_exit(void)
{
/* free percpu transforms */
if (zswap_comp_pcpu_tfms)
Expand Down Expand Up @@ -206,7 +206,7 @@ static struct zswap_tree *zswap_trees[MAX_SWAPFILES];
**********************************/
static struct kmem_cache *zswap_entry_cache;

static int zswap_entry_cache_create(void)
static int __init zswap_entry_cache_create(void)
{
zswap_entry_cache = KMEM_CACHE(zswap_entry, 0);
return zswap_entry_cache == NULL;
Expand Down Expand Up @@ -389,7 +389,7 @@ static struct notifier_block zswap_cpu_notifier_block = {
.notifier_call = zswap_cpu_notifier
};

static int zswap_cpu_init(void)
static int __init zswap_cpu_init(void)
{
unsigned long cpu;

Expand Down

0 comments on commit dd01d7d

Please sign in to comment.