Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1715491pxb; Thu, 14 Apr 2022 12:16:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyrI+K1cF9MOqLS7kS4iCfzPAcw6rVgIUkwraQII8tSmjK/z/7kds0TF9r1llXQI9j8Frh X-Received: by 2002:a17:907:2cc3:b0:6da:e6cb:2efa with SMTP id hg3-20020a1709072cc300b006dae6cb2efamr3512377ejc.169.1649963793853; Thu, 14 Apr 2022 12:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649963793; cv=none; d=google.com; s=arc-20160816; b=yULq2+rT3njUJcCpcSTiGBGb/uhcf+mFyjs6o5BYN3sRiSOm6dO7LFa+ABSzLoU0K1 asITOY/NTymtc+X+gPsDlo8K4GI9GiLzwknOF/cS876sXkgqZySpG2sxuLM4ihzpW6Sd lhVPv5/a5zdWRd+nDAQtP75BHoX2EdE0wD+GsBWRbtKlKpMgtKB+OQvNRnPsK98vT/IR 9s1azJb3ZxS5F4AHl3x76NQgSrhuSE1W9DOItTgWGXtxIuQAQng+QLxM9cRdTzLAbff8 d/DEwrhKY/12MSgrRA9D0UdTgLkGDOSS9dmQ0Z4aURdhreVdRH0Dg35uyoA/J7HVlBDz JVUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=56o3M/QEi7hmuo0ABMrMLZbKEaLc2v61ycU2iMbtP84=; b=fBXc2kHUtfn5KsqtlFA6Y7syfLyrQrkKGbz98YBwF1Ax4J2Zm5F++23j/Y0muIVucl zenI1Zn6CPDivp/gKSkDuArkvc2fx0lcavX5NAgKNJO+M5mAH3SIANiQWj/IR7xDyUp1 faGNF66+CJ54qrqfj9PXvGURPs2/U0rPZ7sEB+rbAQl7+1UjNpmzA6ijn5a9eZVwICz6 wBA92v96BP13qpYEYmh1aO7gtdutgc0+EZlS6gavvFOmG294xlCfd419hIBybwSzGccV l/Mh44VvblTUNcP1vQWYBxlFzNTiBnOiKn+9f9znC73ONjeGXok/HFyrf2QwKdCsNs0X I77g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs1-20020a170906f18100b006df76385c62si2614056ejb.258.2022.04.14.12.16.07; Thu, 14 Apr 2022 12:16:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243672AbiDNNBi (ORCPT + 99 others); Thu, 14 Apr 2022 09:01:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238742AbiDNNBf (ORCPT ); Thu, 14 Apr 2022 09:01:35 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF38F92865; Thu, 14 Apr 2022 05:59:10 -0700 (PDT) Received: from fraeml704-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KfKGs19YDz688j4; Thu, 14 Apr 2022 20:56:53 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml704-chm.china.huawei.com (10.206.15.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Thu, 14 Apr 2022 14:59:06 +0200 Received: from [10.47.27.241] (10.47.27.241) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 14 Apr 2022 13:59:05 +0100 Message-ID: <40f03ea6-1690-8a6f-2969-24c47f39c215@huawei.com> Date: Thu, 14 Apr 2022 14:00:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver To: Yicong Yang , Yicong Yang , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , References: <20220407125841.3678-1-yangyicong@hisilicon.com> <20220407125841.3678-6-yangyicong@hisilicon.com> <276c24d2-daf5-5eba-26b9-55edd4a45537@huawei.com> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.47.27.241] X-ClientProxiedBy: lhreml714-chm.china.huawei.com (10.201.108.65) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/04/2022 08:41, Yicong Yang wrote: >>> +    hisi_ptt_pmus = zalloc(sizeof(struct perf_pmu *) * (*nr_ptts)); >>> +    if (!hisi_ptt_pmus) { >>> +        pr_err("hisi_ptt alloc failed\n"); >>> +        *err = -ENOMEM; >> using PTR_ERR seems better, if possible >> > ok will change to that. *err = -ENOMEM is used here to keep consistence with > what spe does. > Ah, I see that we are contrained by the interface of auxtrace_record_init() to pass err as a pointer, so I suppose the code in this patch is ok to fit into that.