From: Matthias Kaehlcke Date: Fri, 8 Sep 2017 23:13:02 +0000 (-0700) Subject: UPSTREAM: mm/zsmalloc.c: change stat type parameter to int X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd4bae3c13ee87e07dbe8b0388841304c1fed290;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git UPSTREAM: 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 Link: http://lkml.kernel.org/r/20170731175000.56538-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Doug Anderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds (cherry picked from commit 3eb95feac113d8ebad5b7b5189a65efcbd95a749) Signed-off-by: Nathan Chancellor --- diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index a9d802b3b289..a5ad4dab4ab8 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -576,20 +576,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]; }