From: Namhyung Kim <namhyung@kernel.org>
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: 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>,
linux-kernel@vger.kernel.org (open list:PERFORMANCE EVENT...)
Subject: Re: [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast
Date: Wed, 24 Sep 2014 11:31:07 +0900 [thread overview]
Message-ID: <87zjdpkavo.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1411484109-10442-1-git-send-email-bobby.prani@gmail.com> (Pranith Kumar's message of "Tue, 23 Sep 2014 10:55:08 -0400")
Hi Pranith,
On Tue, 23 Sep 2014 10:55:08 -0400, Pranith Kumar wrote:
> 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>
Thanks,
Namhyung
> ---
> 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 */
next prev parent reply other threads:[~2014-09-24 2:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 14:55 Pranith Kumar
2014-09-24 2:31 ` Namhyung Kim [this message]
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=87zjdpkavo.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=bobby.prani@gmail.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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