Re: [PATCH] mm/memcontrol.c: fix another unused function warning

From: Qian Cai
Date: Tue Oct 01 2019 - 12:50:21 EST


On Tue, 2019-10-01 at 18:00 +0200, Arnd Bergmann wrote:
> On Tue, Oct 1, 2019 at 4:40 PM Qian Cai <cai@xxxxxx> wrote:
> >
> > On Tue, 2019-10-01 at 16:22 +0200, Arnd Bergmann wrote:
> > > Removing the mem_cgroup_id_get() stub function introduced a new warning
> > > of the same kind when CONFIG_MMU is disabled:
> >
> > Shouldn't CONFIG_MEMCG depends on CONFIG_MMU instead?
>
> Maybe. Generally we allow building a lot of stuff without CONFIG_MMU that
> may not make sense, so I just followed the same idea here.

Those blindly mark __maybe_unused might just mask important warnings off in the
future, and they are ugly. Let's fix it properly.