]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
perf annotate: Fix signature of annotate_browser__show()
authorNamhyung Kim <namhyung@kernel.org>
Mon, 8 Sep 2025 06:10:48 +0000 (23:10 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Sep 2025 18:05:23 +0000 (15:05 -0300)
According to convention, the first argument should be 'struct
annotate_browser' instead of 'struct ui_brwoser'.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250908061050.27517-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/annotate.c

index b770a8d4623ef1fb526e42782088dc6ceb85d99c..6fd4c3483c5068ae1f2ae0ec485cd364e55adbba 100644 (file)
@@ -766,20 +766,21 @@ bool annotate_browser__continue_search_reverse(struct annotate_browser *browser,
        return __annotate_browser__search_reverse(browser);
 }
 
-static int annotate_browser__show(struct ui_browser *browser, char *title, const char *help)
+static int annotate_browser__show(struct annotate_browser *browser, char *title, const char *help)
 {
-       struct map_symbol *ms = browser->priv;
+       struct ui_browser *b = &browser->b;
+       struct map_symbol *ms = b->priv;
        struct symbol *sym = ms->sym;
        char symbol_dso[SYM_TITLE_MAX_SIZE];
 
-       if (ui_browser__show(browser, title, help) < 0)
+       if (ui_browser__show(b, title, help) < 0)
                return -1;
 
        sym_title(sym, ms->map, symbol_dso, sizeof(symbol_dso), annotate_opts.percent_type);
 
-       ui_browser__gotorc_title(browser, 0, 0);
-       ui_browser__set_color(browser, HE_COLORSET_ROOT);
-       ui_browser__write_nstring(browser, symbol_dso, browser->width + 1);
+       ui_browser__gotorc_title(b, 0, 0);
+       ui_browser__set_color(b, HE_COLORSET_ROOT);
+       ui_browser__write_nstring(b, symbol_dso, b->width + 1);
        return 0;
 }
 
@@ -858,7 +859,7 @@ static int annotate_browser__run(struct annotate_browser *browser,
        int key;
 
        annotate__scnprintf_title(hists, title, sizeof(title));
-       if (annotate_browser__show(&browser->b, title, help) < 0)
+       if (annotate_browser__show(browser, title, help) < 0)
                return -1;
 
        annotate_browser__calc_percent(browser, evsel);
@@ -896,7 +897,7 @@ static int annotate_browser__run(struct annotate_browser *browser,
                        if (delay_secs != 0) {
                                symbol__annotate_decay_histogram(sym, evsel);
                                annotate__scnprintf_title(hists, title, sizeof(title));
-                               annotate_browser__show(&browser->b, title, help);
+                               annotate_browser__show(browser, title, help);
                        }
                        continue;
                case K_TAB:
@@ -947,7 +948,7 @@ static int annotate_browser__run(struct annotate_browser *browser,
                        continue;
                case 'r':
                        script_browse(NULL, NULL);
-                       annotate_browser__show(&browser->b, title, help);
+                       annotate_browser__show(browser, title, help);
                        continue;
                case 'k':
                        annotate_opts.show_linenr = !annotate_opts.show_linenr;
@@ -962,7 +963,7 @@ static int annotate_browser__run(struct annotate_browser *browser,
                        if (annotate_browser__toggle_source(browser, evsel))
                                ui_helpline__puts(help);
                        annotate__scnprintf_title(hists, title, sizeof(title));
-                       annotate_browser__show(&browser->b, title, help);
+                       annotate_browser__show(browser, title, help);
                        continue;
                case 'o':
                        annotate_opts.use_offset = !annotate_opts.use_offset;
@@ -1050,7 +1051,7 @@ show_sup_ins:
                case 'b':
                        switch_percent_type(&annotate_opts, key == 'b');
                        annotate__scnprintf_title(hists, title, sizeof(title));
-                       annotate_browser__show(&browser->b, title, help);
+                       annotate_browser__show(browser, title, help);
                        continue;
                case 'B':
                        if (br_cntr_text)
@@ -1071,7 +1072,7 @@ show_sup_ins:
                                browser->type_hash = hashmap__new(type_hash, type_equal,
                                                                  /*ctx=*/NULL);
                        }
-                       annotate_browser__show(&browser->b, title, help);
+                       annotate_browser__show(browser, title, help);
                        annotate_browser__debuginfo_warning(browser);
                        continue;
                case K_LEFT: