Skip to contentSkip to conversation

mm: remove dead code totalram_pages_set()

PATCH Applied Wei Yang 2 participants 3 messages Dec 18, 2019 – Dec 19, 2019

Subsystems (2)
lore
Share & tools
lore

Wei Yang

author
#0 lore raw

PATCH v2 1/1 mm: remove dead code totalram_pages_set()

No one uses totalram_pages_set(), just remove it.

Fixes ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages

variables to atomic")

---
v2: fix typo and points which commit introduce it.

---
 include/linux/mm.h | 5 -----
 1 file changed, 5 deletions(-)
include/linux/mm.h +0 -5
index 74232b28949b..4cf023c4c6b3 100644
@@ -70,11 +70,6 @@ static inline void totalram_pages_add(long count)
 	atomic_long_add(count, &_totalram_pages);
 }
 
-static inline void totalram_pages_set(long val)
-{
-	atomic_long_set(&_totalram_pages, val);
-}
-
 extern void * high_memory;
 extern int page_cluster;
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 4 lines · Wei Yang

No one uses totalram_pages_set(), just remove it.

Fixes ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages

variables to atomic")

Hi Wei, thanks for the update.

We should really avoid "Fixes" tags here. This is neither a bugfix nor a compile fix.

@Andrew, can you fix that up to:
"Last user was removed in commit ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages variables to atomic")."

Cheers!

Quoted 27 lines

---
v2: fix typo and points which commit introduce it.

---
 include/linux/mm.h | 5 -----
 1 file changed, 5 deletions(-)
include/linux/mm.h +0 -5
index 74232b28949b..4cf023c4c6b3 100644
@@ -70,11 +70,6 @@ static inline void totalram_pages_add(long count)
 	atomic_long_add(count, &_totalram_pages);
 }
 
-static inline void totalram_pages_set(long val)
-{
-	atomic_long_set(&_totalram_pages, val);
-}
-
 extern void * high_memory;
 extern int page_cluster;
 
Signature · 3 lines
Thanks,

David / dhildenb
author
#2 lore raw
Quoted 11 lines · David Hildenbrand
Quoted 4 lines · Wei Yang

No one uses totalram_pages_set(), just remove it.

Fixes ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages

variables to atomic")

Hi Wei, thanks for the update.

We should really avoid "Fixes" tags here. This is neither a bugfix nor a compile fix.

Agree, when I pick up this tags, I am a little not sure whether this is correct.

Quoted 4 lines

@Andrew, can you fix that up to:
"Last user was removed in commit ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages variables to atomic")."

Hmm... this one is not that exact. This function is introduced in commit ca79b0c211af and no one use it on its birth.

Maybe we need to change it to:

totalram_pages_set() is introduced in commit ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages variables to atomic"), but no one use it.

Thanks for your comments:-)

Quoted 35 lines

Cheers!

Quoted 27 lines

---
v2: fix typo and points which commit introduce it.

---
 include/linux/mm.h | 5 -----
 1 file changed, 5 deletions(-)
include/linux/mm.h +0 -5
index 74232b28949b..4cf023c4c6b3 100644
@@ -70,11 +70,6 @@ static inline void totalram_pages_add(long count)
 	atomic_long_add(count, &_totalram_pages);
 }
 
-static inline void totalram_pages_set(long val)
-{
-	atomic_long_set(&_totalram_pages, val);
-}
-
 extern void * high_memory;
 extern int page_cluster;
 
Signature · 3 lines
Thanks,

David / dhildenb
Signature · 2 lines
Wei Yang
Help you, Help me