Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp731601rwo; Wed, 2 Aug 2023 03:22:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlHzmSTPSDm/S5KLw+ewV6fg3p4HpiaCJj4wHzSrqzqJugwGR+jBlXKt+flz8+29b+7IM+r6 X-Received: by 2002:a17:902:db06:b0:1b8:8670:541 with SMTP id m6-20020a170902db0600b001b886700541mr13331363plx.25.1690971742456; Wed, 02 Aug 2023 03:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690971742; cv=none; d=google.com; s=arc-20160816; b=R33Y+wZuhLK8PLY8ByfsJzlJLx+/MUxi+CdqfrUwuHyAYAvwe5XbBFjNoMjk0KNSNE NqyXpy837slf2cXHw27L/UF2bcL8hQBTYE6TIdg+9H/c3BFQD485e4UbJAjDSqR8NS3m lyMBlCa0b22H9yNOLeu9trzM+ij/PujMM/T3Q+3WvnBU40MIk3YvNazLLi8VFVb1Xgu1 mNfi7njkUcDK8CoU0bVi+MoV8Zn1BcOuP4+Ac9vud8s8XyihJ6zxT83Klr2KkydVaSmC TOFnXZgXvlJ5UsTw0BxCTP7mOK8QEqj9f0U1k00dAg97CVR67ZWGSgDDcyIdK5PmZZS8 UVbA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ejdl0KVafWeUDCoat0LuZ8Fy/MsW+LGPGn9twtI85O4=; fh=JaxZGKf0NGxFruMBNweFeRrHWrRBBIwkQ5sLyfk9jAY=; b=oPm3vFQuIMfuJ+13aMcfHRj8vlHZDWWFdGXmrG+FQaUdQDksp1kFoC1lXRYQqfKz1a rG3JjblSvK/whScynKDQEQjOhgyBM2An34SN1JBRi6nTfILqsnEvFLU6zOaHaG2l8j5s /hDSQW0SRq2fkRqKystDY+BmLkBcyj4kBxk2PlV+SN8oCz6gKSq7XEZvZiLJ3UTfFFiA oL5idK09YfuURxF9hLSqMr6cVIt0mntTXMR6NbMMmJXkgJQfZjwcIPxbYd6TDxUz1BSH 8U2lsCUow6JyZCSgWg2EgYPy0TxbFxvVJkxYdMyzTzVYHtKFip+eNYrzgykYWN5dfXJe 0YwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=HVRel3iy; 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 u8-20020a170902e5c800b001aff514a8f0si2961899plf.534.2023.08.02.03.22.09; Wed, 02 Aug 2023 03:22:22 -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=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=HVRel3iy; 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 S231196AbjHBIFI (ORCPT + 99 others); Wed, 2 Aug 2023 04:05:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232022AbjHBIFG (ORCPT ); Wed, 2 Aug 2023 04:05:06 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F2C2DE for ; Wed, 2 Aug 2023 01:05:05 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3128fcd58f3so6611123f8f.1 for ; Wed, 02 Aug 2023 01:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1690963503; x=1691568303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ejdl0KVafWeUDCoat0LuZ8Fy/MsW+LGPGn9twtI85O4=; b=HVRel3iy2TysbHNmKF4T5Uc3LTv/kACnAUG0vRC18eZOb+FeI1/SOHRmzMrSR+0iuI zDSbXxGB8+I5Bj84nZnHIsY5j1f3zfytixIjpQZ0XXvZ42Zh1JGpuf+WZFKW60ASGN/y qd4szV5SrGTH/31OeXNSR0NV6dLD4tGXg69e96dpajfG1Ra/LqcsE91RhgxmeZagzl3T BH9jEmGUgv3fQLVzMGa56NgW/7UvTP4h6CZNJ8GZ8ti1rX0X/k246dJ9TBssCz5nml5Z HOnKC8VJQXNqZwOcT3RhKkvFmFqokaqSfTEn3fiDasyYFpiigObjmz5O1RwSHFAitIOd OOUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690963503; x=1691568303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ejdl0KVafWeUDCoat0LuZ8Fy/MsW+LGPGn9twtI85O4=; b=R0eje7bYLYBHzHTNDP2HboJoQ2HrAsfefz/Oo7Hlz4SJoboiNO+sEdgA/j1oY47ZhF cxVbCjDEFArCKgdvUs4TpIrqmsK7Hme33HZu0OUmGGzu8XRySWF+PzJaET+MrTTG+oTS 4dGbkCsGiBvfsEtzo6XBvwR9sT+sSCFLbtumjP+i2pYOBrw0Vqt/ZvoWsye/JGwGznVZ fqoN47sYp4gfJ/Jv7erJQtsiSnLGAdx8zLNGShNBO2IO1xaWUUAhhhteGFdhW5TYR12X W2nOMBH2Yi4UWU4xVyb/0w1p1DjotXHSxNgFezNLV0ZhoERS9xSQWXXLd6R9dHr629Tw 3ICQ== X-Gm-Message-State: ABy/qLYqVzQY4WTEOiyFEqk6kYjAtazkUaGmGYe46rgBnzgi8ficsDMQ sCcqdUgArY1NMCBTvFXc/1jvLQ== X-Received: by 2002:adf:f4d0:0:b0:317:568d:d69f with SMTP id h16-20020adff4d0000000b00317568dd69fmr4264622wrp.12.1690963503254; Wed, 02 Aug 2023 01:05:03 -0700 (PDT) Received: from alex-rivos.ba.rivosinc.com (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id a1-20020a056000050100b003141f96ed36sm18369977wrf.0.2023.08.02.01.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 01:05:02 -0700 (PDT) From: Alexandre Ghiti To: 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 , Andrew Jones , =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= , 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 Cc: Alexandre Ghiti , Atish Patra Subject: [PATCH v6 01/10] perf: Fix wrong comment about default event_idx Date: Wed, 2 Aug 2023 10:03:19 +0200 Message-Id: <20230802080328.1213905-2-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230802080328.1213905-1-alexghiti@rivosinc.com> References: <20230802080328.1213905-1-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Since commit c719f56092ad ("perf: Fix and clean up initialization of pmu::event_idx"), event_idx default implementation has returned 0, not idx + 1, so fix the comment that can be misleading. Signed-off-by: Alexandre Ghiti Reviewed-by: Andrew Jones Reviewed-by: Atish Patra --- 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 2166a69e3bf2..1269c96bc3b6 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -445,7 +445,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.39.2