Kbuild fixes for v5.9 (3rd)

- fix qconf warnings and revive help message
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAl9m060VHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGDdgP+wR3mDhtgnSr5FVNPBrBhB+MnHo5
 cyvfwipYZQKju18CXF4p5/BvXalZZueEzn889vqXpuYC9ZDs7nkU9h4iEspQhuND
 AbfpOIo7DV0assbVo6ieZz03lJMqRQ+M4jjyMBf1DGmRvmVZ2EXSasA1239AvCPY
 X1Xw/bJ+Mbn2FpP+4t0GXANH6lJlZumGvqcI53nzdIoqU4XL4LON7YX/EfTyGVXX
 smSgOQ2v3DyASVu9sTg4RgWmwTfPcaO3UE6Z4uIoJR58dlcfiTEJr5jdLILoXVPd
 b+S2kilUJ5arUpBbIVXkqkRxddV/cNA1gQoDe1OAfSqnhA2QaWGsKS6F9aZP8oq5
 afcvJKp0pS6z9ZC7mmstS0GtgdwZqDYXaNCNRxTRORJz7+24twqe/m+sPVoYb71c
 Bw2aC6IXwGWfQFAYJzMZutz5O8MkQzPhq359zpG5k7XTuGGuxzTQmtNjvaiQszUn
 boSdYxEzoLtBNNh70i0vxBJybws3c8/m7Qjq1b76t/Y8HGcDHIU2pCRhKjHkghsP
 e+ot4UNl0uj/ulb5F88G5Qu6mYqys5ioGgr2qhxbdj8MubNmxWuf4SukD5luWjqg
 G+M2MXQ6JmVOYZ49MlNZUAw7SiMejtQrp/RuI0zUxFK1t823g8QrOE4zUih9DA5V
 TQaCGSHGlPsgcceg
 =OOQ1
 -----END PGP SIGNATURE-----

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)
This commit is contained in:
Linus Torvalds 2020-09-20 10:08:45 -07:00
commit c7948fe9ba
3 changed files with 39 additions and 35 deletions

View File

@ -66,23 +66,6 @@ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
fprintf(stderr, "Error in writing or end of file.\n");
}
/* menu.c */
void _menu_init(void);
void menu_warn(struct menu *menu, const char *fmt, ...);
struct menu *menu_add_menu(void);
void menu_end_menu(void);
void menu_add_entry(struct symbol *sym);
void menu_add_dep(struct expr *dep);
void menu_add_visibility(struct expr *dep);
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
void menu_add_option_modules(void);
void menu_add_option_defconfig_list(void);
void menu_add_option_allnoconfig_y(void);
void menu_finalize(struct menu *parent);
void menu_set_type(int type);
/* util.c */
struct file *file_lookup(const char *name);
void *xmalloc(size_t size);
@ -109,6 +92,36 @@ void str_append(struct gstr *gs, const char *s);
void str_printf(struct gstr *gs, const char *fmt, ...);
const char *str_get(struct gstr *gs);
/* menu.c */
void _menu_init(void);
void menu_warn(struct menu *menu, const char *fmt, ...);
struct menu *menu_add_menu(void);
void menu_end_menu(void);
void menu_add_entry(struct symbol *sym);
void menu_add_dep(struct expr *dep);
void menu_add_visibility(struct expr *dep);
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
void menu_add_option_modules(void);
void menu_add_option_defconfig_list(void);
void menu_add_option_allnoconfig_y(void);
void menu_finalize(struct menu *parent);
void menu_set_type(int type);
extern struct menu rootmenu;
bool menu_is_empty(struct menu *menu);
bool menu_is_visible(struct menu *menu);
bool menu_has_prompt(struct menu *menu);
const char *menu_get_prompt(struct menu *menu);
struct menu *menu_get_root_menu(struct menu *menu);
struct menu *menu_get_parent_menu(struct menu *menu);
bool menu_has_help(struct menu *menu);
const char *menu_get_help(struct menu *menu);
struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head);
void menu_get_ext_help(struct menu *menu, struct gstr *help);
/* symbol.c */
void sym_clear_all_valid(void);
struct symbol *sym_choice_default(struct symbol *sym);

View File

@ -12,20 +12,6 @@ bool conf_get_changed(void);
void conf_set_changed_callback(void (*fn)(void));
void conf_set_message_callback(void (*fn)(const char *s));
/* menu.c */
extern struct menu rootmenu;
bool menu_is_empty(struct menu *menu);
bool menu_is_visible(struct menu *menu);
bool menu_has_prompt(struct menu *menu);
const char * menu_get_prompt(struct menu *menu);
struct menu * menu_get_root_menu(struct menu *menu);
struct menu * menu_get_parent_menu(struct menu *menu);
bool menu_has_help(struct menu *menu);
const char * menu_get_help(struct menu *menu);
struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head);
void menu_get_ext_help(struct menu *menu, struct gstr *help);
/* symbol.c */
extern struct symbol * symbol_hash[SYMBOL_HASHSIZE];

View File

@ -1108,6 +1108,11 @@ void ConfigInfoView::menuInfo(void)
if (showDebug())
stream << debug_info(sym);
struct gstr help_gstr = str_new();
menu_get_ext_help(_menu, &help_gstr);
stream << print_filter(str_get(&help_gstr));
str_free(&help_gstr);
} else if (_menu->prompt) {
stream << "<big><b>";
stream << print_filter(_menu->prompt->text);
@ -1119,11 +1124,11 @@ void ConfigInfoView::menuInfo(void)
expr_print_help, &stream, E_NONE);
stream << "<br><br>";
}
stream << "defined at " << _menu->file->name << ":"
<< _menu->lineno << "<br><br>";
}
}
if (showDebug())
stream << "defined at " << _menu->file->name << ":"
<< _menu->lineno << "<br><br>";
setText(info);
}
@ -1276,7 +1281,7 @@ void ConfigInfoView::clicked(const QUrl &url)
}
free(result);
delete data;
delete[] data;
}
void ConfigInfoView::contextMenuEvent(QContextMenuEvent *event)