From: Qian Cai <cai@lca.pw>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: akpm@linux-foundation.org, surenb@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next v2] mm/vmscan: fix some -Wenum-conversion warnings
Date: Mon, 18 Nov 2019 15:56:13 -0500 [thread overview]
Message-ID: <1574110573.5937.144.camel@lca.pw> (raw)
In-Reply-To: <1574110334.5937.142.camel@lca.pw>
On Mon, 2019-11-18 at 15:52 -0500, Qian Cai wrote:
> On Mon, 2019-11-18 at 13:28 -0500, Johannes Weiner wrote:
> > On Mon, Nov 18, 2019 at 01:25:49PM -0500, Johannes Weiner wrote:
> > > 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?
> >
> > nvm, I see you already picked it up. Thank you!
>
> Hmm, I don't see Andrew picked it yet.
Ah, I saw it now. Too many emails, so I'll setup a filter.
prev parent reply other threads:[~2019-11-18 20:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 20:11 Qian Cai
2019-11-18 18:25 ` Johannes Weiner
2019-11-18 18:28 ` Johannes Weiner
2019-11-18 20:52 ` Qian Cai
2019-11-18 20:56 ` Qian Cai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1574110573.5937.144.camel@lca.pw \
--to=cai@lca.pw \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=surenb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox