Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699049

Re: [PATCH] mm: memcontrol: Use int for event/state parameter in several functions

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mm: memcontrol: Use int for event/state parameter in several functions
Date 2017-07-28 22:00 +0200
Message-ID <u8jAt-86o-5@gated-at.bofh.it> (permalink)
References <u7Yml-2WL-3@gated-at.bofh.it> <u8ibn-7kQ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 28, 2017 at 11:23:54AM -0700, Matthias Kaehlcke wrote:
> El Thu, Jul 27, 2017 at 02:10:04PM -0700 Matthias Kaehlcke ha dit:
> 
> > Several functions use an enum type as parameter for an event/state,
> > but are called in some locations with an argument of a different enum
> > type. Adjust the interface of these functions to reality by changing the
> > parameter to int.
> > 
> > This fixes a ton of enum-conversion warnings that are generated when
> > building the kernel with clang.

Thanks for fixing this, Matthias.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

> While building for another target with a different configuration I
> noticed that inc/dec/mod_memcg_page_state() are also called with a
> conflicting enum type. Changing the parameter type for these functions
> also would make the API more consistent, with the current patch there
> is a somewhat odd mix of related functions, with some receiving an
> enum and others an int.
> 
> Depending on your preference I can send a v3 of this patch or a
> separate patch to address the remaining functions (since this patch
> has already been added to -mm).

Since it's the exact same rationale for the other functions, it would
make sense to me to do a v3 that includes the remaining sites.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] mm: memcontrol: Use int for event/state parameter in several functions Matthias Kaehlcke <mka@chromium.org> - 2017-07-27 23:20 +0200
  Re: [PATCH] mm: memcontrol: Use int for event/state parameter in  several functions Michal Hocko <mhocko@kernel.org> - 2017-07-28 09:00 +0200
  Re: [PATCH] mm: memcontrol: Use int for event/state parameter in  several functions Matthias Kaehlcke <mka@chromium.org> - 2017-07-28 20:30 +0200
    Re: [PATCH] mm: memcontrol: Use int for event/state parameter in  several functions Johannes Weiner <hannes@cmpxchg.org> - 2017-07-28 22:00 +0200

csiph-web