Skip to content

Commit c7948fe

Browse files
committed
Merge tag 'kbuild-fixes-v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: "Fix qconf warnings and revive help message" * tag 'kbuild-fixes-v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: qconf: revive help message in the info view kconfig: qconf: fix incomplete type 'struct gstr' warning kconfig: qconf: use delete[] instead of delete to free array (again)
2 parents 325d0ea + a46afd1 commit c7948fe

3 files changed

Lines changed: 39 additions & 35 deletions

File tree

scripts/kconfig/lkc.h

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,6 @@ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
6666
fprintf(stderr, "Error in writing or end of file.\n");
6767
}
6868

69-
/* menu.c */
70-
void _menu_init(void);
71-
void menu_warn(struct menu *menu, const char *fmt, ...);
72-
struct menu *menu_add_menu(void);
73-
void menu_end_menu(void);
74-
void menu_add_entry(struct symbol *sym);
75-
void menu_add_dep(struct expr *dep);
76-
void menu_add_visibility(struct expr *dep);
77-
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
78-
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
79-
void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
80-
void menu_add_option_modules(void);
81-
void menu_add_option_defconfig_list(void);
82-
void menu_add_option_allnoconfig_y(void);
83-
void menu_finalize(struct menu *parent);
84-
void menu_set_type(int type);
85-
8669
/* util.c */
8770
struct file *file_lookup(const char *name);
8871
void *xmalloc(size_t size);
@@ -109,6 +92,36 @@ void str_append(struct gstr *gs, const char *s);
10992
void str_printf(struct gstr *gs, const char *fmt, ...);
11093
const char *str_get(struct gstr *gs);
11194

95+
/* menu.c */
96+
void _menu_init(void);
97+
void menu_warn(struct menu *menu, const char *fmt, ...);
98+
struct menu *menu_add_menu(void);
99+
void menu_end_menu(void);
100+
void menu_add_entry(struct symbol *sym);
101+
void menu_add_dep(struct expr *dep);
102+
void menu_add_visibility(struct expr *dep);
103+
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
104+
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
105+
void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
106+
void menu_add_option_modules(void);
107+
void menu_add_option_defconfig_list(void);
108+
void menu_add_option_allnoconfig_y(void);
109+
void menu_finalize(struct menu *parent);
110+
void menu_set_type(int type);
111+
112+
extern struct menu rootmenu;
113+
114+
bool menu_is_empty(struct menu *menu);
115+
bool menu_is_visible(struct menu *menu);
116+
bool menu_has_prompt(struct menu *menu);
117+
const char *menu_get_prompt(struct menu *menu);
118+
struct menu *menu_get_root_menu(struct menu *menu);
119+
struct menu *menu_get_parent_menu(struct menu *menu);
120+
bool menu_has_help(struct menu *menu);
121+
const char *menu_get_help(struct menu *menu);
122+
struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head);
123+
void menu_get_ext_help(struct menu *menu, struct gstr *help);
124+
112125
/* symbol.c */
113126
void sym_clear_all_valid(void);
114127
struct symbol *sym_choice_default(struct symbol *sym);

scripts/kconfig/lkc_proto.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@ bool conf_get_changed(void);
1212
void conf_set_changed_callback(void (*fn)(void));
1313
void conf_set_message_callback(void (*fn)(const char *s));
1414

15-
/* menu.c */
16-
extern struct menu rootmenu;
17-
18-
bool menu_is_empty(struct menu *menu);
19-
bool menu_is_visible(struct menu *menu);
20-
bool menu_has_prompt(struct menu *menu);
21-
const char * menu_get_prompt(struct menu *menu);
22-
struct menu * menu_get_root_menu(struct menu *menu);
23-
struct menu * menu_get_parent_menu(struct menu *menu);
24-
bool menu_has_help(struct menu *menu);
25-
const char * menu_get_help(struct menu *menu);
26-
struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head);
27-
void menu_get_ext_help(struct menu *menu, struct gstr *help);
28-
2915
/* symbol.c */
3016
extern struct symbol * symbol_hash[SYMBOL_HASHSIZE];
3117

scripts/kconfig/qconf.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,11 @@ void ConfigInfoView::menuInfo(void)
11081108
if (showDebug())
11091109
stream << debug_info(sym);
11101110

1111+
struct gstr help_gstr = str_new();
1112+
1113+
menu_get_ext_help(_menu, &help_gstr);
1114+
stream << print_filter(str_get(&help_gstr));
1115+
str_free(&help_gstr);
11111116
} else if (_menu->prompt) {
11121117
stream << "<big><b>";
11131118
stream << print_filter(_menu->prompt->text);
@@ -1119,11 +1124,11 @@ void ConfigInfoView::menuInfo(void)
11191124
expr_print_help, &stream, E_NONE);
11201125
stream << "<br><br>";
11211126
}
1127+
1128+
stream << "defined at " << _menu->file->name << ":"
1129+
<< _menu->lineno << "<br><br>";
11221130
}
11231131
}
1124-
if (showDebug())
1125-
stream << "defined at " << _menu->file->name << ":"
1126-
<< _menu->lineno << "<br><br>";
11271132

11281133
setText(info);
11291134
}
@@ -1276,7 +1281,7 @@ void ConfigInfoView::clicked(const QUrl &url)
12761281
}
12771282

12781283
free(result);
1279-
delete data;
1284+
delete[] data;
12801285
}
12811286

12821287
void ConfigInfoView::contextMenuEvent(QContextMenuEvent *event)

0 commit comments

Comments
 (0)