[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zjdpkavo.fsf@sejong.aot.lge.com>
Date: Wed, 24 Sep 2014 11:31:07 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Pranith Kumar <bobby.prani@...il.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...nel.org>, David Ahern <dsahern@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-kernel@...r.kernel.org (open list:PERFORMANCE EVENT...)
Subject: Re: [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast
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@...il.com>
Acked-by: Namhyung Kim <namhyung@...nel.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 */
--
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