public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Pranith Kumar <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
	mingo@redhat.com, hpa@zytor.com, mingo@kernel.org,
	jolsa@kernel.org, bobby.prani@gmail.com, a.p.zijlstra@chello.nl,
	namhyung@kernel.org, adrian.hunter@intel.com, dsahern@gmail.com,
	tglx@linutronix.de
Subject: [tip:perf/core] perf tools: Use ACCESS_ONCE() instead of volatile cast
Date: Sat, 27 Sep 2014 00:25:23 -0700	[thread overview]
Message-ID: <tip-1da34daf24823f19cfd56c97973334cd95635926@git.kernel.org> (raw)
In-Reply-To: <1411484109-10442-1-git-send-email-bobby.prani@gmail.com>

Commit-ID:  1da34daf24823f19cfd56c97973334cd95635926
Gitweb:     http://git.kernel.org/tip/1da34daf24823f19cfd56c97973334cd95635926
Author:     Pranith Kumar <bobby.prani@gmail.com>
AuthorDate: Tue, 23 Sep 2014 10:55:08 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.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@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.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@redhat.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 */

      parent reply	other threads:[~2014-09-27  7:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 14:55 [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast Pranith Kumar
2014-09-24  2:31 ` Namhyung Kim
2014-09-26 15:37   ` Arnaldo Carvalho de Melo
2014-09-27  7:25 ` tip-bot for Pranith Kumar [this message]

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=tip-1da34daf24823f19cfd56c97973334cd95635926@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=bobby.prani@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /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