From: Andrew Morton Date: Fri, 30 Jun 2006 08:55:43 +0000 (-0700) Subject: [PATCH] zoned-vm-counters: remove read_page_state() X-Git-Tag: firefly_0821_release~34678 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bab1846a0582f627f5ec22aa2dc5f4f3e82e8176;p=firefly-linux-kernel-4.4.55.git [PATCH] zoned-vm-counters: remove read_page_state() No callers. Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 5b5b96afc395..5fad1613e7d6 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -70,13 +70,9 @@ struct page_state { }; extern void get_full_page_state(struct page_state *ret); -extern unsigned long read_page_state_offset(unsigned long offset); extern void mod_page_state_offset(unsigned long offset, unsigned long delta); extern void __mod_page_state_offset(unsigned long offset, unsigned long delta); -#define read_page_state(member) \ - read_page_state_offset(offsetof(struct page_state, member)) - #define mod_page_state(member, delta) \ mod_page_state_offset(offsetof(struct page_state, member), (delta)) diff --git a/mm/vmstat.c b/mm/vmstat.c index 25e5ca7c1743..06a6d1052198 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -52,20 +52,6 @@ void get_full_page_state(struct page_state *ret) __get_page_state(ret, sizeof(*ret) / sizeof(unsigned long), &mask); } -unsigned long read_page_state_offset(unsigned long offset) -{ - unsigned long ret = 0; - int cpu; - - for_each_online_cpu(cpu) { - unsigned long in; - - in = (unsigned long)&per_cpu(page_states, cpu) + offset; - ret += *((unsigned long *)in); - } - return ret; -} - void __mod_page_state_offset(unsigned long offset, unsigned long delta) { void *ptr;