Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp72137pxb; Wed, 30 Mar 2022 23:27:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhAk79i2/8q4CFdweljMuqNziFhrrdJPzddzeUmtw+K5MNJCo1WQX7H9lDfGH4IvdZEtan X-Received: by 2002:a17:907:869f:b0:6da:888b:4258 with SMTP id qa31-20020a170907869f00b006da888b4258mr3675046ejc.720.1648708032327; Wed, 30 Mar 2022 23:27:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648708032; cv=none; d=google.com; s=arc-20160816; b=euRCw34HYEE5nr7I/8E48afrFprx6PIG4q8r1gC+UrpcfdrqVDTLumHZqIFssZIZZu 1GDw+UHdlIvVH07rfhGClW+yDiHppsz/ZjO7wdH7uFdRpWrXnZVPI56jSdnQ9m6V8Mu6 MzWpFCmxU6jjuFntoMMqBXXICJjYgKf1cMGtW0q6MNdR8hhrTOV7jsuY2aBT08NR17yP Aylmv/BPilIktix2ybURP1X3abnTit4/KZByjnsC3doycMU8vLoE+MMkoHlYzz4dfz7I EJSQzfixDqb3Zq7niqxiiDKLu7eKIOzKXDOmEIWqHLpV2jrYdv1mAqGElDyLGwmNLl7S 5ILQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=BrVp20BmQjd9WSbsMvWT5kt24UKCTLgZvgR7hPflW5I=; b=Lun0eHXiNdvpxIyyJDvEGNkOBRg2/3jemKY/3BCoIzQ6PR7GN7YMLgQmNbHqStk3mP pw3seDceKFG2ex4Ym3mRGKFWuKj97BCOw3a2yWVCsU/8eNIsIz7YcYAMv9RZl4n1goqf if1kScX6lnwoo5I7NxBAK+XZ+H50pjFf9LX53ZYZMz9HMBN1i4DFcpMBWxuhml8Zd4Fv mac2gvbwgln+QvH4aj3nzLd/16ScosojoysMGGsPY0WEODDYoYzDgedy4z1mGF5fndVo 340Aae9xiORm6z8Huv6xMJE7BwXUFdky45WYsCVAeY1qY6GhlNnPNaJHa0hTS76l4FkB yRMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=J0orAsxO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020aa7c906000000b00418c2b5bee7si22324383edt.457.2022.03.30.23.26.46; Wed, 30 Mar 2022 23:27:12 -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; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=J0orAsxO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbiCaFy7 (ORCPT + 99 others); Thu, 31 Mar 2022 01:54:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230149AbiCaFy5 (ORCPT ); Thu, 31 Mar 2022 01:54:57 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97DBD36B49 for ; Wed, 30 Mar 2022 22:53:10 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id s11so20941992pfu.13 for ; Wed, 30 Mar 2022 22:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=BrVp20BmQjd9WSbsMvWT5kt24UKCTLgZvgR7hPflW5I=; b=J0orAsxOAk3R3htaeofa12dEY09G1ZOT6xFMUw8eRPdblGAX+zKgalF+zG53xNIBfN JIdsxH0KeXhELtsIMEfbGGS8jMDN+ePq9zcaypxHtex4s+/DgPdLpCaI+/6Q6+GgWWKs KJEdpD76ISx4i9sPdkdNTpnORTU/yyvxrRPlPLbAYPe0AeCjVdFf7yGjU2RhRFTgms2/ 0RYnJfjAzMGceWUdQXG5RxDGdiaQYO94yuq3nKHFmfxpcOlFbLUCujyc7JzsG35ovPBW OeK74pluni7ZWl5BfCWtd2/Z/cENsuT48GSGZFcv3nsYh3EjxsvjTQNwnxUySCiQeBAn eTgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=BrVp20BmQjd9WSbsMvWT5kt24UKCTLgZvgR7hPflW5I=; b=5PCXFV5FOap6gyzGJgsbAuwLof1HLyJ7yN85besmWkrEybOOo93pwchA3ALRLjF23W ILAftjpmT25kXBV/07/H0PhLiHGg96zpiB+nZcs113iccpevoQ1VGGoxgZnRl2JdGzZJ CQXRbO5dnsMxdbLeDqKGqBWqAqQyAs2TG41kWkMnuS3N+LcYCchFgBMvlYCg4gmwXeEX qgdp+o544iY7WNvTBy0CPLEMtdPmSm9k+T0MobmgAxASQl/J+Pe6l4yIW2bwADklPe6d yz7rdfp+ga714JCQhDl1moWfE3/1jjyzqr9dLibFHQQ9lfwM+5eIjVuBfozcEwFSQdMH JiAA== X-Gm-Message-State: AOAM530szjuTm7UcU7Eyq2BPLXD8FbTjtyrGprYVvTRIhzdI7g1pUE/W 5xRefQhEheAOUrlV77M2NeXJyw== X-Received: by 2002:a63:6f44:0:b0:398:31d6:e37f with SMTP id k65-20020a636f44000000b0039831d6e37fmr9285910pgc.177.1648705990089; Wed, 30 Mar 2022 22:53:10 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id n18-20020a056a0007d200b004fdac35672fsm1695461pfu.68.2022.03.30.22.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 22:53:09 -0700 (PDT) Date: Wed, 30 Mar 2022 22:53:09 -0700 (PDT) X-Google-Original-Date: Wed, 30 Mar 2022 21:15:09 PDT (-0700) Subject: Re: [PATCH] riscv: Fix fill_callchain return value In-Reply-To: <20220311065815.9985-1-nikita.shubin@maquefel.me> CC: linux@yadro.com, n.shubin@yadro.com, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, Paul Walmsley , aou@eecs.berkeley.edu, han_mao@c-sky.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org From: Palmer Dabbelt To: nikita.shubin@maquefel.me Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 Thu, 10 Mar 2022 22:58:15 PST (-0800), nikita.shubin@maquefel.me wrote: > From: Nikita Shubin > > perf_callchain_store return 0 on success, -1 otherwise, > fix fill_callchain to return correct bool value. > > Fixes: dbeb90b0c1eb ("riscv: Add perf callchain support") > Signed-off-by: Nikita Shubin > --- > arch/riscv/kernel/perf_callchain.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/kernel/perf_callchain.c b/arch/riscv/kernel/perf_callchain.c > index 1fc075b8f764..7aca6a238173 100644 > --- a/arch/riscv/kernel/perf_callchain.c > +++ b/arch/riscv/kernel/perf_callchain.c > @@ -68,7 +68,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry, > > static bool fill_callchain(void *entry, unsigned long pc) > { > - return perf_callchain_store(entry, pc); > + return perf_callchain_store(entry, pc) == 0; > } > > void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, Thanks, this is on for-next. Looks like we share some of this code with at least arm64, it might be worth refactoring this into something generic.