summaryrefslogtreecommitdiff
path: root/mm/zsmalloc.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2019-03-28 10:47:24 -0300
committerGitHub <noreply@github.com>2019-03-28 10:47:24 -0300
commit0a8ab17689e628c84a666195bfc6ab85d11cf057 (patch)
tree01630dc4a6935df99bf7d11d34ff8d384fed86e2 /mm/zsmalloc.c
parent1e71d8c630cbc0d1f5d762fd019690b5cdb880ae (diff)
parent32aca03c2ce868d3412da0bb6ce6798c7bea357e (diff)
Merge pull request #46 from toradex/4.9-2.3.x-imx
4.9 2.3.x imx
Diffstat (limited to 'mm/zsmalloc.c')
-rw-r--r--mm/zsmalloc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index d3548c48369f..cf15851a7d2f 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -473,7 +473,7 @@ static bool is_zspage_isolated(struct zspage *zspage)
return zspage->isolated;
}
-static int is_first_page(struct page *page)
+static __maybe_unused int is_first_page(struct page *page)
{
return PagePrivate(page);
}
@@ -558,20 +558,23 @@ static int get_size_class_index(int size)
return min(zs_size_classes - 1, idx);
}
+/* type can be of enum type zs_stat_type or fullness_group */
static inline void zs_stat_inc(struct size_class *class,
- enum zs_stat_type type, unsigned long cnt)
+ int type, unsigned long cnt)
{
class->stats.objs[type] += cnt;
}
+/* type can be of enum type zs_stat_type or fullness_group */
static inline void zs_stat_dec(struct size_class *class,
- enum zs_stat_type type, unsigned long cnt)
+ int type, unsigned long cnt)
{
class->stats.objs[type] -= cnt;
}
+/* type can be of enum type zs_stat_type or fullness_group */
static inline unsigned long zs_stat_get(struct size_class *class,
- enum zs_stat_type type)
+ int type)
{
return class->stats.objs[type];
}