Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1234743 > unrolled thread

Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface

Started byVinson Lee <vlee@twopensource.com>
First post2015-09-29 08:40 +0200
Last post2015-09-29 10:00 +0200
Articles 10 — 5 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface Vinson Lee <vlee@twopensource.com> - 2015-09-29 08:40 +0200
    Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface Jiri Olsa <jolsa@redhat.com> - 2015-09-29 09:20 +0200
      Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface Jiri Olsa <jolsa@redhat.com> - 2015-09-29 09:30 +0200
        Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface Jiri Olsa <jolsa@redhat.com> - 2015-09-29 10:00 +0200
          Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface He Kuang <hekuang@huawei.com> - 2015-09-29 10:30 +0200
            Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface Jiri Olsa <jolsa@redhat.com> - 2015-09-29 12:50 +0200
              Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface Arnaldo Carvalho de Melo <acme@redhat.com> - 2015-09-29 17:00 +0200
                [PATCH] perf tool: Fix shadowed declaration in parse-events.c Jiri Olsa <jolsa@redhat.com> - 2015-09-29 17:10 +0200
                  [tip:perf/core] perf tools:   Fix shadowed declaration in parse-events.c tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-10-01 09:20 +0200
        Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface He Kuang <hekuang@huawei.com> - 2015-09-29 10:00 +0200

#1234743 — Re: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface

FromVinson Lee <vlee@twopensource.com>
Date2015-09-29 08:40 +0200
SubjectRe: [tip:perf/core] tools: Add err.h with ERR_PTR PTR_ERR interface
Message-ID<qdWJY-6XG-15@gated-at.bofh.it>
On Mon, Sep 21, 2015 at 4:41 PM, Vinson Lee <vlee@twopensource.com> wrote:
> On Wed, Sep 16, 2015 at 12:28 AM, tip-bot for Jiri Olsa
> <tipbot@zytor.com> wrote:
>> Commit-ID:  01ca9fd41d6f2ad796a6b109b5253e06b6ae6dc7
>> Gitweb:     http://git.kernel.org/tip/01ca9fd41d6f2ad796a6b109b5253e06b6ae6dc7
>> Author:     Jiri Olsa <jolsa@kernel.org>
>> AuthorDate: Mon, 7 Sep 2015 10:38:03 +0200
>> Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
>> CommitDate: Tue, 15 Sep 2015 09:48:32 -0300
>>
>> tools: Add err.h with ERR_PTR PTR_ERR interface
>>
>> Adding part of the kernel's <linux/err.h> interface:
>>
>>   inline void * __must_check ERR_PTR(long error);
>>   inline long   __must_check PTR_ERR(__force const void *ptr);
>>   inline bool   __must_check IS_ERR(__force const void *ptr);
>>
>> It will be used to propagate error through pointers in following
>> patches.
>>
>> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
>> Reviewed-by: Raphael Beamonte <raphael.beamonte@gmail.com>
>> Cc: David Ahern <dsahern@gmail.com>
>> Cc: Matt Fleming <matt@codeblueprint.co.uk>
>> Cc: Namhyung Kim <namhyung@kernel.org>
>> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> Link: http://lkml.kernel.org/r/1441615087-13886-2-git-send-email-jolsa@kernel.org
>> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
>
> Hi.
>
> This patch appears to have introduced a build error on CentOS 6.7 with GCC 4.4.
>
> This build error occurs on next-20150921.
>
>   CC       util/evlist.o
> cc1: warnings being treated as errors
> In file included from util/evlist.c:28:
> tools/include/linux/err.h: In function ‘ERR_PTR’:
> tools/include/linux/err.h:34: error: declaration of ‘error’ shadows a
> global declaration
> util/util.h:135: error: shadowed declaration is here
>
> $ gcc --version
> gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
> Copyright (C) 2010 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> Cheers,
> Vinson

Hi.

This build error still occurs with next-20150929.

Cheers,
Vinson
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1234763

FromJiri Olsa <jolsa@redhat.com>
Date2015-09-29 09:20 +0200
Message-ID<qdXmG-7W4-13@gated-at.bofh.it>
In reply to#1234743
On Mon, Sep 28, 2015 at 11:35:45PM -0700, Vinson Lee wrote:
> On Mon, Sep 21, 2015 at 4:41 PM, Vinson Lee <vlee@twopensource.com> wrote:
> > On Wed, Sep 16, 2015 at 12:28 AM, tip-bot for Jiri Olsa
> > <tipbot@zytor.com> wrote:
> >> Commit-ID:  01ca9fd41d6f2ad796a6b109b5253e06b6ae6dc7
> >> Gitweb:     http://git.kernel.org/tip/01ca9fd41d6f2ad796a6b109b5253e06b6ae6dc7
> >> Author:     Jiri Olsa <jolsa@kernel.org>
> >> AuthorDate: Mon, 7 Sep 2015 10:38:03 +0200
> >> Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
> >> CommitDate: Tue, 15 Sep 2015 09:48:32 -0300
> >>
> >> tools: Add err.h with ERR_PTR PTR_ERR interface
> >>
> >> Adding part of the kernel's <linux/err.h> interface:
> >>
> >>   inline void * __must_check ERR_PTR(long error);
> >>   inline long   __must_check PTR_ERR(__force const void *ptr);
> >>   inline bool   __must_check IS_ERR(__force const void *ptr);
> >>
> >> It will be used to propagate error through pointers in following
> >> patches.
> >>
> >> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> >> Reviewed-by: Raphael Beamonte <raphael.beamonte@gmail.com>
> >> Cc: David Ahern <dsahern@gmail.com>
> >> Cc: Matt Fleming <matt@codeblueprint.co.uk>
> >> Cc: Namhyung Kim <namhyung@kernel.org>
> >> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> Link: http://lkml.kernel.org/r/1441615087-13886-2-git-send-email-jolsa@kernel.org
> >> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> >
> >
> > Hi.
> >
> > This patch appears to have introduced a build error on CentOS 6.7 with GCC 4.4.
> >
> > This build error occurs on next-20150921.
> >
> >   CC       util/evlist.o
> > cc1: warnings being treated as errors
> > In file included from util/evlist.c:28:
> > tools/include/linux/err.h: In function ‘ERR_PTR’:
> > tools/include/linux/err.h:34: error: declaration of ‘error’ shadows a
> > global declaration
> > util/util.h:135: error: shadowed declaration is here
> >
> > $ gcc --version
> > gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
> > Copyright (C) 2010 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.  There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> >
> > Cheers,
> > Vinson
> 
> Hi.
> 
> This build error still occurs with next-20150929.

attached patch should fix it

FYI there's another instance of this bug in parse-events.c in
Arnaldo's perf/core due to recent fixes, I'll send out fix shortly

thanks,
jirka


---
The error variable breaks build on CentOS 6.7, due to
collision with global error symbol:

    CC       util/evlist.o
  cc1: warnings being treated as errors
  In file included from util/evlist.c:28:
  tools/include/linux/err.h: In function ‘ERR_PTR’:
  tools/include/linux/err.h:34: error: declaration of ‘error’ shadows a global declaration
  util/util.h:135: error: shadowed declaration is here

Using 'err' name instead to fix it.

Reported-by: Vinson Lee <vlee@twopensource.com>
Link: http://lkml.kernel.org/n/tip-i9mdgdbrgauy3fe76s9rd125@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/include/linux/err.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/include/linux/err.h b/tools/include/linux/err.h
index c9ada48f5156..1156cd20e0b7 100644
--- a/tools/include/linux/err.h
+++ b/tools/include/linux/err.h
@@ -31,9 +31,9 @@
 
 #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
 
-static inline void * __must_check ERR_PTR(long error)
+static inline void * __must_check ERR_PTR(long err)
 {
-	return (void *) error;
+	return (void *) err;
 }
 
 static inline long __must_check PTR_ERR(__force const void *ptr)
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234769

FromJiri Olsa <jolsa@redhat.com>
Date2015-09-29 09:30 +0200
Message-ID<qdXwl-878-1@gated-at.bofh.it>
In reply to#1234763
On Tue, Sep 29, 2015 at 09:14:10AM +0200, Jiri Olsa wrote:

SNIP

> > > $ gcc --version
> > > gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
> > > Copyright (C) 2010 Free Software Foundation, Inc.
> > > This is free software; see the source for copying conditions.  There is NO
> > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > >
> > > Cheers,
> > > Vinson
> > 
> > Hi.
> > 
> > This build error still occurs with next-20150929.
> 
> attached patch should fix it
> 
> FYI there's another instance of this bug in parse-events.c in
> Arnaldo's perf/core due to recent fixes, I'll send out fix shortly

and here it is..

He Kuang,
this might collide with your recent fixes..

jirka


---
The error variable breaks build on CentOS 6.7, due to
collision with global error symbol:

    CC       util/parse-events.o
  cc1: warnings being treated as errors
  util/parse-events.c:419: error: declaration of ‘error’ shadows a global
  declaration
  util/util.h:135: error: shadowed declaration is here
  util/parse-events.c: In function ‘add_tracepoint_multi_event’:
  ...

Using different argument names instead to fix it.

Reported-by: Vinson Lee <vlee@twopensource.com>
Link: http://lkml.kernel.org/n/tip-ujp5f63wvy70jlzeh3rt5f98@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/parse-events.c |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 61c2bc2..626bf85 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -387,7 +387,7 @@ int parse_events_add_cache(struct list_head *list, int *idx,
 	return add_event(list, idx, &attr, name, NULL);
 }
 
-static void tracepoint_error(struct parse_events_error *error, int err,
+static void tracepoint_error(struct parse_events_error *e, int err,
 			     char *sys, char *name)
 {
 	char help[BUFSIZ];
@@ -400,29 +400,29 @@ static void tracepoint_error(struct parse_events_error *error, int err,
 
 	switch (err) {
 	case EACCES:
-		error->str = strdup("can't access trace events");
+		e->str = strdup("can't access trace events");
 		break;
 	case ENOENT:
-		error->str = strdup("unknown tracepoint");
+		e->str = strdup("unknown tracepoint");
 		break;
 	default:
-		error->str = strdup("failed to add tracepoint");
+		e->str = strdup("failed to add tracepoint");
 		break;
 	}
 
 	tracing_path__strerror_open_tp(err, help, sizeof(help), sys, name);
-	error->help = strdup(help);
+	e->help = strdup(help);
 }
 
 static int add_tracepoint(struct list_head *list, int *idx,
 			  char *sys_name, char *evt_name,
-			  struct parse_events_error *error __maybe_unused)
+			  struct parse_events_error *err __maybe_unused)
 {
 	struct perf_evsel *evsel;
 
 	evsel = perf_evsel__newtp_idx(sys_name, evt_name, (*idx)++);
 	if (IS_ERR(evsel)) {
-		tracepoint_error(error, PTR_ERR(evsel), sys_name, evt_name);
+		tracepoint_error(err, PTR_ERR(evsel), sys_name, evt_name);
 		return PTR_ERR(evsel);
 	}
 
@@ -432,7 +432,7 @@ static int add_tracepoint(struct list_head *list, int *idx,
 
 static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 				      char *sys_name, char *evt_name,
-				      struct parse_events_error *error)
+				      struct parse_events_error *err)
 {
 	char evt_path[MAXPATHLEN];
 	struct dirent *evt_ent;
@@ -442,7 +442,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 	snprintf(evt_path, MAXPATHLEN, "%s/%s", tracing_events_path, sys_name);
 	evt_dir = opendir(evt_path);
 	if (!evt_dir) {
-		tracepoint_error(error, errno, sys_name, evt_name);
+		tracepoint_error(err, errno, sys_name, evt_name);
 		return -1;
 	}
 
@@ -456,7 +456,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 		if (!strglobmatch(evt_ent->d_name, evt_name))
 			continue;
 
-		ret = add_tracepoint(list, idx, sys_name, evt_ent->d_name, error);
+		ret = add_tracepoint(list, idx, sys_name, evt_ent->d_name, err);
 	}
 
 	closedir(evt_dir);
@@ -465,16 +465,16 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 
 static int add_tracepoint_event(struct list_head *list, int *idx,
 				char *sys_name, char *evt_name,
-				struct parse_events_error *error)
+				struct parse_events_error *err)
 {
 	return strpbrk(evt_name, "*?") ?
-	       add_tracepoint_multi_event(list, idx, sys_name, evt_name, error) :
-	       add_tracepoint(list, idx, sys_name, evt_name, error);
+	       add_tracepoint_multi_event(list, idx, sys_name, evt_name, err) :
+	       add_tracepoint(list, idx, sys_name, evt_name, err);
 }
 
 static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 				    char *sys_name, char *evt_name,
-				    struct parse_events_error *error)
+				    struct parse_events_error *err)
 {
 	struct dirent *events_ent;
 	DIR *events_dir;
@@ -482,7 +482,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 
 	events_dir = opendir(tracing_events_path);
 	if (!events_dir) {
-		tracepoint_error(error, errno, sys_name, evt_name);
+		tracepoint_error(err, errno, sys_name, evt_name);
 		return -1;
 	}
 
@@ -498,7 +498,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 			continue;
 
 		ret = add_tracepoint_event(list, idx, events_ent->d_name,
-					   evt_name, error);
+					   evt_name, err);
 	}
 
 	closedir(events_dir);
@@ -507,12 +507,12 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 
 int parse_events_add_tracepoint(struct list_head *list, int *idx,
 				char *sys, char *event,
-				struct parse_events_error *error)
+				struct parse_events_error *err)
 {
 	if (strpbrk(sys, "*?"))
-		return add_tracepoint_multi_sys(list, idx, sys, event, error);
+		return add_tracepoint_multi_sys(list, idx, sys, event, err);
 	else
-		return add_tracepoint_event(list, idx, sys, event, error);
+		return add_tracepoint_event(list, idx, sys, event, err);
 }
 
 static int
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234791

FromJiri Olsa <jolsa@redhat.com>
Date2015-09-29 10:00 +0200
Message-ID<qdXZp-ds-27@gated-at.bofh.it>
In reply to#1234769
On Tue, Sep 29, 2015 at 03:52:09PM +0800, He Kuang wrote:
> hi, jirka
> 
> On 2015/9/29 15:20, Jiri Olsa wrote:
> >On Tue, Sep 29, 2015 at 09:14:10AM +0200, Jiri Olsa wrote:
> >
> >SNIP
> >
> >>>>$ gcc --version
> >>>>gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
> >>>>Copyright (C) 2010 Free Software Foundation, Inc.
> >>>>This is free software; see the source for copying conditions.  There is NO
> >>>>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> >>>>
> >>>>Cheers,
> >>>>Vinson
> >>>
> >>>Hi.
> >>>
> >>>This build error still occurs with next-20150929.
> >>
> >>attached patch should fix it
> >>
> >>FYI there's another instance of this bug in parse-events.c in
> >>Arnaldo's perf/core due to recent fixes, I'll send out fix shortly
> >
> >and here it is..
> >
> >He Kuang,
> >this might collide with your recent fixes..
> >
> 
> Do I need to send new ones based on your patch below now?

that'd be great.. also please make sure you don't reintroduce it

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234810

FromHe Kuang <hekuang@huawei.com>
Date2015-09-29 10:30 +0200
Message-ID<qdYsq-10X-7@gated-at.bofh.it>
In reply to#1234791

On 2015/9/29 15:57, Jiri Olsa wrote:
> On Tue, Sep 29, 2015 at 03:52:09PM +0800, He Kuang wrote:
>> hi, jirka
>>
>> On 2015/9/29 15:20, Jiri Olsa wrote:
>>> On Tue, Sep 29, 2015 at 09:14:10AM +0200, Jiri Olsa wrote:
>>>
>>> SNIP
>>>
>>>>>> $ gcc --version
>>>>>> gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
>>>>>> Copyright (C) 2010 Free Software Foundation, Inc.
>>>>>> This is free software; see the source for copying conditions.  There is NO
>>>>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>>>>>
>>>>>> Cheers,
>>>>>> Vinson
>>>>>
>>>>> Hi.
>>>>>
>>>>> This build error still occurs with next-20150929.
>>>>
>>>> attached patch should fix it
>>>>
>>>> FYI there's another instance of this bug in parse-events.c in
>>>> Arnaldo's perf/core due to recent fixes, I'll send out fix shortly
>>>
>>> and here it is..
>>>
>>> He Kuang,
>>> this might collide with your recent fixes..
>>>
>>
>> Do I need to send new ones based on your patch below now?
>
> that'd be great.. also please make sure you don't reintroduce it
>

I saw Ingo just accepted ACME's pull request which contains my patches,
then resend may reintroduce or conflict things, I will wait for ACME's
suggestion for my lack of experience in this.

Thank you.

> thanks,
> jirka
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234964

FromJiri Olsa <jolsa@redhat.com>
Date2015-09-29 12:50 +0200
Message-ID<qe0DU-44m-17@gated-at.bofh.it>
In reply to#1234810
On Tue, Sep 29, 2015 at 04:15:39PM +0800, He Kuang wrote:
> 
> 
> On 2015/9/29 15:57, Jiri Olsa wrote:
> >On Tue, Sep 29, 2015 at 03:52:09PM +0800, He Kuang wrote:
> >>hi, jirka
> >>
> >>On 2015/9/29 15:20, Jiri Olsa wrote:
> >>>On Tue, Sep 29, 2015 at 09:14:10AM +0200, Jiri Olsa wrote:
> >>>
> >>>SNIP
> >>>
> >>>>>>$ gcc --version
> >>>>>>gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
> >>>>>>Copyright (C) 2010 Free Software Foundation, Inc.
> >>>>>>This is free software; see the source for copying conditions.  There is NO
> >>>>>>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> >>>>>>
> >>>>>>Cheers,
> >>>>>>Vinson
> >>>>>
> >>>>>Hi.
> >>>>>
> >>>>>This build error still occurs with next-20150929.
> >>>>
> >>>>attached patch should fix it
> >>>>
> >>>>FYI there's another instance of this bug in parse-events.c in
> >>>>Arnaldo's perf/core due to recent fixes, I'll send out fix shortly
> >>>
> >>>and here it is..
> >>>
> >>>He Kuang,
> >>>this might collide with your recent fixes..
> >>>
> >>
> >>Do I need to send new ones based on your patch below now?
> >
> >that'd be great.. also please make sure you don't reintroduce it
> >
> 
> I saw Ingo just accepted ACME's pull request which contains my patches,
> then resend may reintroduce or conflict things, I will wait for ACME's
> suggestion for my lack of experience in this.

hum, I can see your changes in pull request to Ingo,
but not in acme's perf/core.. strange.. let's wait
for Arnaldo to sort it out ;-)

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235195

FromArnaldo Carvalho de Melo <acme@redhat.com>
Date2015-09-29 17:00 +0200
Message-ID<qe4xP-1b4-1@gated-at.bofh.it>
In reply to#1234964
Em Tue, Sep 29, 2015 at 12:41:47PM +0200, Jiri Olsa escreveu:
> On Tue, Sep 29, 2015 at 04:15:39PM +0800, He Kuang wrote:
> > 
> > 
> > On 2015/9/29 15:57, Jiri Olsa wrote:
> > >On Tue, Sep 29, 2015 at 03:52:09PM +0800, He Kuang wrote:
> > >>hi, jirka
> > >>
> > >>On 2015/9/29 15:20, Jiri Olsa wrote:
> > >>>On Tue, Sep 29, 2015 at 09:14:10AM +0200, Jiri Olsa wrote:
> > >>>
> > >>>SNIP
> > >>>
> > >>>>>>$ gcc --version
> > >>>>>>gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
> > >>>>>>Copyright (C) 2010 Free Software Foundation, Inc.
> > >>>>>>This is free software; see the source for copying conditions.  There is NO
> > >>>>>>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > >>>>>>
> > >>>>>>Cheers,
> > >>>>>>Vinson
> > >>>>>
> > >>>>>Hi.
> > >>>>>
> > >>>>>This build error still occurs with next-20150929.
> > >>>>
> > >>>>attached patch should fix it
> > >>>>
> > >>>>FYI there's another instance of this bug in parse-events.c in
> > >>>>Arnaldo's perf/core due to recent fixes, I'll send out fix shortly
> > >>>
> > >>>and here it is..
> > >>>
> > >>>He Kuang,
> > >>>this might collide with your recent fixes..
> > >>>
> > >>
> > >>Do I need to send new ones based on your patch below now?
> > >
> > >that'd be great.. also please make sure you don't reintroduce it
> > >
> > 
> > I saw Ingo just accepted ACME's pull request which contains my patches,
> > then resend may reintroduce or conflict things, I will wait for ACME's
> > suggestion for my lack of experience in this.
> 
> hum, I can see your changes in pull request to Ingo,
> but not in acme's perf/core.. strange.. let's wait
> for Arnaldo to sort it out ;-)

Sorry, probably I didn't push perf/core yesterday, just the
perf-core-for-mingo tag.

Anyway, please pull again, should have everything in there now plus some
patches I processed today.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235210 — [PATCH] perf tool: Fix shadowed declaration in parse-events.c

FromJiri Olsa <jolsa@redhat.com>
Date2015-09-29 17:10 +0200
Subject[PATCH] perf tool: Fix shadowed declaration in parse-events.c
Message-ID<qe4Hw-1BQ-21@gated-at.bofh.it>
In reply to#1235195
On Tue, Sep 29, 2015 at 11:52:59AM -0300, Arnaldo Carvalho de Melo wrote:

SNIP

> > > >>>
> > > >>
> > > >>Do I need to send new ones based on your patch below now?
> > > >
> > > >that'd be great.. also please make sure you don't reintroduce it
> > > >
> > > 
> > > I saw Ingo just accepted ACME's pull request which contains my patches,
> > > then resend may reintroduce or conflict things, I will wait for ACME's
> > > suggestion for my lack of experience in this.
> > 
> > hum, I can see your changes in pull request to Ingo,
> > but not in acme's perf/core.. strange.. let's wait
> > for Arnaldo to sort it out ;-)
> 
> Sorry, probably I didn't push perf/core yesterday, just the
> perf-core-for-mingo tag.
> 
> Anyway, please pull again, should have everything in there now plus some
> patches I processed today.

np, resending the patch rebase on your latest perf/core

thanks,
jirka


---
The error variable breaks build on CentOS 6.7, due to
collision with global error symbol:

    CC       util/parse-events.o
  cc1: warnings being treated as errors
  util/parse-events.c:419: error: declaration of ‘error’ shadows a global
  declaration
  util/util.h:135: error: shadowed declaration is here
  util/parse-events.c: In function ‘add_tracepoint_multi_event’:
  ...

Using different argument names instead to fix it.

Reported-by: Vinson Lee <vlee@twopensource.com>
Link: http://lkml.kernel.org/n/tip-i9mdgdbrgauy3fe76s9rd125@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/parse-events.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 5ffb356cbcc6..c01a44b18faf 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -389,7 +389,7 @@ int parse_events_add_cache(struct list_head *list, int *idx,
 	return add_event(list, idx, &attr, name, NULL);
 }
 
-static void tracepoint_error(struct parse_events_error *error, int err,
+static void tracepoint_error(struct parse_events_error *e, int err,
 			     char *sys, char *name)
 {
 	char help[BUFSIZ];
@@ -402,30 +402,30 @@ static void tracepoint_error(struct parse_events_error *error, int err,
 
 	switch (err) {
 	case EACCES:
-		error->str = strdup("can't access trace events");
+		e->str = strdup("can't access trace events");
 		break;
 	case ENOENT:
-		error->str = strdup("unknown tracepoint");
+		e->str = strdup("unknown tracepoint");
 		break;
 	default:
-		error->str = strdup("failed to add tracepoint");
+		e->str = strdup("failed to add tracepoint");
 		break;
 	}
 
 	tracing_path__strerror_open_tp(err, help, sizeof(help), sys, name);
-	error->help = strdup(help);
+	e->help = strdup(help);
 }
 
 static int add_tracepoint(struct list_head *list, int *idx,
 			  char *sys_name, char *evt_name,
-			  struct parse_events_error *error __maybe_unused,
+			  struct parse_events_error *err,
 			  struct list_head *head_config)
 {
 	struct perf_evsel *evsel;
 
 	evsel = perf_evsel__newtp_idx(sys_name, evt_name, (*idx)++);
 	if (IS_ERR(evsel)) {
-		tracepoint_error(error, PTR_ERR(evsel), sys_name, evt_name);
+		tracepoint_error(err, PTR_ERR(evsel), sys_name, evt_name);
 		return PTR_ERR(evsel);
 	}
 
@@ -443,7 +443,7 @@ static int add_tracepoint(struct list_head *list, int *idx,
 
 static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 				      char *sys_name, char *evt_name,
-				      struct parse_events_error *error,
+				      struct parse_events_error *err,
 				      struct list_head *head_config)
 {
 	char evt_path[MAXPATHLEN];
@@ -454,7 +454,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 	snprintf(evt_path, MAXPATHLEN, "%s/%s", tracing_events_path, sys_name);
 	evt_dir = opendir(evt_path);
 	if (!evt_dir) {
-		tracepoint_error(error, errno, sys_name, evt_name);
+		tracepoint_error(err, errno, sys_name, evt_name);
 		return -1;
 	}
 
@@ -469,7 +469,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 			continue;
 
 		ret = add_tracepoint(list, idx, sys_name, evt_ent->d_name,
-				     error, head_config);
+				     err, head_config);
 	}
 
 	closedir(evt_dir);
@@ -478,19 +478,19 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 
 static int add_tracepoint_event(struct list_head *list, int *idx,
 				char *sys_name, char *evt_name,
-				struct parse_events_error *error,
+				struct parse_events_error *err,
 				struct list_head *head_config)
 {
 	return strpbrk(evt_name, "*?") ?
 	       add_tracepoint_multi_event(list, idx, sys_name, evt_name,
-					  error, head_config) :
+					  err, head_config) :
 	       add_tracepoint(list, idx, sys_name, evt_name,
-			      error, head_config);
+			      err, head_config);
 }
 
 static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 				    char *sys_name, char *evt_name,
-				    struct parse_events_error *error,
+				    struct parse_events_error *err,
 				    struct list_head *head_config)
 {
 	struct dirent *events_ent;
@@ -499,7 +499,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 
 	events_dir = opendir(tracing_events_path);
 	if (!events_dir) {
-		tracepoint_error(error, errno, sys_name, evt_name);
+		tracepoint_error(err, errno, sys_name, evt_name);
 		return -1;
 	}
 
@@ -515,7 +515,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 			continue;
 
 		ret = add_tracepoint_event(list, idx, events_ent->d_name,
-					   evt_name, error, head_config);
+					   evt_name, err, head_config);
 	}
 
 	closedir(events_dir);
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1237061 — [tip:perf/core] perf tools: Fix shadowed declaration in parse-events.c

Fromtip-bot for Jiri Olsa <tipbot@zytor.com>
Date2015-10-01 09:20 +0200
Subject[tip:perf/core] perf tools: Fix shadowed declaration in parse-events.c
Message-ID<qeGjM-58Q-11@gated-at.bofh.it>
In reply to#1235210
Commit-ID:  272ed29a91aea4397c05157dea7210dd7e81557a
Gitweb:     http://git.kernel.org/tip/272ed29a91aea4397c05157dea7210dd7e81557a
Author:     Jiri Olsa <jolsa@redhat.com>
AuthorDate: Tue, 29 Sep 2015 17:05:31 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 30 Sep 2015 18:34:23 -0300

perf tools: Fix shadowed declaration in parse-events.c

The error variable breaks build on CentOS 6.7, due to a collision with a
global error symbol:

    CC       util/parse-events.o
  cc1: warnings being treated as errors
  util/parse-events.c:419: error: declaration of ‘error’ shadows a global
  declaration
  util/util.h:135: error: shadowed declaration is here
  util/parse-events.c: In function ‘add_tracepoint_multi_event’:
  ...

Using different argument names instead to fix it.

Reported-by: Vinson Lee <vlee@twopensource.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: linux-tip-commits@vger.kernel.org
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Raphael Beamonte <raphael.beamonte@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150929150531.GI27383@krava.redhat.com
[ Fix one more case, at line 770 ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 5ffb356..c1c64fb 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -389,7 +389,7 @@ int parse_events_add_cache(struct list_head *list, int *idx,
 	return add_event(list, idx, &attr, name, NULL);
 }
 
-static void tracepoint_error(struct parse_events_error *error, int err,
+static void tracepoint_error(struct parse_events_error *e, int err,
 			     char *sys, char *name)
 {
 	char help[BUFSIZ];
@@ -402,30 +402,30 @@ static void tracepoint_error(struct parse_events_error *error, int err,
 
 	switch (err) {
 	case EACCES:
-		error->str = strdup("can't access trace events");
+		e->str = strdup("can't access trace events");
 		break;
 	case ENOENT:
-		error->str = strdup("unknown tracepoint");
+		e->str = strdup("unknown tracepoint");
 		break;
 	default:
-		error->str = strdup("failed to add tracepoint");
+		e->str = strdup("failed to add tracepoint");
 		break;
 	}
 
 	tracing_path__strerror_open_tp(err, help, sizeof(help), sys, name);
-	error->help = strdup(help);
+	e->help = strdup(help);
 }
 
 static int add_tracepoint(struct list_head *list, int *idx,
 			  char *sys_name, char *evt_name,
-			  struct parse_events_error *error __maybe_unused,
+			  struct parse_events_error *err,
 			  struct list_head *head_config)
 {
 	struct perf_evsel *evsel;
 
 	evsel = perf_evsel__newtp_idx(sys_name, evt_name, (*idx)++);
 	if (IS_ERR(evsel)) {
-		tracepoint_error(error, PTR_ERR(evsel), sys_name, evt_name);
+		tracepoint_error(err, PTR_ERR(evsel), sys_name, evt_name);
 		return PTR_ERR(evsel);
 	}
 
@@ -443,7 +443,7 @@ static int add_tracepoint(struct list_head *list, int *idx,
 
 static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 				      char *sys_name, char *evt_name,
-				      struct parse_events_error *error,
+				      struct parse_events_error *err,
 				      struct list_head *head_config)
 {
 	char evt_path[MAXPATHLEN];
@@ -454,7 +454,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 	snprintf(evt_path, MAXPATHLEN, "%s/%s", tracing_events_path, sys_name);
 	evt_dir = opendir(evt_path);
 	if (!evt_dir) {
-		tracepoint_error(error, errno, sys_name, evt_name);
+		tracepoint_error(err, errno, sys_name, evt_name);
 		return -1;
 	}
 
@@ -469,7 +469,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 			continue;
 
 		ret = add_tracepoint(list, idx, sys_name, evt_ent->d_name,
-				     error, head_config);
+				     err, head_config);
 	}
 
 	closedir(evt_dir);
@@ -478,19 +478,19 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
 
 static int add_tracepoint_event(struct list_head *list, int *idx,
 				char *sys_name, char *evt_name,
-				struct parse_events_error *error,
+				struct parse_events_error *err,
 				struct list_head *head_config)
 {
 	return strpbrk(evt_name, "*?") ?
 	       add_tracepoint_multi_event(list, idx, sys_name, evt_name,
-					  error, head_config) :
+					  err, head_config) :
 	       add_tracepoint(list, idx, sys_name, evt_name,
-			      error, head_config);
+			      err, head_config);
 }
 
 static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 				    char *sys_name, char *evt_name,
-				    struct parse_events_error *error,
+				    struct parse_events_error *err,
 				    struct list_head *head_config)
 {
 	struct dirent *events_ent;
@@ -499,7 +499,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 
 	events_dir = opendir(tracing_events_path);
 	if (!events_dir) {
-		tracepoint_error(error, errno, sys_name, evt_name);
+		tracepoint_error(err, errno, sys_name, evt_name);
 		return -1;
 	}
 
@@ -515,7 +515,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
 			continue;
 
 		ret = add_tracepoint_event(list, idx, events_ent->d_name,
-					   evt_name, error, head_config);
+					   evt_name, err, head_config);
 	}
 
 	closedir(events_dir);
@@ -767,23 +767,23 @@ do {								\
 
 int parse_events_add_tracepoint(struct list_head *list, int *idx,
 				char *sys, char *event,
-				struct parse_events_error *error,
+				struct parse_events_error *err,
 				struct list_head *head_config)
 {
 	if (head_config) {
 		struct perf_event_attr attr;
 
-		if (config_attr(&attr, head_config, error,
+		if (config_attr(&attr, head_config, err,
 				config_term_tracepoint))
 			return -EINVAL;
 	}
 
 	if (strpbrk(sys, "*?"))
 		return add_tracepoint_multi_sys(list, idx, sys, event,
-						error, head_config);
+						err, head_config);
 	else
 		return add_tracepoint_event(list, idx, sys, event,
-					    error, head_config);
+					    err, head_config);
 }
 
 int parse_events_add_numeric(struct parse_events_evlist *data,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234793

FromHe Kuang <hekuang@huawei.com>
Date2015-09-29 10:00 +0200
Message-ID<qdXZp-ds-29@gated-at.bofh.it>
In reply to#1234769
hi, jirka

On 2015/9/29 15:20, Jiri Olsa wrote:
> On Tue, Sep 29, 2015 at 09:14:10AM +0200, Jiri Olsa wrote:
>
> SNIP
>
>>>> $ gcc --version
>>>> gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
>>>> Copyright (C) 2010 Free Software Foundation, Inc.
>>>> This is free software; see the source for copying conditions.  There is NO
>>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>>>
>>>> Cheers,
>>>> Vinson
>>>
>>> Hi.
>>>
>>> This build error still occurs with next-20150929.
>>
>> attached patch should fix it
>>
>> FYI there's another instance of this bug in parse-events.c in
>> Arnaldo's perf/core due to recent fixes, I'll send out fix shortly
>
> and here it is..
>
> He Kuang,
> this might collide with your recent fixes..
>

Do I need to send new ones based on your patch below now?

> jirka
>
>
> ---
> The error variable breaks build on CentOS 6.7, due to
> collision with global error symbol:
>
>      CC       util/parse-events.o
>    cc1: warnings being treated as errors
>    util/parse-events.c:419: error: declaration of ‘error’ shadows a global
>    declaration
>    util/util.h:135: error: shadowed declaration is here
>    util/parse-events.c: In function ‘add_tracepoint_multi_event’:
>    ...
>
> Using different argument names instead to fix it.
>
> Reported-by: Vinson Lee <vlee@twopensource.com>
> Link: http://lkml.kernel.org/n/tip-ujp5f63wvy70jlzeh3rt5f98@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>   tools/perf/util/parse-events.c |   38 +++++++++++++++++++-------------------
>   1 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
> index 61c2bc2..626bf85 100644
> --- a/tools/perf/util/parse-events.c
> +++ b/tools/perf/util/parse-events.c
> @@ -387,7 +387,7 @@ int parse_events_add_cache(struct list_head *list, int *idx,
>   	return add_event(list, idx, &attr, name, NULL);
>   }
>
> -static void tracepoint_error(struct parse_events_error *error, int err,
> +static void tracepoint_error(struct parse_events_error *e, int err,
>   			     char *sys, char *name)
>   {
>   	char help[BUFSIZ];
> @@ -400,29 +400,29 @@ static void tracepoint_error(struct parse_events_error *error, int err,
>
>   	switch (err) {
>   	case EACCES:
> -		error->str = strdup("can't access trace events");
> +		e->str = strdup("can't access trace events");
>   		break;
>   	case ENOENT:
> -		error->str = strdup("unknown tracepoint");
> +		e->str = strdup("unknown tracepoint");
>   		break;
>   	default:
> -		error->str = strdup("failed to add tracepoint");
> +		e->str = strdup("failed to add tracepoint");
>   		break;
>   	}
>
>   	tracing_path__strerror_open_tp(err, help, sizeof(help), sys, name);
> -	error->help = strdup(help);
> +	e->help = strdup(help);
>   }
>
>   static int add_tracepoint(struct list_head *list, int *idx,
>   			  char *sys_name, char *evt_name,
> -			  struct parse_events_error *error __maybe_unused)
> +			  struct parse_events_error *err __maybe_unused)
>   {
>   	struct perf_evsel *evsel;
>
>   	evsel = perf_evsel__newtp_idx(sys_name, evt_name, (*idx)++);
>   	if (IS_ERR(evsel)) {
> -		tracepoint_error(error, PTR_ERR(evsel), sys_name, evt_name);
> +		tracepoint_error(err, PTR_ERR(evsel), sys_name, evt_name);
>   		return PTR_ERR(evsel);
>   	}
>
> @@ -432,7 +432,7 @@ static int add_tracepoint(struct list_head *list, int *idx,
>
>   static int add_tracepoint_multi_event(struct list_head *list, int *idx,
>   				      char *sys_name, char *evt_name,
> -				      struct parse_events_error *error)
> +				      struct parse_events_error *err)
>   {
>   	char evt_path[MAXPATHLEN];
>   	struct dirent *evt_ent;
> @@ -442,7 +442,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
>   	snprintf(evt_path, MAXPATHLEN, "%s/%s", tracing_events_path, sys_name);
>   	evt_dir = opendir(evt_path);
>   	if (!evt_dir) {
> -		tracepoint_error(error, errno, sys_name, evt_name);
> +		tracepoint_error(err, errno, sys_name, evt_name);
>   		return -1;
>   	}
>
> @@ -456,7 +456,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
>   		if (!strglobmatch(evt_ent->d_name, evt_name))
>   			continue;
>
> -		ret = add_tracepoint(list, idx, sys_name, evt_ent->d_name, error);
> +		ret = add_tracepoint(list, idx, sys_name, evt_ent->d_name, err);
>   	}
>
>   	closedir(evt_dir);
> @@ -465,16 +465,16 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
>
>   static int add_tracepoint_event(struct list_head *list, int *idx,
>   				char *sys_name, char *evt_name,
> -				struct parse_events_error *error)
> +				struct parse_events_error *err)
>   {
>   	return strpbrk(evt_name, "*?") ?
> -	       add_tracepoint_multi_event(list, idx, sys_name, evt_name, error) :
> -	       add_tracepoint(list, idx, sys_name, evt_name, error);
> +	       add_tracepoint_multi_event(list, idx, sys_name, evt_name, err) :
> +	       add_tracepoint(list, idx, sys_name, evt_name, err);
>   }
>
>   static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
>   				    char *sys_name, char *evt_name,
> -				    struct parse_events_error *error)
> +				    struct parse_events_error *err)
>   {
>   	struct dirent *events_ent;
>   	DIR *events_dir;
> @@ -482,7 +482,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
>
>   	events_dir = opendir(tracing_events_path);
>   	if (!events_dir) {
> -		tracepoint_error(error, errno, sys_name, evt_name);
> +		tracepoint_error(err, errno, sys_name, evt_name);
>   		return -1;
>   	}
>
> @@ -498,7 +498,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
>   			continue;
>
>   		ret = add_tracepoint_event(list, idx, events_ent->d_name,
> -					   evt_name, error);
> +					   evt_name, err);
>   	}
>
>   	closedir(events_dir);
> @@ -507,12 +507,12 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
>
>   int parse_events_add_tracepoint(struct list_head *list, int *idx,
>   				char *sys, char *event,
> -				struct parse_events_error *error)
> +				struct parse_events_error *err)
>   {
>   	if (strpbrk(sys, "*?"))
> -		return add_tracepoint_multi_sys(list, idx, sys, event, error);
> +		return add_tracepoint_multi_sys(list, idx, sys, event, err);
>   	else
> -		return add_tracepoint_event(list, idx, sys, event, error);
> +		return add_tracepoint_event(list, idx, sys, event, err);
>   }
>
>   static int
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web