diff options
author | Vladimir Davydov <vdavydov@parallels.com> | 2014-08-08 17:19:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:18 -0400 |
commit | 434584fe68155f884b19f32b3befec8972c5d563 (patch) | |
tree | 79c54f92ae1362b83398216d45b1b3be49f6d78a | |
parent | 747db954cab64c6b7a95b121b517165f34751898 (diff) |
page-cgroup: trivial cleanup
Add forward declarations for struct pglist_data, mem_cgroup.
Remove __init, __meminit from function prototypes and inline functions.
Remove redundant inclusion of bit_spinlock.h.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/page_cgroup.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 9bfb8e68a595..b8f8c9e36a3e 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -12,8 +12,10 @@ enum { | |||
12 | #ifndef __GENERATING_BOUNDS_H | 12 | #ifndef __GENERATING_BOUNDS_H |
13 | #include <generated/bounds.h> | 13 | #include <generated/bounds.h> |
14 | 14 | ||
15 | struct pglist_data; | ||
16 | |||
15 | #ifdef CONFIG_MEMCG | 17 | #ifdef CONFIG_MEMCG |
16 | #include <linux/bit_spinlock.h> | 18 | struct mem_cgroup; |
17 | 19 | ||
18 | /* | 20 | /* |
19 | * Page Cgroup can be considered as an extended mem_map. | 21 | * Page Cgroup can be considered as an extended mem_map. |
@@ -27,16 +29,16 @@ struct page_cgroup { | |||
27 | struct mem_cgroup *mem_cgroup; | 29 | struct mem_cgroup *mem_cgroup; |
28 | }; | 30 | }; |
29 | 31 | ||
30 | void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat); | 32 | extern void pgdat_page_cgroup_init(struct pglist_data *pgdat); |
31 | 33 | ||
32 | #ifdef CONFIG_SPARSEMEM | 34 | #ifdef CONFIG_SPARSEMEM |
33 | static inline void __init page_cgroup_init_flatmem(void) | 35 | static inline void page_cgroup_init_flatmem(void) |
34 | { | 36 | { |
35 | } | 37 | } |
36 | extern void __init page_cgroup_init(void); | 38 | extern void page_cgroup_init(void); |
37 | #else | 39 | #else |
38 | void __init page_cgroup_init_flatmem(void); | 40 | extern void page_cgroup_init_flatmem(void); |
39 | static inline void __init page_cgroup_init(void) | 41 | static inline void page_cgroup_init(void) |
40 | { | 42 | { |
41 | } | 43 | } |
42 | #endif | 44 | #endif |
@@ -48,11 +50,10 @@ static inline int PageCgroupUsed(struct page_cgroup *pc) | |||
48 | { | 50 | { |
49 | return !!(pc->flags & PCG_USED); | 51 | return !!(pc->flags & PCG_USED); |
50 | } | 52 | } |
51 | 53 | #else /* !CONFIG_MEMCG */ | |
52 | #else /* CONFIG_MEMCG */ | ||
53 | struct page_cgroup; | 54 | struct page_cgroup; |
54 | 55 | ||
55 | static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) | 56 | static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat) |
56 | { | 57 | { |
57 | } | 58 | } |
58 | 59 | ||
@@ -65,10 +66,9 @@ static inline void page_cgroup_init(void) | |||
65 | { | 66 | { |
66 | } | 67 | } |
67 | 68 | ||
68 | static inline void __init page_cgroup_init_flatmem(void) | 69 | static inline void page_cgroup_init_flatmem(void) |
69 | { | 70 | { |
70 | } | 71 | } |
71 | |||
72 | #endif /* CONFIG_MEMCG */ | 72 | #endif /* CONFIG_MEMCG */ |
73 | 73 | ||
74 | #include <linux/swap.h> | 74 | #include <linux/swap.h> |