Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf annotate: Fix signature of annotate_browser__show()

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>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
48330efa edf93f2a

+13 -12
+13 -12
tools/perf/ui/browsers/annotate.c
··· 766 766 return __annotate_browser__search_reverse(browser); 767 767 } 768 768 769 - static int annotate_browser__show(struct ui_browser *browser, char *title, const char *help) 769 + static int annotate_browser__show(struct annotate_browser *browser, char *title, const char *help) 770 770 { 771 - struct map_symbol *ms = browser->priv; 771 + struct ui_browser *b = &browser->b; 772 + struct map_symbol *ms = b->priv; 772 773 struct symbol *sym = ms->sym; 773 774 char symbol_dso[SYM_TITLE_MAX_SIZE]; 774 775 775 - if (ui_browser__show(browser, title, help) < 0) 776 + if (ui_browser__show(b, title, help) < 0) 776 777 return -1; 777 778 778 779 sym_title(sym, ms->map, symbol_dso, sizeof(symbol_dso), annotate_opts.percent_type); 779 780 780 - ui_browser__gotorc_title(browser, 0, 0); 781 - ui_browser__set_color(browser, HE_COLORSET_ROOT); 782 - ui_browser__write_nstring(browser, symbol_dso, browser->width + 1); 781 + ui_browser__gotorc_title(b, 0, 0); 782 + ui_browser__set_color(b, HE_COLORSET_ROOT); 783 + ui_browser__write_nstring(b, symbol_dso, b->width + 1); 783 784 return 0; 784 785 } 785 786 ··· 859 858 int key; 860 859 861 860 annotate__scnprintf_title(hists, title, sizeof(title)); 862 - if (annotate_browser__show(&browser->b, title, help) < 0) 861 + if (annotate_browser__show(browser, title, help) < 0) 863 862 return -1; 864 863 865 864 annotate_browser__calc_percent(browser, evsel); ··· 897 896 if (delay_secs != 0) { 898 897 symbol__annotate_decay_histogram(sym, evsel); 899 898 annotate__scnprintf_title(hists, title, sizeof(title)); 900 - annotate_browser__show(&browser->b, title, help); 899 + annotate_browser__show(browser, title, help); 901 900 } 902 901 continue; 903 902 case K_TAB: ··· 948 947 continue; 949 948 case 'r': 950 949 script_browse(NULL, NULL); 951 - annotate_browser__show(&browser->b, title, help); 950 + annotate_browser__show(browser, title, help); 952 951 continue; 953 952 case 'k': 954 953 annotate_opts.show_linenr = !annotate_opts.show_linenr; ··· 963 962 if (annotate_browser__toggle_source(browser, evsel)) 964 963 ui_helpline__puts(help); 965 964 annotate__scnprintf_title(hists, title, sizeof(title)); 966 - annotate_browser__show(&browser->b, title, help); 965 + annotate_browser__show(browser, title, help); 967 966 continue; 968 967 case 'o': 969 968 annotate_opts.use_offset = !annotate_opts.use_offset; ··· 1051 1050 case 'b': 1052 1051 switch_percent_type(&annotate_opts, key == 'b'); 1053 1052 annotate__scnprintf_title(hists, title, sizeof(title)); 1054 - annotate_browser__show(&browser->b, title, help); 1053 + annotate_browser__show(browser, title, help); 1055 1054 continue; 1056 1055 case 'B': 1057 1056 if (br_cntr_text) ··· 1072 1071 browser->type_hash = hashmap__new(type_hash, type_equal, 1073 1072 /*ctx=*/NULL); 1074 1073 } 1075 - annotate_browser__show(&browser->b, title, help); 1074 + annotate_browser__show(browser, title, help); 1076 1075 annotate_browser__debuginfo_warning(browser); 1077 1076 continue; 1078 1077 case K_LEFT: