From: Po-Sheng Lin <posheng.lin.tw@gmail.com>
To: hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev,
shakeel.butt@linux.dev, akpm@linux-foundation.org
Cc: muchun.song@linux.dev, cgroups@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Po-Sheng Lin <posheng.lin.tw@gmail.com>
Subject: [PATCH] mm: memcontrol: use 'unsigned int' instead of bare 'unsigned'
Date: Mon, 6 Jul 2026 12:43:30 +0800 [thread overview]
Message-ID: <20260706044330.10283-1-posheng.lin.tw@gmail.com> (raw)
Use 'unsigned int' instead of bare 'unsigned' for the order
parameters in split_page_memcg() and folio_split_memcg_refs(),
and for the new_refs local variable, for consistency with kernel
coding style guidelines.
Signed-off-by: Po-Sheng Lin <posheng.lin.tw@gmail.com>
---
include/linux/memcontrol.h | 10 +++++-----
mm/memcontrol.c | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index e1f46a0016fcf..903a57664f88f 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1001,9 +1001,9 @@ static inline void memcg_memory_event_mm(struct mm_struct *mm,
rcu_read_unlock();
}
-void split_page_memcg(struct page *first, unsigned order);
-void folio_split_memcg_refs(struct folio *folio, unsigned old_order,
- unsigned new_order);
+void split_page_memcg(struct page *first, unsigned int order);
+void folio_split_memcg_refs(struct folio *folio, unsigned int old_order,
+ unsigned int new_order);
static inline u64 cgroup_id_from_mm(struct mm_struct *mm)
{
@@ -1421,12 +1421,12 @@ void count_memcg_event_mm(struct mm_struct *mm, enum vm_event_item idx)
{
}
-static inline void split_page_memcg(struct page *first, unsigned order)
+static inline void split_page_memcg(struct page *first, unsigned int order)
{
}
static inline void folio_split_memcg_refs(struct folio *folio,
- unsigned old_order, unsigned new_order)
+ unsigned int old_order, unsigned int new_order)
{
}
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6dc4888a90f3f..33017eb772a3a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3659,7 +3659,7 @@ void __memcg_slab_free_hook(struct kmem_cache *s, struct slab *slab,
* The objcg is only set on the first page, so transfer it to all the
* other pages.
*/
-void split_page_memcg(struct page *page, unsigned order)
+void split_page_memcg(struct page *page, unsigned int order)
{
struct obj_cgroup *objcg = page_objcg(page);
unsigned int i, nr = 1 << order;
@@ -3673,10 +3673,10 @@ void split_page_memcg(struct page *page, unsigned order)
obj_cgroup_get_many(objcg, nr - 1);
}
-void folio_split_memcg_refs(struct folio *folio, unsigned old_order,
- unsigned new_order)
+void folio_split_memcg_refs(struct folio *folio, unsigned int old_order,
+ unsigned int new_order)
{
- unsigned new_refs;
+ unsigned int new_refs;
if (mem_cgroup_disabled() || !folio_memcg_charged(folio))
return;
--
2.40.1
reply other threads:[~2026-07-06 4:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260706044330.10283-1-posheng.lin.tw@gmail.com \
--to=posheng.lin.tw@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
/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