All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-zsmalloc-change-stat-type-parameter-to-int.patch added to -mm tree
@ 2017-08-25 21:46 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-08-25 21:46 UTC (permalink / raw)
  To: mka, dianders, minchan, sergey.senozhatsky, mm-commits


The patch titled
     Subject: mm/zsmalloc.c: change stat type parameter to int
has been added to the -mm tree.  Its filename is
     mm-zsmalloc-change-stat-type-parameter-to-int.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-zsmalloc-change-stat-type-parameter-to-int.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-zsmalloc-change-stat-type-parameter-to-int.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Matthias Kaehlcke <mka@chromium.org>
Subject: 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 <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>
---

 mm/zsmalloc.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff -puN mm/zsmalloc.c~mm-zsmalloc-change-stat-type-parameter-to-int mm/zsmalloc.c
--- a/mm/zsmalloc.c~mm-zsmalloc-change-stat-type-parameter-to-int
+++ a/mm/zsmalloc.c
@@ -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];
 }
_

Patches currently in -mm which might be from mka@chromium.org are

mm-memcontrol-use-int-for-event-state-parameter-in-several-functions.patch
mm-memcontrol-use-int-for-event-state-parameter-in-several-functions-v2.patch
mm-zsmalloc-change-stat-type-parameter-to-int.patch
bitops-avoid-integer-overflow-in-genmask_ull.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-25 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 21:46 + mm-zsmalloc-change-stat-type-parameter-to-int.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.