From: Pranith Kumar Date: Tue, 23 Sep 2014 14:55:08 +0000 (-0400) Subject: perf tools: Use ACCESS_ONCE() instead of volatile cast X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1da34daf24823f19cfd56c97973334cd95635926;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 --- 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 */