* [PATCH] mm/zsmalloc: Change stat type parameter to int
@ 2017-07-31 17:50 ` Matthias Kaehlcke
0 siblings, 0 replies; 8+ messages in thread
From: Matthias Kaehlcke @ 2017-07-31 17:50 UTC (permalink / raw)
To: Minchan Kim, Nitin Gupta, Sergey Senozhatsky
Cc: linux-kernel, linux-mm, Doug Anderson, Matthias Kaehlcke
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
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
mm/zsmalloc.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 013eea76685e..8daf56b73024 100644
--- a/mm/zsmalloc.c
+++ b/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];
}
--
2.14.0.rc0.400.g1c36432dff-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] mm/zsmalloc: Change stat type parameter to int
@ 2017-07-31 17:50 ` Matthias Kaehlcke
0 siblings, 0 replies; 8+ messages in thread
From: Matthias Kaehlcke @ 2017-07-31 17:50 UTC (permalink / raw)
To: Minchan Kim, Nitin Gupta, Sergey Senozhatsky
Cc: linux-kernel, linux-mm, Doug Anderson, Matthias Kaehlcke
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
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
mm/zsmalloc.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 013eea76685e..8daf56b73024 100644
--- a/mm/zsmalloc.c
+++ b/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];
}
--
2.14.0.rc0.400.g1c36432dff-goog
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] mm/zsmalloc: Change stat type parameter to int
2017-07-31 17:50 ` Matthias Kaehlcke
@ 2017-08-01 6:54 ` Minchan Kim
-1 siblings, 0 replies; 8+ messages in thread
From: Minchan Kim @ 2017-08-01 6:54 UTC (permalink / raw)
To: Matthias Kaehlcke
Cc: Nitin Gupta, Sergey Senozhatsky, linux-kernel, linux-mm, Doug Anderson
On Mon, Jul 31, 2017 at 10:50:00AM -0700, Matthias Kaehlcke wrote:
> 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
Maybe clang?
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Anyway,
Acked-by: Minchan Kim <minchan@kernel.org>
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm/zsmalloc: Change stat type parameter to int
@ 2017-08-01 6:54 ` Minchan Kim
0 siblings, 0 replies; 8+ messages in thread
From: Minchan Kim @ 2017-08-01 6:54 UTC (permalink / raw)
To: Matthias Kaehlcke
Cc: Nitin Gupta, Sergey Senozhatsky, linux-kernel, linux-mm, Doug Anderson
On Mon, Jul 31, 2017 at 10:50:00AM -0700, Matthias Kaehlcke wrote:
> 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
Maybe clang?
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Anyway,
Acked-by: Minchan Kim <minchan@kernel.org>
Thanks!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm/zsmalloc: Change stat type parameter to int
2017-07-31 17:50 ` Matthias Kaehlcke
@ 2017-08-01 7:30 ` Sergey Senozhatsky
-1 siblings, 0 replies; 8+ messages in thread
From: Sergey Senozhatsky @ 2017-08-01 7:30 UTC (permalink / raw)
To: Matthias Kaehlcke
Cc: Minchan Kim, Nitin Gupta, Sergey Senozhatsky, linux-kernel,
linux-mm, Doug Anderson
On (07/31/17 10:50), Matthias Kaehlcke wrote:
> 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
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
-ss
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm/zsmalloc: Change stat type parameter to int
@ 2017-08-01 7:30 ` Sergey Senozhatsky
0 siblings, 0 replies; 8+ messages in thread
From: Sergey Senozhatsky @ 2017-08-01 7:30 UTC (permalink / raw)
To: Matthias Kaehlcke
Cc: Minchan Kim, Nitin Gupta, Sergey Senozhatsky, linux-kernel,
linux-mm, Doug Anderson
On (07/31/17 10:50), Matthias Kaehlcke wrote:
> 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
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
-ss
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm/zsmalloc: Change stat type parameter to int
2017-08-01 7:30 ` Sergey Senozhatsky
@ 2017-08-23 23:31 ` Matthias Kaehlcke
-1 siblings, 0 replies; 8+ messages in thread
From: Matthias Kaehlcke @ 2017-08-23 23:31 UTC (permalink / raw)
To: Sergey Senozhatsky
Cc: Andrew Morton, Minchan Kim, Nitin Gupta, linux-kernel, linux-mm,
Doug Anderson
El Tue, Aug 01, 2017 at 04:30:14PM +0900 Sergey Senozhatsky ha dit:
> On (07/31/17 10:50), Matthias Kaehlcke wrote:
> > 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
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>
> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Ping, it seems this one went under Andrew's radar. Mea culpa for not
putting him in cc: in the first place.
Thanks
Matthias
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mm/zsmalloc: Change stat type parameter to int
@ 2017-08-23 23:31 ` Matthias Kaehlcke
0 siblings, 0 replies; 8+ messages in thread
From: Matthias Kaehlcke @ 2017-08-23 23:31 UTC (permalink / raw)
To: Sergey Senozhatsky
Cc: Andrew Morton, Minchan Kim, Nitin Gupta, linux-kernel, linux-mm,
Doug Anderson
El Tue, Aug 01, 2017 at 04:30:14PM +0900 Sergey Senozhatsky ha dit:
> On (07/31/17 10:50), Matthias Kaehlcke wrote:
> > 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
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>
> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-08-23 23:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31 17:50 [PATCH] mm/zsmalloc: Change stat type parameter to int Matthias Kaehlcke
2017-07-31 17:50 ` Matthias Kaehlcke
2017-08-01 6:54 ` Minchan Kim
2017-08-01 6:54 ` Minchan Kim
2017-08-01 7:30 ` Sergey Senozhatsky
2017-08-01 7:30 ` Sergey Senozhatsky
2017-08-23 23:31 ` Matthias Kaehlcke
2017-08-23 23:31 ` Matthias Kaehlcke
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.