Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp988348rwd; Wed, 31 May 2023 08:04:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7JS+LmccZHBiTUifKUhVuds1IFGOP3dwsDTILfRbwdYoEk6Nty3wXL+oy3RzytyR2pgKRc X-Received: by 2002:a05:6a21:6d84:b0:10f:6529:5442 with SMTP id wl4-20020a056a216d8400b0010f65295442mr5199160pzb.49.1685545468548; Wed, 31 May 2023 08:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685545468; cv=none; d=google.com; s=arc-20160816; b=JFJhp7afj24yErcCM9xmd2ih0AfA+BsrMCQwD6oAudH2KCvqjXL+sW1zOr1ai0h9qK ovf1H6uiEmRmLNc1EdnAVDyyfthOSAqUN7NLvi3hPCu+1eo6/X2mIMVmTvQRZOAbqcn2 wRAis1Tosc0TBZ1Or9Td/DMGtB7WrG1/m9JY3ydDQ5YMmQQT7CSQNUxFMsXfVrgYsAYH H0SMqaLqckCjzYmbEGz+HQGKbUIjwiS+TchdQRnYAOAKdMp5vqcR2X09hdPOkyeBN08T I3cN9+kdQbmrBlRxs7ULpa231SUsTmf4exWgDvidyxXQTYeXrdkRwc0dqp/MRN02dnZt xjZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Zbb0XlzY1V6un7ssRQbevCYzvMDnOinL05UrfKmM4xc=; b=E8I+Q/+PLDQWrNygRr0M4q0icrNJ8C/tdGFihWOCfpOYAPCcVHFAi9Z8l3vdPX8S9I 7e+1gtdF17MgVcgygnhZrgbkDlnvFkmNGheOlPhv0etACAXKcr/TFsM+I3leyvQINMmK juV5uTiR9hCC/zKH4sgpXaqux74JkB6GCr7cGpqxRAVOhtnuBLqhuwjSYXjIQRvmCmP0 JFMNkQHGTyO0KhVG/OHnxOLC5jnPId78UPU5vLzv99/oUVABxWSepto1qgzb644eDvTx RA/3sIrcbSzmdnGHy1UD8GcfiUyxY04IbuK+npwmOeDupSD4JVstiwLkkz3iktAc9lP3 WPxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=C6P+PAcE; 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 c15-20020a63724f000000b0053b52fed717si1056763pgn.864.2023.05.31.08.04.14; Wed, 31 May 2023 08:04:28 -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=@ventanamicro.com header.s=google header.b=C6P+PAcE; 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 S237309AbjEaOB4 (ORCPT + 99 others); Wed, 31 May 2023 10:01:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237289AbjEaOB0 (ORCPT ); Wed, 31 May 2023 10:01:26 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B09D198B for ; Wed, 31 May 2023 06:55:35 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-30ad752f433so4075321f8f.3 for ; Wed, 31 May 2023 06:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1685541249; x=1688133249; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Zbb0XlzY1V6un7ssRQbevCYzvMDnOinL05UrfKmM4xc=; b=C6P+PAcESg9pjJuC1kShZkAMK9uNCuZZC59NjruVdLAT+QbK5Fb7OyTaHMvt9uPzWB XC6YjFkU+s1LzKNcLemCA5UvlagHiacGzTfiM/R2e6hfVvlyHtQgvcdf+G/89fBAyaFn al95wHlokLtDX33yAGCyGXGWNp+6upvH+JRfhP/MfAomjpj7ykZGP6APMEFunMG6Um4A Q0GkFyAbz3+Gec81W0jn0DXHKIAfGHWPlMPSF60xf9udnMyIdlRQDSu26bSGscPRElke Ee9HUot213bm0c1us5iqLgmtj9PemzfMxCRv29nNkaPrcub3t3g85duWFbefmqdgiqmB Q95Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685541249; x=1688133249; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Zbb0XlzY1V6un7ssRQbevCYzvMDnOinL05UrfKmM4xc=; b=iqfGu1x3QeC9QI/q7NnqV5/7aAuRRjeWkhagUUfb3N1k7V76bXXgj8fngpj+ZWYcf7 gy1eTdxR/jncjXLgoCHAL+XcTB7AkdUHYbobP1BkYX4VMQPutmV4mKGcaeLBIGesZQyX +SDsAodP/09cb/NOt8K/m/Pk7htsBrwjxKIK0S6uPgzR57/Y0pDVETCVJW29jaHhiNox BhPD3gNoMNUPStbxkPmDPlPD2Mp4ZZrBLWs2YZjjW05ZVaAymCjT6Iu8gOjKp92lkIiN youXaEMcFmpg2f3Ex6w2ZoWiE0ufTkarcLRtJdtFR8R9+/I57EldAcZS9d9MitZK8VNq y8kA== X-Gm-Message-State: AC+VfDwC6Ey1EGp4tFX4w6rJGhaQlO7uOk4YMs42RDPFbBeQfuJyXzoy +LVTsrmP8Kxnws8LrXOchhn2JA== X-Received: by 2002:adf:e848:0:b0:2f0:2d92:9c81 with SMTP id d8-20020adfe848000000b002f02d929c81mr4030977wrn.19.1685541248998; Wed, 31 May 2023 06:54:08 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id i16-20020a05600011d000b0030aefa3a957sm7021247wrx.28.2023.05.31.06.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 06:54:08 -0700 (PDT) Date: Wed, 31 May 2023 15:54:07 +0200 From: Andrew Jones To: 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 Subject: Re: [PATCH v2 01/10] perf: Fix wrong comment about default event_idx Message-ID: <20230531-5678beb107af4b9805cbb611@orel> References: <20230512085321.13259-1-alexghiti@rivosinc.com> <20230512085321.13259-2-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230512085321.13259-2-alexghiti@rivosinc.com> 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,URIBL_BLOCKED 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 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. > > 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