[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-1da34daf24823f19cfd56c97973334cd95635926@git.kernel.org>
Date: Sat, 27 Sep 2014 00:25:23 -0700
From: tip-bot for Pranith Kumar <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
mingo@...hat.com, hpa@...or.com, mingo@...nel.org,
jolsa@...nel.org, bobby.prani@...il.com, a.p.zijlstra@...llo.nl,
namhyung@...nel.org, adrian.hunter@...el.com, dsahern@...il.com,
tglx@...utronix.de
Subject: [tip:perf/core] perf tools: Use ACCESS_ONCE()
instead of volatile cast
Commit-ID: 1da34daf24823f19cfd56c97973334cd95635926
Gitweb: http://git.kernel.org/tip/1da34daf24823f19cfd56c97973334cd95635926
Author: Pranith Kumar <bobby.prani@...il.com>
AuthorDate: Tue, 23 Sep 2014 10:55:08 -0400
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 26 Sep 2014 12:36:03 -0300
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 <bobby.prani@...il.com>
Acked-by: Namhyung Kim <namhyung@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1411484109-10442-1-git-send-email-bobby.prani@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/session.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 8dd41ca..ffb4404 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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists