[tip:perf/core] tools lib traceevent: Fix afterlife gotos

2012-09-26 Thread tip-bot for Arnaldo Carvalho de Melo
Commit-ID:  b85119200dfaf51d361008d986d591156c7473d4
Gitweb: http://git.kernel.org/tip/b85119200dfaf51d361008d986d591156c7473d4
Author: Arnaldo Carvalho de Melo 
AuthorDate: Wed, 12 Sep 2012 15:39:59 -0300
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Mon, 24 Sep 2012 12:12:59 -0300

tools lib traceevent: Fix afterlife gotos

Instead of dying, just use do_warning and let the goto that is there to
take place.

Reviewed-by: Namhyung Kim 
Cc: David Ahern 
Cc: Frederic Weisbecker 
Cc: Jiri Olsa 
Cc: Mike Galbraith 
Cc: Namhyung Kim 
Cc: Paul Mackerras 
Cc: Peter Zijlstra 
Cc: Stephane Eranian 
Cc: Steven Rostedt 
Link: http://lkml.kernel.org/n/tip-aoaus46ngnt9oc2pt7cko...@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/lib/traceevent/event-parse.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.c 
b/tools/lib/traceevent/event-parse.c
index 2aeae55..2091991 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -1270,7 +1270,7 @@ static int event_read_fields(struct event_format *event, 
struct format_field **f
}
 
if (!field->type) {
-   die("no type found");
+   do_warning("%s: no type found", __func__);
goto fail;
}
field->name = last_token;
@@ -1317,7 +1317,7 @@ static int event_read_fields(struct event_format *event, 
struct format_field **f
free_token(token);
type = read_token();
if (type == EVENT_NONE) {
-   die("failed to find token");
+   do_warning("failed to find token");
goto fail;
}
}
@@ -1669,7 +1669,7 @@ process_op(struct event_format *event, struct print_arg 
*arg, char **tok)
if (arg->type == PRINT_OP && !arg->op.left) {
/* handle single op */
if (token[1]) {
-   die("bad op token %s", token);
+   do_warning("bad op token %s", token);
goto out_free;
}
switch (token[0]) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:perf/core] tools lib traceevent: Fix afterlife gotos

2012-09-26 Thread tip-bot for Arnaldo Carvalho de Melo
Commit-ID:  b85119200dfaf51d361008d986d591156c7473d4
Gitweb: http://git.kernel.org/tip/b85119200dfaf51d361008d986d591156c7473d4
Author: Arnaldo Carvalho de Melo a...@redhat.com
AuthorDate: Wed, 12 Sep 2012 15:39:59 -0300
Committer:  Arnaldo Carvalho de Melo a...@redhat.com
CommitDate: Mon, 24 Sep 2012 12:12:59 -0300

tools lib traceevent: Fix afterlife gotos

Instead of dying, just use do_warning and let the goto that is there to
take place.

Reviewed-by: Namhyung Kim namhy...@kernel.org
Cc: David Ahern dsah...@gmail.com
Cc: Frederic Weisbecker fweis...@gmail.com
Cc: Jiri Olsa jo...@redhat.com
Cc: Mike Galbraith efa...@gmx.de
Cc: Namhyung Kim namhy...@gmail.com
Cc: Paul Mackerras pau...@samba.org
Cc: Peter Zijlstra pet...@infradead.org
Cc: Stephane Eranian eran...@google.com
Cc: Steven Rostedt rost...@goodmis.org
Link: http://lkml.kernel.org/n/tip-aoaus46ngnt9oc2pt7cko...@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo a...@redhat.com
---
 tools/lib/traceevent/event-parse.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.c 
b/tools/lib/traceevent/event-parse.c
index 2aeae55..2091991 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -1270,7 +1270,7 @@ static int event_read_fields(struct event_format *event, 
struct format_field **f
}
 
if (!field-type) {
-   die(no type found);
+   do_warning(%s: no type found, __func__);
goto fail;
}
field-name = last_token;
@@ -1317,7 +1317,7 @@ static int event_read_fields(struct event_format *event, 
struct format_field **f
free_token(token);
type = read_token(token);
if (type == EVENT_NONE) {
-   die(failed to find token);
+   do_warning(failed to find token);
goto fail;
}
}
@@ -1669,7 +1669,7 @@ process_op(struct event_format *event, struct print_arg 
*arg, char **tok)
if (arg-type == PRINT_OP  !arg-op.left) {
/* handle single op */
if (token[1]) {
-   die(bad op token %s, token);
+   do_warning(bad op token %s, token);
goto out_free;
}
switch (token[0]) {
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/