[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANLsYkzU25wAx0dMQqMVZ2asx+z-taOfffLO7DMd6mkDXc7D9A@mail.gmail.com>
Date: Tue, 19 Mar 2019 08:38:32 -0600
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc: Yue Haibing <yuehaibing@...wei.com>,
"Suzuki K. Poulose" <suzuki.poulose@....com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info
On Mon, 18 Mar 2019 at 11:15, Arnaldo Carvalho de Melo
<arnaldo.melo@...il.com> wrote:
>
> Em Fri, Mar 15, 2019 at 10:26:49AM +0800, Yue Haibing escreveu:
> > From: YueHaibing <yuehaibing@...wei.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.
Mathieu
> - Arnaldo
>
> > Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
> > Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> > ---
> > tools/perf/util/cs-etm.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
> > index 1108049..111f33c 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;
> > }
> >
> > @@ -2023,5 +2023,5 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
> > err_free_hdr:
> > zfree(&hdr);
> >
> > - return -EINVAL;
> > + return err;
> > }
> > --
> > 2.7.0
> >
>
> --
>
> - Arnaldo
Powered by blists - more mailing lists