Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp795008rwd; Thu, 15 Jun 2023 02:03:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4GHd7FzMY0AhIxPWbUnb6QUVQPkFDudq5ld7bvOXhPkHWPLnamcprcVEpMqXFVkDh654J2 X-Received: by 2002:a17:906:99c1:b0:973:ca90:1f18 with SMTP id s1-20020a17090699c100b00973ca901f18mr22196639ejn.76.1686819834714; Thu, 15 Jun 2023 02:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686819834; cv=none; d=google.com; s=arc-20160816; b=Cv4cH7MlQfxq9PxG9bY2KoTW18HoNdKHMYWrx72olFZBa+zQ5nnPJuGkzD0EEMetxR 3yf3bob/ZHrLSl9KetPcK3pdxGfnpSxHOKJ86cOQ0AenSW0HV0YmplX5VoSy/0s5NE5X sMVE1BNfHLfO4g+dl5aXvfdURFedkzVSm03GYyDHn8OgbtB7loAw6SVr7/3Ane7pOe/f 2lTpaMvsXFWlSMYZlxVXEF8u62pzPgBtAS7FK8hrx1FXt1Iu0/Pxis9PdEuSo7gTC7m/ 1FsLY8gmZQcoC/dNE3mbRdYyKzveFAuni22YyQp1PD2S/tkgNin4TOD55JSBfn3kZ+nI eZTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TO/9bQchmvWU5XsZ6PVSrKCC9iEyDaJ7fBfesY7nUXo=; b=YZy4rGhQAgEg3Zl74yAFPoNQD0gH5jJEUa7XpsX+PoX/dBGA6jrx+JAqekRhH8r0gh bgCiqh3YoJJJu7mHOhhtPo+EI0LjGXbYrVMIHU/eiGO2dgmqGghcyNOEIaFSlEGkiwM+ 5T9SfxR812EAr9CaasHXYw4cC0HJWCG57LH2fci27s/6Fu3Vryb93Xno2w7j5LFwCoW8 tpyWFlL5QQzZL85VbWpar0UV2uy0+pU+Kxf0SDzTGYY1cFo/05XMh1Fp5U7Nht3Y9wW5 P4+lDkiXbaFJy/DxcICUp7Z6CW6n/npF9uzX8g+ASUbW5uH4q86GMleF+f/3rJb2WZHd /wVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=FHIIfDdJ; 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 e26-20020a17090681da00b00973e638a646si9568676ejx.439.2023.06.15.02.03.29; Thu, 15 Jun 2023 02:03:54 -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=@atishpatra.org header.s=google header.b=FHIIfDdJ; 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 S240240AbjFOI0p (ORCPT + 99 others); Thu, 15 Jun 2023 04:26:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243907AbjFOIYz (ORCPT ); Thu, 15 Jun 2023 04:24:55 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B311D1BF9 for ; Thu, 15 Jun 2023 01:24:53 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2b4470e1500so3660491fa.1 for ; Thu, 15 Jun 2023 01:24:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; t=1686817492; x=1689409492; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TO/9bQchmvWU5XsZ6PVSrKCC9iEyDaJ7fBfesY7nUXo=; b=FHIIfDdJcAOiiR4LbSL4/uGAdi7niaXDloG0VoBSjXwwGpoL4MfrwpXKJhGzPQwucE dOdvEIxRl+k6G2Hh2lXO8KWmw7BZwrfanEepuJFlHhgMixev0/FEqtjq051lycVOa9ab XGqysDrQA2Sx0DQo8Y41Vi1CNyTAhFB+HJMdo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686817492; x=1689409492; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TO/9bQchmvWU5XsZ6PVSrKCC9iEyDaJ7fBfesY7nUXo=; b=Kw2V9GnEtdDo6ADyhM/o55207yPNmmJz6PLqEX7088juQQU13bQs2/85BSia9EtXsH /1JXkr/yftW1RU8rPz0ClYRKWzPLEeKPmvHgm8VI1lK2XqpOdjMQh7i/hMYxw2BGn5TT s+uO0M5RMP/IKmmPjtT5Zvcupx68D9t2pKrkrjLaqL/WzJXWPyYjWyFxbD2M1JIns2p3 cROa9a/Y+4nZqRii/7Nu+a1Qdqnzz9ceZMaLD/QlPS+cxAVDvNVcmwrmOYLHJduGjUWz U1+V9epPV12DI6CgTj0HanFflmSrmAWXVR3kUWRyligeR9NuNsyvTcg/Nv6fKYH91HYf 5mDA== X-Gm-Message-State: AC+VfDz/zqnKG2hoLyl5nzSmly7F3vUi+DIJ8dwnKlQQgopwUCo0axa3 AJe+XCV3zY3ovPXGyxpWl7zNNxvs8E3hpMP/M4FM X-Received: by 2002:a2e:a165:0:b0:2b1:e369:f98 with SMTP id u5-20020a2ea165000000b002b1e3690f98mr8402105ljl.11.1686817491842; Thu, 15 Jun 2023 01:24:51 -0700 (PDT) MIME-Version: 1.0 References: <20230512085321.13259-1-alexghiti@rivosinc.com> <20230512085321.13259-2-alexghiti@rivosinc.com> <20230531-5678beb107af4b9805cbb611@orel> <84626c83-8806-d807-a7bf-b497f70e56fd@ghiti.fr> In-Reply-To: <84626c83-8806-d807-a7bf-b497f70e56fd@ghiti.fr> From: Atish Patra Date: Thu, 15 Jun 2023 01:24:40 -0700 Message-ID: Subject: Re: [PATCH v2 01/10] perf: Fix wrong comment about default event_idx To: Alexandre Ghiti Cc: Andrew Jones , Alexandre Ghiti , 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 , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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, Jun 15, 2023 at 12:10=E2=80=AFAM Alexandre Ghiti wr= ote: > > > 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 fix= es > > 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. > > With that done: Reviewed-by: Atish Patra > >> 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); /*opt= ional */ > >> > >> -- > >> 2.37.2 > >> > > Otherwise, > > > > Reviewed-by: Andrew Jones > > > Thanks! > --=20 Regards, Atish