Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2448842rwb; Thu, 27 Jul 2023 07:23:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlFeBKokQsOyNsvJGu5KbQJ001P9CfXaNyLzi8Be/qwNb7OR8G+p+lYdhd7DCpB2tXJWrrbm X-Received: by 2002:a17:902:e751:b0:1b2:5d5b:e871 with SMTP id p17-20020a170902e75100b001b25d5be871mr5354312plf.59.1690467826846; Thu, 27 Jul 2023 07:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690467826; cv=none; d=google.com; s=arc-20160816; b=QuRs4Lebsu8XrJDM3ujv7CnqVyiZidc2NSNR8qWYeutcMFQ/nNNfTfgfjEs8YX8DrA EXlzW4fl2ijmMVU4PtKhdC46TWIgWInrVHjBxRiRVeplC3BknrNduIaKhHZKkob20etx 1KqD9OX/P+9RsFo1P/NdW64CRFHNe/EvCKSme+olh+71e3ZpbNqIrOdE8TQyNE3nzwhg tipxPBGnKBxX+Euk/zCLLOhQO9v7pwBvjwVHlcxnl+l5bNrr12xNVnQwEnlIDwRXDFhk 1HAx/rzNfdrcLjSChLbImsN8sZD7XPAqDWAxhIL6NFpU8yUXs5fdlw/oE88SOUCKiFBU AFlA== 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=K9kkb1YfIM8jpvGeG1F9tZdNvJ6xtNpbuXkDCUbYH6nsXgAHb/hfkQhby96TmIRMFQ kgBXJvO38/sdL3zT86ywtPGlECN6lVLhIWHOK+34ZNahBc6qjijdfPNC+iBLc0pafqTo GZbgeg9jUQ/TvdAaVtEV6msuMafKjPa09elAp/WLLyDHoDteRq5eiDDGncffwRdMStuU INbX79xYdwqBYuhpbcPp649Lln+Zjis+DLcmUBwzl1/guRd+rt6UFU77UoljFddKKS59 yFGC+Hi3ZiZfyTp5DAsIBC64aK9Ak0DwBJK9Dl1Oy6bKRewju4hD9yDxYaZ5LI6tJ5BF mHNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=xCt9C05W; 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 z10-20020a170903018a00b001b4fc117bf0si1483924plg.116.2023.07.27.07.23.25; Thu, 27 Jul 2023 07:23:46 -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=xCt9C05W; 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 S232684AbjG0OPk (ORCPT + 99 others); Thu, 27 Jul 2023 10:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233243AbjG0OPi (ORCPT ); Thu, 27 Jul 2023 10:15:38 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 905C430D7 for ; Thu, 27 Jul 2023 07:15:36 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b74209fb60so15300621fa.0 for ; Thu, 27 Jul 2023 07:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1690467335; x=1691072135; 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=xCt9C05W1VphhOi6OHJ+m4dwlujqmo7vBPKV6Y0OWx7fRMj79yzK7Nk8K3icSTrYCB pK1An74ohRZpjEt3rQzR7XVUMbnHALMVMSiuUwVsTPgO6U2nFT32bnVt24n6iWeOdygP qGiBwgnHHZyNs8Zu6bl82tL45DJKrlbWEAie2pHhWl7b7Q3xkulmAe5LnJtUaYIJ74YY rZHO9fQZLQSKG+M0yFbH4cccCTi7qDc0BrkvL9TovzPwXCOPv2LR+/h7R9CWOKIzaWOZ EIneyUPToIo0bBhqEGKns6FSBA22SUVCCfcFMhHLi0Pgchs4o4M6pNRzBICX9X07vr3J hZxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690467335; x=1691072135; 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=eVGfAHbjCYCE57X6ozCk8D+8X7sGCKFjTLuwMHs6tKubhPupeDVNQO4J3hZQOnEx+O SgQ73XVuniWzUbporfw7FB8jLymvZGzFjhN9h4lM0aHZeod9VgtYQWth4ytTQfcbGvEm C0Q6VF/zrLEKnT9z5VHbglIlAc5QR9NrwmkukYucZCOu+ZYi9qQ6PRqkmvhq01U4hotd 2oKqHuyCv/ZXLNG6Q+BjxQUSLqkVA2UDWiFXTQ9RoO3EIWhL1ckDkkxKiME3vzM9GTkC EPTC2Cgafu+XnbL2jgBHtOmy6FL9Q8M9f5gEO+JC0PcIUa7KDF3RVMxFN+3BT87f+rKz iKWA== X-Gm-Message-State: ABy/qLarAoIY+1BQaXi+8t3gPTQQ33viPLG/xHq3/kqo2L1VrHmsqXXT lU33gjua5HwZRX9NiYwwbvZQXQ== X-Received: by 2002:a2e:9983:0:b0:2b7:7e:e95e with SMTP id w3-20020a2e9983000000b002b7007ee95emr1883680lji.45.1690467334531; Thu, 27 Jul 2023 07:15:34 -0700 (PDT) Received: from alex-rivos.home (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id n2-20020a05600c294200b003fc02e8ea68sm4850057wmd.13.2023.07.27.07.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 07:15:33 -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 v4 01/10] perf: Fix wrong comment about default event_idx Date: Thu, 27 Jul 2023 16:14:19 +0200 Message-Id: <20230727141428.962286-2-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230727141428.962286-1-alexghiti@rivosinc.com> References: <20230727141428.962286-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_NONE,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