Skip to contentSkip to conversation

mm: memcontrol: use 'unsigned int' instead of bare 'unsigned'

PATCH New Po-Sheng Lin 1 participant 1 message Jul 6

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: memcontrol: use 'unsigned int' instead of bare 'unsigned'

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.

---
 include/linux/memcontrol.h | 10 +++++-----
 mm/memcontrol.c            |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)
include/linux/memcontrol.h +5 -5
index e1f46a0016fcf..903a57664f88f 100644
@@ -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)
 {
 }
 
mm/memcontrol.c +4 -4
index 6dc4888a90f3f..33017eb772a3a 100644
@@ -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;
Signature · 1 line
2.40.1