From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: "Suzuki K. Poulose" <suzuki.poulose@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Yue Haibing <yuehaibing@huawei.com>,
Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info
Date: Tue, 19 Mar 2019 11:46:31 -0300 [thread overview]
Message-ID: <20190319144631.GE3029@kernel.org> (raw)
In-Reply-To: <CANLsYkzU25wAx0dMQqMVZ2asx+z-taOfffLO7DMd6mkDXc7D9A@mail.gmail.com>
Em Tue, Mar 19, 2019 at 08:38:32AM -0600, Mathieu Poirier escreveu:
> On Mon, 18 Mar 2019 at 11:15, Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> >
> > Em Fri, Mar 15, 2019 at 10:26:49AM +0800, Yue Haibing escreveu:
> > > From: YueHaibing <yuehaibing@huawei.com>
> > >
> > > 'err' is set in err path, but it's not returned to callers.
> > > Also fix a pass zero to PTR_ERR issue.
> >
> > Next time please submit two patches, one for the PTR_ERR and another for
> > not throwing away the err = -E!INVAL and returning just -EINVAL, I'm
> > doing it this time.
> >
>
> Please hold off on that - I've asked for other modifications to be
> done on this patch.
Do you really think that it is necessary to hold? The fixes are trivial
and I already have them split and applied, see them below, I think
whatever other changes can be done in further patches, no?
- Arnaldo
From 6c5c248935a4da12a582b1518a38ec35044833ee Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 15 Mar 2019 10:26:49 +0800
Subject: [PATCH 24/42] perf cs-etm: return errcode in
cs_etm__process_auxtrace_info()
'err' is set in err path, but it's not returned to callers. Don't always return
-EINVAL, return err.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
Link: http://lkml.kernel.org/r/20190315022649.17848-1-yuehaibing@huawei.com
[ split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/cs-etm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 110804936fc3..2257ac4dbff2 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -2023,5 +2023,5 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
err_free_hdr:
zfree(&hdr);
- return -EINVAL;
+ return err;
}
--
2.20.1
From 4ab1e71e45a91220bdca7fc3b79c600df81d9234 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 15 Mar 2019 10:26:49 +0800
Subject: [PATCH 25/42] perf cs-etm: Remove errnoeous ERR_PTR() usage in in
cs_etm__process_auxtrace_info
intlist__findnew() doesn't uses ERR_PTR() as a return mechanism so its callers
shouldn't try to extract the error using PTR_ERR(ret-from-intlist__findnew()),
make cs_etm__process_auxtrace_info9) return -ENOMEM instead.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
Link: http://lkml.kernel.org/r/20190315022649.17848-1-yuehaibing@huawei.com
[ split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/cs-etm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 2257ac4dbff2..111f33cd1204 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -1908,7 +1908,7 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
/* Something went wrong, no need to continue */
if (!inode) {
- err = PTR_ERR(inode);
+ err = -ENOMEM;
goto err_free_metadata;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
Yue Haibing <yuehaibing@huawei.com>,
"Suzuki K. Poulose" <suzuki.poulose@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info
Date: Tue, 19 Mar 2019 11:46:31 -0300 [thread overview]
Message-ID: <20190319144631.GE3029@kernel.org> (raw)
In-Reply-To: <CANLsYkzU25wAx0dMQqMVZ2asx+z-taOfffLO7DMd6mkDXc7D9A@mail.gmail.com>
Em Tue, Mar 19, 2019 at 08:38:32AM -0600, Mathieu Poirier escreveu:
> On Mon, 18 Mar 2019 at 11:15, Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> >
> > Em Fri, Mar 15, 2019 at 10:26:49AM +0800, Yue Haibing escreveu:
> > > From: YueHaibing <yuehaibing@huawei.com>
> > >
> > > 'err' is set in err path, but it's not returned to callers.
> > > Also fix a pass zero to PTR_ERR issue.
> >
> > Next time please submit two patches, one for the PTR_ERR and another for
> > not throwing away the err = -E!INVAL and returning just -EINVAL, I'm
> > doing it this time.
> >
>
> Please hold off on that - I've asked for other modifications to be
> done on this patch.
Do you really think that it is necessary to hold? The fixes are trivial
and I already have them split and applied, see them below, I think
whatever other changes can be done in further patches, no?
- Arnaldo
From 6c5c248935a4da12a582b1518a38ec35044833ee Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 15 Mar 2019 10:26:49 +0800
Subject: [PATCH 24/42] perf cs-etm: return errcode in
cs_etm__process_auxtrace_info()
'err' is set in err path, but it's not returned to callers. Don't always return
-EINVAL, return err.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
Link: http://lkml.kernel.org/r/20190315022649.17848-1-yuehaibing@huawei.com
[ split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/cs-etm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 110804936fc3..2257ac4dbff2 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -2023,5 +2023,5 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
err_free_hdr:
zfree(&hdr);
- return -EINVAL;
+ return err;
}
--
2.20.1
From 4ab1e71e45a91220bdca7fc3b79c600df81d9234 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 15 Mar 2019 10:26:49 +0800
Subject: [PATCH 25/42] perf cs-etm: Remove errnoeous ERR_PTR() usage in in
cs_etm__process_auxtrace_info
intlist__findnew() doesn't uses ERR_PTR() as a return mechanism so its callers
shouldn't try to extract the error using PTR_ERR(ret-from-intlist__findnew()),
make cs_etm__process_auxtrace_info9) return -ENOMEM instead.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
Link: http://lkml.kernel.org/r/20190315022649.17848-1-yuehaibing@huawei.com
[ split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/cs-etm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 2257ac4dbff2..111f33cd1204 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -1908,7 +1908,7 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
/* Something went wrong, no need to continue */
if (!inode) {
- err = PTR_ERR(inode);
+ err = -ENOMEM;
goto err_free_metadata;
}
--
2.20.1
next prev parent reply other threads:[~2019-03-19 14:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 2:26 [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info Yue Haibing
2019-03-15 2:26 ` Yue Haibing
2019-03-18 17:13 ` Mathieu Poirier
2019-03-18 17:13 ` Mathieu Poirier
2019-03-18 17:15 ` Arnaldo Carvalho de Melo
2019-03-18 17:15 ` Arnaldo Carvalho de Melo
2019-03-19 14:38 ` Mathieu Poirier
2019-03-19 14:38 ` Mathieu Poirier
2019-03-19 14:46 ` Arnaldo Carvalho de Melo [this message]
2019-03-19 14:46 ` Arnaldo Carvalho de Melo
2019-03-19 14:55 ` Mathieu Poirier
2019-03-19 14:55 ` Mathieu Poirier
2019-03-19 15:12 ` YueHaibing
2019-03-19 15:12 ` YueHaibing
2019-03-19 16:53 ` Arnaldo Carvalho de Melo
2019-03-19 16:53 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190319144631.GE3029@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=arnaldo.melo@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=suzuki.poulose@arm.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.