Linux cgroups development
 help / color / mirror / Atom feed
* [PATCH] mm: memcontrol: use 'unsigned int' instead of bare 'unsigned'
@ 2026-07-06  4:43 Po-Sheng Lin
  0 siblings, 0 replies; only message in thread
From: Po-Sheng Lin @ 2026-07-06  4:43 UTC (permalink / raw)
  To: hannes, mhocko, roman.gushchin, shakeel.butt, akpm
  Cc: muchun.song, cgroups, linux-mm, linux-kernel, Po-Sheng Lin

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-06  4:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06  4:43 [PATCH] mm: memcontrol: use 'unsigned int' instead of bare 'unsigned' Po-Sheng Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox