From 1da34daf24823f19cfd56c97973334cd95635926 Mon Sep 17 00:00:00 2001 From: Pranith Kumar Date: Tue, 23 Sep 2014 10:55:08 -0400 Subject: perf tools: Use ACCESS_ONCE() instead of volatile cast Use ACCESS_ONCE() instead of the cast to volatile and read. This is just a style change which is reader friendly. Signed-off-by: Pranith Kumar Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: David Ahern Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1411484109-10442-1-git-send-email-bobby.prani@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 8dd41cad2d59..ffb440462008 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -126,5 +126,5 @@ int __perf_session__set_tracepoints_handlers(struct perf_session *session, extern volatile int session_done; -#define session_done() (*(volatile int *)(&session_done)) +#define session_done() ACCESS_ONCE(session_done) #endif /* __PERF_SESSION_H */ -- cgit v1.2.1