mm/zsmalloc: Change stat type parameter to int
Subsystems (2)
PATCH 1/1 mm/zsmalloc: 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
--- mm/zsmalloc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
mm/zsmalloc.c +6 -3
@@ -551,20 +551,23 @@ static int get_size_class_index(int size)return min_t (int,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]; }
Signature · 7 lines
2.14.0.rc0.400.g1c36432dff-goog -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Matthias Kaehlcke
zs_stat_inc/dec/get() uses enum
zs_stat_typefor the stat type, however some callers pass an enumfullness_groupvalue. Change the type to int to reflect the actual use of the functions and get rid of 'enum-conversion' warnings
Maybe clang?
Quoted 2 lines
Signed-off-by Matthias Kaehlcke <[email protected]>
Anyway,
Thanks!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Matthias Kaehlcke
zs_stat_inc/dec/get() uses enum
zs_stat_typefor the stat type, however some callers pass an enumfullness_groupvalue. Change the type to int to reflect the actual use of the functions and get rid of 'enum-conversion' warningsSigned-off-by Matthias Kaehlcke <[email protected]>
-ss
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
El Tue, Aug 01, 2017 at 04:30:14PM +0900 Sergey Senozhatsky ha dit:
Quoted 9 lines · Matthias Kaehlcke
Quoted 6 lines
zs_stat_inc/dec/get() uses enum
zs_stat_typefor the stat type, however some callers pass an enumfullness_groupvalue. Change the type to int to reflect the actual use of the functions and get rid of 'enum-conversion' warningsSigned-off-by Matthias Kaehlcke <[email protected]>Reviewed-by Sergey Senozhatsky <[email protected]>
Ping, it seems this one went under Andrew's radar. Mea culpa for not putting him in cc: in the first place.
Thanks
Matthias
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>