From: Michal Hocko <mhocko@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Alex Shi <alex.shi@linux.alibaba.com>,
Hugh Dickins <hughd@google.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
Roman Gushchin <guro@fb.com>, Shakeel Butt <shakeelb@google.com>,
Balbir Singh <bsingharora@gmail.com>,
Chris Down <chris@chrisdown.name>,
Yafang Shao <laoar.shao@gmail.com>, Tejun Heo <tj@kernel.org>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: memcontrol: fix an unused-function warning
Date: Fri, 29 May 2020 10:19:09 +0200 [thread overview]
Message-ID: <20200529081909.GG4406@dhcp22.suse.cz> (raw)
In-Reply-To: <20200528095640.151454-1-arnd@arndb.de>
On Thu 28-05-20 11:56:26, Arnd Bergmann wrote:
> On NOMMU kernels without CONFIG_MEMCG_KMEM, we now get a harmless
> warning about an unused function:
>
> mm/memcontrol.c:2595:13: error: unused function 'cancel_charge' [-Werror,-Wunused-function]
>
> Hide this function in a matching #ifdef.
>
> Fixes: 5bd144bf764c ("mm: memcontrol: drop unused try/commit/cancel charge API")
This is a linux-next sha1 which is not valid anymore. I would just drop
the tag.
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks!
> ---
> mm/memcontrol.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index f14da7a7348b..7bfca0abb8e1 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2592,6 +2592,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask,
> return 0;
> }
>
> +#if defined(CONFIG_MEMCG_KMEM) || defined(CONFIG_MMU)
> static void cancel_charge(struct mem_cgroup *memcg, unsigned int nr_pages)
> {
> if (mem_cgroup_is_root(memcg))
> @@ -2603,6 +2604,7 @@ static void cancel_charge(struct mem_cgroup *memcg, unsigned int nr_pages)
>
> css_put_many(&memcg->css, nr_pages);
> }
> +#endif
>
> static void commit_charge(struct page *page, struct mem_cgroup *memcg)
> {
> --
> 2.26.2
>
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2020-05-29 8:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 9:56 Arnd Bergmann
2020-05-28 17:15 ` Johannes Weiner
2020-05-29 8:19 ` Michal Hocko [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=20200529081909.GG4406@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@linux.alibaba.com \
--cc=arnd@arndb.de \
--cc=bsingharora@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=chris@chrisdown.name \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kirill@shutemov.name \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sfr@canb.auug.org.au \
--cc=shakeelb@google.com \
--cc=tj@kernel.org \
--cc=vdavydov.dev@gmail.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
Powered by JetHome