aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ring_buffer.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2009-07-15 04:27:30 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2009-07-16 18:46:47 -0400
commitda706d8bc833e7153622435560422e653bdb2e94 (patch)
tree0da824f6db67ce361976ef3b4d5a7212ea92619b /kernel/trace/ring_buffer.c
parente202687927c132b1e1ff36b526b5e78ac33de840 (diff)
ring_buffer: Fix warning while ignoring cmpxchg return value
kernel/trace/ring_buffer.c: In function 'rb_tail_page_update': kernel/trace/ring_buffer.c:849: warning: value computed is not used kernel/trace/ring_buffer.c:850: warning: value computed is not used Add "(void)"s to fix this warning, because we don't need here to handle the fail case of cmpxchg, it's fine if an interrupt already did the job. Changed from V1: Add a comment(which is written by Steven) for it. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r--kernel/trace/ring_buffer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index e648ba4f70e0..51633d74a21e 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -845,9 +845,14 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
845 * This will only succeed if an interrupt did 845 * This will only succeed if an interrupt did
846 * not come in and change it. In which case, we 846 * not come in and change it. In which case, we
847 * do not want to modify it. 847 * do not want to modify it.
848 *
849 * We add (void) to let the compiler know that we do not care
850 * about the return value of these functions. We use the
851 * cmpxchg to only update if an interrupt did not already
852 * do it for us. If the cmpxchg fails, we don't care.
848 */ 853 */
849 local_cmpxchg(&next_page->write, old_write, val); 854 (void)local_cmpxchg(&next_page->write, old_write, val);
850 local_cmpxchg(&next_page->entries, old_entries, eval); 855 (void)local_cmpxchg(&next_page->entries, old_entries, eval);
851 856
852 /* 857 /*
853 * No need to worry about races with clearing out the commit. 858 * No need to worry about races with clearing out the commit.