linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools lib traceevent: Fix backward compatibility macros for pevent filter enums
@ 2014-04-22  2:23 Steven Rostedt
  2014-04-22 13:19 ` Jiri Olsa
  2014-04-23 13:13 ` [tip:perf/urgent] " tip-bot for Steven Rostedt
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2014-04-22  2:23 UTC (permalink / raw)
  To: LKML; +Cc: Jiri Olsa, Arnaldo Carvalho de Melo, Namhyung Kim


The return value for pevent_filter_match() is suppose to return FILTER_NONE
if the event doesn't have a filter, and FILTER_NOEXIST if there is no filter
at all. But the change 41e12e580a7 "tools lib traceevent: Refactor
pevent_filter_match() to get rid of die()" replaced the return value
with PEVENT_ERRNO__* values and added "backward compatibility" macros
that used the old names. Unfortunately, the NOEXIST and NONE macros were
swapped, and this broke users that use the old return names.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 tools/lib/traceevent/event-parse.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 9c38181..d6c610a 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -886,8 +886,8 @@ struct event_filter {
 struct event_filter *pevent_filter_alloc(struct pevent *pevent);
 
 /* for backward compatibility */
-#define FILTER_NONE		PEVENT_ERRNO__FILTER_NOT_FOUND
-#define FILTER_NOEXIST		PEVENT_ERRNO__NO_FILTER
+#define FILTER_NONE		PEVENT_ERRNO__NO_FILTER
+#define FILTER_NOEXIST		PEVENT_ERRNO__FILTER_NOT_FOUND
 #define FILTER_MISS		PEVENT_ERRNO__FILTER_MISS
 #define FILTER_MATCH		PEVENT_ERRNO__FILTER_MATCH
 
-- 
1.8.1.4


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

* Re: [PATCH] tools lib traceevent: Fix backward compatibility macros for pevent filter enums
  2014-04-22  2:23 [PATCH] tools lib traceevent: Fix backward compatibility macros for pevent filter enums Steven Rostedt
@ 2014-04-22 13:19 ` Jiri Olsa
  2014-04-23 13:13 ` [tip:perf/urgent] " tip-bot for Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2014-04-22 13:19 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Arnaldo Carvalho de Melo, Namhyung Kim

On Mon, Apr 21, 2014 at 10:23:46PM -0400, Steven Rostedt wrote:
> 
> The return value for pevent_filter_match() is suppose to return FILTER_NONE
> if the event doesn't have a filter, and FILTER_NOEXIST if there is no filter
> at all. But the change 41e12e580a7 "tools lib traceevent: Refactor
> pevent_filter_match() to get rid of die()" replaced the return value
> with PEVENT_ERRNO__* values and added "backward compatibility" macros
> that used the old names. Unfortunately, the NOEXIST and NONE macros were
> swapped, and this broke users that use the old return names.
> 
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

> ---
>  tools/lib/traceevent/event-parse.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
> index 9c38181..d6c610a 100644
> --- a/tools/lib/traceevent/event-parse.h
> +++ b/tools/lib/traceevent/event-parse.h
> @@ -886,8 +886,8 @@ struct event_filter {
>  struct event_filter *pevent_filter_alloc(struct pevent *pevent);
>  
>  /* for backward compatibility */
> -#define FILTER_NONE		PEVENT_ERRNO__FILTER_NOT_FOUND
> -#define FILTER_NOEXIST		PEVENT_ERRNO__NO_FILTER
> +#define FILTER_NONE		PEVENT_ERRNO__NO_FILTER
> +#define FILTER_NOEXIST		PEVENT_ERRNO__FILTER_NOT_FOUND
>  #define FILTER_MISS		PEVENT_ERRNO__FILTER_MISS
>  #define FILTER_MATCH		PEVENT_ERRNO__FILTER_MATCH
>  
> -- 
> 1.8.1.4
> 

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

* [tip:perf/urgent] tools lib traceevent: Fix backward compatibility macros for pevent filter enums
  2014-04-22  2:23 [PATCH] tools lib traceevent: Fix backward compatibility macros for pevent filter enums Steven Rostedt
  2014-04-22 13:19 ` Jiri Olsa
@ 2014-04-23 13:13 ` tip-bot for Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Steven Rostedt @ 2014-04-23 13:13 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, tglx, jolsa

Commit-ID:  4508793541140723ab862d83095f6b5141d24e49
Gitweb:     http://git.kernel.org/tip/4508793541140723ab862d83095f6b5141d24e49
Author:     Steven Rostedt <rostedt@goodmis.org>
AuthorDate: Mon, 21 Apr 2014 22:23:46 -0400
Committer:  Jiri Olsa <jolsa@redhat.com>
CommitDate: Wed, 23 Apr 2014 13:19:23 +0200

tools lib traceevent: Fix backward compatibility macros for pevent filter enums

The return value for pevent_filter_match() is suppose to return FILTER_NONE
if the event doesn't have a filter, and FILTER_NOEXIST if there is no filter
at all. But the change 41e12e580a7 "tools lib traceevent: Refactor
pevent_filter_match() to get rid of die()" replaced the return value
with PEVENT_ERRNO__* values and added "backward compatibility" macros
that used the old names. Unfortunately, the NOEXIST and NONE macros were
swapped, and this broke users that use the old return names.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20140421222346.0351ced4@gandalf.local.home
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
 tools/lib/traceevent/event-parse.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 791c539..feab942 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -876,8 +876,8 @@ struct event_filter {
 struct event_filter *pevent_filter_alloc(struct pevent *pevent);
 
 /* for backward compatibility */
-#define FILTER_NONE		PEVENT_ERRNO__FILTER_NOT_FOUND
-#define FILTER_NOEXIST		PEVENT_ERRNO__NO_FILTER
+#define FILTER_NONE		PEVENT_ERRNO__NO_FILTER
+#define FILTER_NOEXIST		PEVENT_ERRNO__FILTER_NOT_FOUND
 #define FILTER_MISS		PEVENT_ERRNO__FILTER_MISS
 #define FILTER_MATCH		PEVENT_ERRNO__FILTER_MATCH
 

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

end of thread, other threads:[~2014-04-23 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22  2:23 [PATCH] tools lib traceevent: Fix backward compatibility macros for pevent filter enums Steven Rostedt
2014-04-22 13:19 ` Jiri Olsa
2014-04-23 13:13 ` [tip:perf/urgent] " tip-bot for Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).