Re: [PATCH] mm: memcontrol.c: move mem_cgroup_id_get_many under CONFIG_MMU

From: Michal Hocko
Date: Tue Dec 17 2019 - 09:46:57 EST


On Tue 17-12-19 09:16:36, Qian Cai wrote:
>
>
> > On Dec 17, 2019, at 8:54 AM, Chris Down <chris@xxxxxxxxxxxxxx> wrote:
> >
> > Let's just add __maybe_unused, since it seems like what we want in this scenario -- it avoids new users having to enter preprocessor madness, while also not polluting the build output.
>
> __maybe_unused should only be used in the last resort as it mark the compiler to catch the real issues in the future. In this case, it might be better just ignore it as only non-realistic compiling test would use !CONFIG_MMU in this case.

yes, I would just ignore this warning. Btw. it seems that this is
enabled by default for -Wall. Is this useful for kernel builds at
all? Does it realistically help discovering real issues? If not then
can we simply blacklist it?
--
Michal Hocko
SUSE Labs