From: Pranith Kumar <bobby.prani@gmail.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>, David Ahern <dsahern@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Namhyung Kim <namhyung@kernel.org>,
linux-kernel@vger.kernel.org (open list:PERFORMANCE EVENT...)
Subject: [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast
Date: Tue, 23 Sep 2014 10:55:08 -0400 [thread overview]
Message-ID: <1411484109-10442-1-git-send-email-bobby.prani@gmail.com> (raw)
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@gmail.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 */
--
2.1.0
next reply other threads:[~2014-09-23 14:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 14:55 Pranith Kumar [this message]
2014-09-24 2:31 ` Namhyung Kim
2014-09-26 15:37 ` Arnaldo Carvalho de Melo
2014-09-27 7:25 ` [tip:perf/core] perf tools: " tip-bot for Pranith Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411484109-10442-1-git-send-email-bobby.prani@gmail.com \
--to=bobby.prani@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome