From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D4CC43381 for ; Tue, 19 Mar 2019 16:54:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 487DC20835 for ; Tue, 19 Mar 2019 16:54:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BEL9vE1t"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="CdSxpbg7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 487DC20835 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rBMJVaaTgipvRxyTPULyk7tHNxulFPUYcOWL6eXZBgQ=; b=BEL9vE1tElk1Yt G0J/FLAfFfUz3MkJJpYmh9nLcbPpgTqfwC0wfBqQWPn1AJBrYcnIkwEnnfd2MPUPMpavg4t1q9XQn uTsdBEMIs2NMv48SpyiFNvQd4dtCOwZt4Sc0hoRj8pEauBdRMzlY6r+O1wbUvyge5LKCSr95g549e AHdaBYcbVdbVdH3dXmIHGpUvpGK1L84OnSuyLyPJQAMdckM5LmzMwjDxQiWcXHwZ99SWUsTB5jLZP kwJPeoi381F9l36BBvE6ywh1G5u5tDzo/O+IantjddahobZZsCpYDvYiGDzbCuiQlSPy1vgpWKkTH xiWnDQuRXrqi2P8wnI2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6I03-0001hi-By; Tue, 19 Mar 2019 16:54:03 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6I01-0001hU-PB for linux-arm-kernel@bombadil.infradead.org; Tue, 19 Mar 2019 16:54:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YzAUO7LVnUugKZaOPcx1VJc0nz0jOvjrHkAcAwuRGmA=; b=CdSxpbg7kMFNEaAQAtTRaiTBJ aEpzkvgl3YALzL38oDcRfTjbyD8+KEK2T8pAONjS43CVfKJo2CtlYzSgKFZm+xbIoheHzXP5oZT3x Jb7dgbx+6KFMYkZ4JwQGZ/O5yO7GXVGLNMceCz7d+zfj33q37lNA2QfJcxXl4C/7QhmikpQqrBB1+ 5y5fKxvwjJ7cOiCEwHZX6O7NEIR9Y5XwOZSDoHKiTHsrx0K7/gcrmBVR5dzPBWhJ2WR4pUzuVQTTb Dldtbz+BtngrsJSxE4jwv0YSPdUiSiR9J8CcOCfZOVaz9ix6N9eI+bo9xV2N5oZsayMlOGomUhGzP U5m68a77Q==; Received: from [179.97.35.11] (helo=quaco.ghostprotocols.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6Hzz-0002KF-Fw; Tue, 19 Mar 2019 16:53:59 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A67CD4039C; Tue, 19 Mar 2019 13:53:56 -0300 (-03) Date: Tue, 19 Mar 2019 13:53:56 -0300 From: Arnaldo Carvalho de Melo To: Mathieu Poirier Subject: Re: [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info Message-ID: <20190319165356.GH3029@kernel.org> References: <20190315022649.17848-1-yuehaibing@huawei.com> <20190318171518.GH22548@kernel.org> <20190319144631.GE3029@kernel.org> <20190319145525.GA7394@xps15> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190319145525.GA7394@xps15> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Suzuki K. Poulose" , Peter Zijlstra , Yue Haibing , Arnaldo Carvalho de Melo , Linux Kernel Mailing List , Alexander Shishkin , Ingo Molnar , Namhyung Kim , Jiri Olsa , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Tue, Mar 19, 2019 at 08:55:25AM -0600, Mathieu Poirier escreveu: > On Tue, Mar 19, 2019 at 11:46:31AM -0300, Arnaldo Carvalho de Melo wrote: > > 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 > > > wrote: > > > > > > > > Em Fri, Mar 15, 2019 at 10:26:49AM +0800, Yue Haibing escreveu: > > > > > From: YueHaibing > > > > > > > > > > '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? > > Proceeding with the patches below would created two new bugs, hence asking Yue > for modifications. Ok, I'll take your word on it then, dropping the patches. - Arnaldo > Mathieu > > > > > - Arnaldo > > > > From 6c5c248935a4da12a582b1518a38ec35044833ee Mon Sep 17 00:00:00 2001 > > From: YueHaibing > > 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 > > Cc: Alexander Shishkin > > Cc: Jiri Olsa > > Cc: Mathieu Poirier > > Cc: Namhyung Kim > > Cc: Peter Zijlstra > > Cc: Suzuki K Poulouse > > 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 > > --- > > 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 > > 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 > > Cc: Alexander Shishkin > > Cc: Jiri Olsa > > Cc: Mathieu Poirier > > Cc: Namhyung Kim > > Cc: Peter Zijlstra > > Cc: Suzuki K Poulouse > > 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 > > --- > > 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 > > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel