Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp711265rwd; Thu, 15 Jun 2023 00:34:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6dUG9Po9EYdkXqk2AJ1IIgr4ChbZouHPp1vnWTbSou/pJaBmBBnwwbCblqoqExvCwjTTXp X-Received: by 2002:a17:90b:4c04:b0:256:bef3:4158 with SMTP id na4-20020a17090b4c0400b00256bef34158mr3458241pjb.21.1686814471938; Thu, 15 Jun 2023 00:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686814471; cv=none; d=google.com; s=arc-20160816; b=VkHwgFA8tzYs+uHwAu3svfaEiNZeQ6NFXROFM/UMMB0FEFWC2EGFM2Z+H0Icxd/TA4 wxKBVq2hWeJRsOHn/DtjGkaS13R5jL50jpwRMlx1bNmHez5ooTocy64xN4tGxGajqvOL pBcTvwGjfWdeDx8BVN7OEjkYRZnA3LE62+CgJnLIWvkicTEs+nqa+aGZBhEQdVhEhhM4 ZoV/XGSwh4+334mSo+ymzTwzImpVRSt3jWMrbA4+pMapKoUjAs+zaPErAQJ6vQFqTX6/ SZVJvCxCnrEvH1E8KtWCSQ/tZHwQV5yPsasdAhGxVBRSmy8Rp5uPeAYiXdUG2DvloD3y z5/A== 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:content-language:subject:user-agent:mime-version :date:message-id; bh=r9Y7yxg0D71lwyi4qZm23mALyzLFvk43/QfLm03XJTI=; b=eKbhk+H1cYrahQ2Ctk33KHHYhfNQF+ydGWP9ycOPWF7smnybFoNfjBkFe5iHcZlqg5 GHVVUF3D7YGdCxkPMUWCCInfE+GIu7fP0PUMbJ342jbas7reDCwAIrwD8sHIndbhl0EN PWzy2/tgMDHktGn16FV4g3ZGrWHT5B88J8cdYUy6uaR11AmM4xbUN3WhJ3IXxiBeDR4A Sql3G1kgyzQfeOzSDS0xJ7xHXxAvpf58e4MBL7xm6HozFqL5fXOYsypAqUfOVI1QH17z r9K0arrQuxTX2/7fxd+4N/ergFhwWOV823ctCHqEIioDRdKIcA4hkFWOFgvYcnMtNPne 9z3w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a17090abf0c00b00253695cadcasi3118870pjs.180.2023.06.15.00.34.19; Thu, 15 Jun 2023 00:34:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244746AbjFOHNB (ORCPT + 99 others); Thu, 15 Jun 2023 03:13:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237984AbjFOHMX (ORCPT ); Thu, 15 Jun 2023 03:12:23 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7573B273A; Thu, 15 Jun 2023 00:10:32 -0700 (PDT) X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id D8B5B2000C; Thu, 15 Jun 2023 07:10:24 +0000 (UTC) Message-ID: <84626c83-8806-d807-a7bf-b497f70e56fd@ghiti.fr> Date: Thu, 15 Jun 2023 09:10:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2 01/10] perf: Fix wrong comment about default event_idx Content-Language: en-US To: Andrew Jones , Alexandre Ghiti Cc: Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Anup Patel , Will Deacon , Rob Herring , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <20230512085321.13259-1-alexghiti@rivosinc.com> <20230512085321.13259-2-alexghiti@rivosinc.com> <20230531-5678beb107af4b9805cbb611@orel> From: Alexandre Ghiti In-Reply-To: <20230531-5678beb107af4b9805cbb611@orel> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,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 31/05/2023 15:54, Andrew Jones wrote: > On Fri, May 12, 2023 at 10:53:12AM +0200, Alexandre Ghiti wrote: >> event_idx default implementation returns 0, not idx + 1. > The comment was correct until commit c719f56092ad ("perf: Fix and clean > up initialization of pmu::event_idx"). I'm not sure that warrants a fixes > tag, but maybe a reference in the commit message. You're right, I'll add a reference, I don't think it deserves a backport, that's just a comment. >> Signed-off-by: Alexandre Ghiti >> --- >> include/linux/perf_event.h | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h >> index d5628a7b5eaa..56fe43b20966 100644 >> --- a/include/linux/perf_event.h >> +++ b/include/linux/perf_event.h >> @@ -442,7 +442,8 @@ struct pmu { >> >> /* >> * Will return the value for perf_event_mmap_page::index for this event, >> - * if no implementation is provided it will default to: event->hw.idx + 1. >> + * if no implementation is provided it will default to 0 (see >> + * perf_event_idx_default). >> */ >> int (*event_idx) (struct perf_event *event); /*optional */ >> >> -- >> 2.37.2 >> > Otherwise, > > Reviewed-by: Andrew Jones Thanks!