diff options
author | Matthias Kaehlcke <mka@chromium.org> | 2017-09-08 16:13:02 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-27 10:07:02 +0100 |
commit | d069e8ca02afdb5ca9e2b60a580e521e73493291 (patch) | |
tree | ac48a811107492921d4fe4ff62cb6516e67bb41f /mm | |
parent | 411b7ca7f67a373b8001496f022cf1f12cd750a1 (diff) | |
download | linux-stable-d069e8ca02afdb5ca9e2b60a580e521e73493291.tar.gz linux-stable-d069e8ca02afdb5ca9e2b60a580e521e73493291.tar.bz2 linux-stable-d069e8ca02afdb5ca9e2b60a580e521e73493291.zip |
mm/zsmalloc.c: change stat type parameter to int
commit 3eb95feac113d8ebad5b7b5189a65efcbd95a749 upstream.
zs_stat_inc/dec/get() uses enum zs_stat_type for the stat type, however
some callers pass an enum fullness_group value. Change the type to int to
reflect the actual use of the functions and get rid of 'enum-conversion'
warnings
Link: http://lkml.kernel.org/r/20170731175000.56538-1-mka@chromium.org
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Doug Anderson <dianders@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/zsmalloc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index d3548c48369f..3d675c5d92f1 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -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]; } |