From: Alexandre Ghiti Date: Wed, 2 Aug 2023 08:03:19 +0000 (+0200) Subject: perf: Fix wrong comment about default event_idx X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=366d259ff597e81d90639ae21269b3f82cd4ebb7;p=linux.git perf: Fix wrong comment about default event_idx 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 --- diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2166a69e3bf2e..1269c96bc3b6f 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 */