summaryrefslogtreecommitdiff
path: root/scripts/kconfig/menu.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-02-02 18:58:09 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2024-02-19 12:20:40 +0300
commit40bab83a6595b3ab8afcfdb57903470f64fdbdb9 (patch)
tree0ea85368b87904cf70a55d1fb95476b76d99c931 /scripts/kconfig/menu.c
parent1d7c4f10baacbc658918f7ddec31e1d1962df6fc (diff)
downloadlinux-40bab83a6595b3ab8afcfdb57903470f64fdbdb9.tar.xz
kconfig: associate struct menu with file name directly
struct menu is linked to struct file for diagnostic purposes. It is always used to retrieve the file name through menu->file->name. Associate struct menu with the file name directly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r--scripts/kconfig/menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index ddca95879631..5ad4d2b9fb82 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -23,7 +23,7 @@ void menu_warn(struct menu *menu, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
- fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno);
+ fprintf(stderr, "%s:%d:warning: ", menu->filename, menu->lineno);
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
va_end(ap);
@@ -53,7 +53,7 @@ void menu_add_entry(struct symbol *sym)
memset(menu, 0, sizeof(*menu));
menu->sym = sym;
menu->parent = current_menu;
- menu->file = current_file;
+ menu->filename = cur_filename;
menu->lineno = cur_lineno;
*last_entry_ptr = menu;
@@ -676,7 +676,7 @@ struct menu *menu_get_parent_menu(struct menu *menu)
static void get_def_str(struct gstr *r, struct menu *menu)
{
str_printf(r, "Defined at %s:%d\n",
- menu->file->name, menu->lineno);
+ menu->filename, menu->lineno);
}
static void get_dep_str(struct gstr *r, struct expr *expr, const char *prefix)