cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Sun <sunjunchao2870@gmail.com>
To: cgroups@vger.kernel.org
Cc: tj@kernel.org, hannes@cmpxchg.org, Julian Sun <sunjunchao@bytedance.com>
Subject: [PATCH] cgroup: Remove unused css_put_many().
Date: Wed,  6 Aug 2025 16:04:57 +0800	[thread overview]
Message-ID: <20250806080457.3308817-1-sunjunchao@bytedance.com> (raw)

Remove css_put_many() as it's never called by any function.

Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
---
 include/linux/cgroup.h        |  1 -
 include/linux/cgroup_refcnt.h | 15 ---------------
 2 files changed, 16 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index b18fb5fcb38e..2e232eb8c897 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -322,7 +322,6 @@ void css_get_many(struct cgroup_subsys_state *css, unsigned int n);
 bool css_tryget(struct cgroup_subsys_state *css);
 bool css_tryget_online(struct cgroup_subsys_state *css);
 void css_put(struct cgroup_subsys_state *css);
-void css_put_many(struct cgroup_subsys_state *css, unsigned int n);
 #else
 #define CGROUP_REF_FN_ATTRS	static inline
 #define CGROUP_REF_EXPORT(fn)
diff --git a/include/linux/cgroup_refcnt.h b/include/linux/cgroup_refcnt.h
index 2eea0a69ecfc..1cede70a928c 100644
--- a/include/linux/cgroup_refcnt.h
+++ b/include/linux/cgroup_refcnt.h
@@ -79,18 +79,3 @@ void css_put(struct cgroup_subsys_state *css)
 		percpu_ref_put(&css->refcnt);
 }
 CGROUP_REF_EXPORT(css_put)
-
-/**
- * css_put_many - put css references
- * @css: target css
- * @n: number of references to put
- *
- * Put references obtained via css_get() and css_tryget_online().
- */
-CGROUP_REF_FN_ATTRS
-void css_put_many(struct cgroup_subsys_state *css, unsigned int n)
-{
-	if (!(css->flags & CSS_NO_REF))
-		percpu_ref_put_many(&css->refcnt, n);
-}
-CGROUP_REF_EXPORT(css_put_many)
-- 
2.20.1


             reply	other threads:[~2025-08-06  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06  8:04 Julian Sun [this message]
2025-08-06 13:36 ` [PATCH] cgroup: Remove unused css_put_many() Waiman Long

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=20250806080457.3308817-1-sunjunchao@bytedance.com \
    --to=sunjunchao2870@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=sunjunchao@bytedance.com \
    --cc=tj@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).