mm: remove dead code totalram_pages_set()
Subsystems (2)
PATCH 1/1 mm: remove dead code totalram_pages_set()
No one use totalram_pages_set(), just remote it.
--- include/linux/mm.h | 5 ----- 1 file changed, 5 deletions(-)
include/linux/mm.h +0 -5
@@ -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
Quoted 1 line · Wei Yang
No one use
totalram_pages_set(), just remote it.
s/use/uses/
s/remote/remove/
Quoted 13 lines
Signed-off-by Wei Yang <[email protected]>--- include/linux/mm.h | 5 ----- 1 file changed, 5 deletions(-)include/linux/mm.h +0
-0@@ -70,11 +70,6 @@ static inline void totalram_pages_add(long count)atomic_long_add (count, &_totalram_pages);
include/linux/mm.h static inline void totalram_pages_add(long count) · line 75
Quoted 10 lines
include/linux/mm.h +0
-5} -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
Quoted 6 lines · David Hildenbrand
Quoted 1 line · Wei Yang
No one use
totalram_pages_set(), just remote it.s/use/uses/
s/remote/remove/
Thanks, my bad.
Quoted 30 lines
Quoted 13 lines
Signed-off-by Wei Yang <[email protected]>--- include/linux/mm.h | 5 ----- 1 file changed, 5 deletions(-)include/linux/mm.h +0
-0@@ -70,11 +70,6 @@ static inline void totalram_pages_add(long count)atomic_long_add (count, &_totalram_pages);include/linux/mm.h static inline void totalram_pages_add(long count) · line 75
Quoted 10 lines
include/linux/mm.h +0
-5} -static inline void totalram_pages_set (long val) -{ -atomic_long_set (&_totalram_pages, val); -} -extern void * high_memory;extern int page_cluster;Reviewed-by David Hildenbrand <[email protected]>Signature · 3 lines
Thanks, David / dhildenb
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 5 lines · Wei Yang
No one use
totalram_pages_set(), just remote it.
It is unlikely that this is unintentional, but can you figure out which commit removed the last caller just in case?
Quoted 7 lines · Qian Cai
Quoted 5 lines · Wei Yang
No one use
totalram_pages_set(), just remote it.It is unlikely that this is unintentional, but can you figure out which commit removed the last caller just in case?
Took a look into the history. This function is introduced in
commit 'ca79b0c211af' (mm: convert totalram_pages and totalhigh_pages variables to atomic)
Even in this commit, no one use this function.
Will include this in next version.
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 10 lines · Wei Yang
Took a look into the history. This function is introduced in
commit '
ca79b0c211af' (mm: converttotalram_pagesandtotalhigh_pagesvariables to atomic)Even in this commit, no one use this function.
It occurs to me that function was a part of API design as a placeholder which might be used in the future.