mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Qian Cai <cai@lca.pw>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org,
	vdavydov.dev@gmail.com, cgroups@vger.kernel.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/memcontrol: fix a -Wunused-function warning
Date: Tue, 17 Sep 2019 09:40:03 +0200	[thread overview]
Message-ID: <20190917074003.GA17727@dhcp22.suse.cz> (raw)
In-Reply-To: <1568648453-5482-1-git-send-email-cai@lca.pw>

On Mon 16-09-19 11:40:53, Qian Cai wrote:
> mem_cgroup_id_get() was introduced in the commit 73f576c04b94
> ("mm:memcontrol: fix cgroup creation failure after many small jobs").
> 
> Later, it no longer has any user since the commits,
> 
> 1f47b61fb407 ("mm: memcontrol: fix swap counter leak on swapout from offline cgroup")
> 58fa2a5512d9 ("mm: memcontrol: add sanity checks for memcg->id.ref on get/put")
> 
> so safe to remove it.
> 
> Signed-off-by: Qian Cai <cai@lca.pw>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  mm/memcontrol.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 9ec5e12486a7..9a375b376157 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4675,11 +4675,6 @@ static void mem_cgroup_id_put_many(struct mem_cgroup *memcg, unsigned int n)
>  	}
>  }
>  
> -static inline void mem_cgroup_id_get(struct mem_cgroup *memcg)
> -{
> -	mem_cgroup_id_get_many(memcg, 1);
> -}
> -
>  static inline void mem_cgroup_id_put(struct mem_cgroup *memcg)
>  {
>  	mem_cgroup_id_put_many(memcg, 1);
> -- 
> 1.8.3.1

-- 
Michal Hocko
SUSE Labs

      reply	other threads:[~2019-09-17  7:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16 15:40 Qian Cai
2019-09-17  7:40 ` 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=20190917074003.GA17727@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cai@lca.pw \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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

all inboxes | Powered by JetHome®