lkml.org 
[lkml]   [2019]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next v2] mm/vmscan: fix some -Wenum-conversion warnings
On Fri, Nov 15, 2019 at 03:11:37PM -0500, Qian Cai wrote:
> The -next commit "mm: vmscan: enforce inactive:active ratio at the
> reclaim root" [1] introduced some Clang -Wenum-conversion warnings,
>
> mm/vmscan.c:2216:39: warning: implicit conversion from enumeration type
> 'enum lru_list' to different enumeration type 'enum node_stat_item'
> [-Wenum-conversion]
> inactive = lruvec_page_state(lruvec, inactive_lru);
> ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~
> mm/vmscan.c:2217:37: warning: implicit conversion from enumeration type
> 'enum lru_list' to different enumeration type 'enum node_stat_item'
> [-Wenum-conversion]
> active = lruvec_page_state(lruvec, active_lru);
> ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
> mm/vmscan.c:2746:42: warning: implicit conversion from enumeration type
> 'enum lru_list' to different enumeration type 'enum node_stat_item'
> [-Wenum-conversion]
> file = lruvec_page_state(target_lruvec, LRU_INACTIVE_FILE);
> ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~
>
> Since it guarantees the relative order between the LRU items, fix it by
> using NR_LRU_BASE for the translation.
>
> [1] http://lkml.kernel.org/r/20191107205334.158354-4-hannes@cmpxchg.org
>
> Signed-off-by: Qian Cai <cai@lca.pw>

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

Thanks Qian!

Andrew, this is a fix for "mm: vmscan: enforce inactive:active ratio
at the reclaim root". Could you please fold this into that?

\
 
 \ /
  Last update: 2019-11-18 19:27    [W:0.054 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site