diff options
author | Anton Blanchard <anton@samba.org> | 2010-02-02 17:46:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-08 02:57:36 -0500 |
commit | 0c9cf2efd74dbc90354e2ccc7dbd6bad68ec6c4d (patch) | |
tree | 49eec3ac499da4fd347cb7300fac6e1c596f2956 /include | |
parent | 6d3e0907b8b239d16720d144e2675ecf10d3bc3b (diff) |
percpu_counter: Make __percpu_counter_add an inline function on UP
Even though batch isn't used on UP, we may want to pass one in
to keep the SMP and UP code paths similar. Convert
__percpu_counter_add to an inline function so we wont get
variable unused warnings if we do.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/percpu_counter.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index a7684a513994..794662b2be5d 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -98,9 +98,6 @@ static inline void percpu_counter_set(struct percpu_counter *fbc, s64 amount) | |||
98 | fbc->count = amount; | 98 | fbc->count = amount; |
99 | } | 99 | } |
100 | 100 | ||
101 | #define __percpu_counter_add(fbc, amount, batch) \ | ||
102 | percpu_counter_add(fbc, amount) | ||
103 | |||
104 | static inline void | 101 | static inline void |
105 | percpu_counter_add(struct percpu_counter *fbc, s64 amount) | 102 | percpu_counter_add(struct percpu_counter *fbc, s64 amount) |
106 | { | 103 | { |
@@ -109,6 +106,12 @@ percpu_counter_add(struct percpu_counter *fbc, s64 amount) | |||
109 | preempt_enable(); | 106 | preempt_enable(); |
110 | } | 107 | } |
111 | 108 | ||
109 | static inline void | ||
110 | __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch) | ||
111 | { | ||
112 | percpu_counter_add(fbc, amount); | ||
113 | } | ||
114 | |||
112 | static inline s64 percpu_counter_read(struct percpu_counter *fbc) | 115 | static inline s64 percpu_counter_read(struct percpu_counter *fbc) |
113 | { | 116 | { |
114 | return fbc->count; | 117 | return fbc->count; |