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 199C3C43381 for ; Tue, 19 Mar 2019 14:46:44 +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 DDAE02175B for ; Tue, 19 Mar 2019 14:46:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FH326H3u"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ZZueUs9Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDAE02175B 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=IJv1/CMiI0nEzY41TXKh7IkuV4kx1rg/HFvnyRN/8M0=; b=FH326H3ujY4kSO peepkbDTsgfV6P6aEPcddv13DefX3F0FR4JjZ29LgSJqzbt7eZ6At8VbFNNm4mJeUbnjHZBlc2IXu cRLwd1wxI+Axmjuf7XaFTzuNONTvrZr0wMrWNo8wROpJP/DK5kzXORuRKuPL/EOS07W7YhyTIzUmf X5FwDrDkulzetJ+OXOnRmhAKjbBu3dJqvHuAQQPTrumRGSsi39/67EElipetLlCVgmmhUzgZUi31r 30g+4tJty1wB4y4kVfXO4Gpr7EWK45GTUa2dkP7l/lXBmeNNH9QU2IPyfCCUiPR2sCfjnTYF4gC8V q+PmSfGuCQaGNrn8rS3Q==; 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 1h6G0k-0004I6-P3; Tue, 19 Mar 2019 14:46:38 +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 1h6G0i-0004Hm-Fr for linux-arm-kernel@bombadil.infradead.org; Tue, 19 Mar 2019 14:46:36 +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=eyU1R0yIwpptDyrRfTZwBIyDTGolCltYsBnryjXkS3c=; b=ZZueUs9Yv5nIyGMqv2LSE7PLE VtMqhvzCHA0ZFUQu9asEZ3yfcSt/wwP7MtdPSmo5hhWBxBp+De4dtY2NIFiegy+dMeG8tEmBgFA6a DXTO3hnbj+tOcF9O3gvhQr+090tZa/WOiRetxYh9yNXVOkT6j6hkhQ1hdwjKZHIL9JTvISJEqidCn Rq0XkTzxxxYNnLrLJjBcWBpbM62YNuAVpz1i8arPMchcY02vg7mbJm/lOPHKZlGMVcXabaffG9aaa Zj+mRH5fkIluxvuUXg74ImcFYMZ5FREtDVE3Ub5WgVEOhnKiRbzY7rD24DP4lwLhp+lla8u2Y1Rsz EJdZLyCAQ==; 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 1h6G0g-0001Gf-3K; Tue, 19 Mar 2019 14:46:34 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 301B04039C; Tue, 19 Mar 2019 11:46:31 -0300 (-03) Date: Tue, 19 Mar 2019 11:46:31 -0300 From: Arnaldo Carvalho de Melo To: Mathieu Poirier Subject: Re: [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info Message-ID: <20190319144631.GE3029@kernel.org> References: <20190315022649.17848-1-yuehaibing@huawei.com> <20190318171518.GH22548@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: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? - 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel