diff options
| author | Matthias Kaehlcke <mka@chromium.org> | 2017-09-08 16:13:02 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-04-28 04:27:48 -0700 |
| commit | b14db0c95e0d396fc3dfb5a30b6cbdec982fb3b2 (patch) | |
| tree | b4dfca9b9f766ea7498694b10146c8dcbab0a364 | |
| parent | 7203b36f3946f1109a5376dbbd196736d57ea5f5 (diff) | |
mm/zsmalloc.c: change stat type parameter to int
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
Change-Id: I15afde493223afdfeb4d007dfa3359a34f6d1df7
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>
Git-Commit: 3eb95feac113d8ebad5b7b5189a65efcbd95a749
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
| -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 80ec65692524..3f1b584bd5d0 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -564,20 +564,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]; } |
