perf: Fix wrong comment about default event_idx
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Wed, 2 Aug 2023 08:03:19 +0000 (10:03 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 16 Aug 2023 14:28:15 +0000 (07:28 -0700)
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 <alexghiti@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
include/linux/perf_event.h

index 2166a69..1269c96 100644 (file)
@@ -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 */