All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast
@ 2014-09-23 14:55 Pranith Kumar
  2014-09-24  2:31 ` Namhyung Kim
  2014-09-27  7:25 ` [tip:perf/core] perf tools: " tip-bot for Pranith Kumar
  0 siblings, 2 replies; 4+ messages in thread
From: Pranith Kumar @ 2014-09-23 14:55 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, David Ahern, Adrian Hunter,
	Namhyung Kim, open list:PERFORMANCE EVENT...

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast
  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:perf/core] perf tools: " tip-bot for Pranith Kumar
  1 sibling, 1 reply; 4+ messages in thread
From: Namhyung Kim @ 2014-09-24  2:31 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, David Ahern, Adrian Hunter,
	open list:PERFORMANCE EVENT...

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 */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast
  2014-09-24  2:31 ` Namhyung Kim
@ 2014-09-26 15:37   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-26 15:37 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Pranith Kumar, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Jiri Olsa, David Ahern, Adrian Hunter,
	open list:PERFORMANCE EVENT...

Em Wed, Sep 24, 2014 at 11:31:07AM +0900, Namhyung Kim escreveu:
> 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, applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:perf/core] perf tools: Use ACCESS_ONCE() instead of volatile cast
  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-27  7:25 ` tip-bot for Pranith Kumar
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Pranith Kumar @ 2014-09-27  7:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, paulus, mingo, hpa, mingo, jolsa, bobby.prani,
	a.p.zijlstra, namhyung, adrian.hunter, dsahern, tglx

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 */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-27  7:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:perf/core] perf tools: " tip-bot for Pranith Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.