summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lexer.l
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-02-03 00:58:16 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-02-19 18:20:41 +0900
commit5b058034e3aa600802ab609e8264dc2ca1300ebe (patch)
treeb40e310dcfe6b0b32ac8819392ab255813259f89 /scripts/kconfig/lexer.l
parent6676c5bc15e66268c9c9669d5852aa779689c74e (diff)
downloadlinux-stable-5b058034e3aa600802ab609e8264dc2ca1300ebe.tar.gz
linux-stable-5b058034e3aa600802ab609e8264dc2ca1300ebe.tar.bz2
linux-stable-5b058034e3aa600802ab609e8264dc2ca1300ebe.zip
kconfig: change file_lookup() to return the file name
Currently, file_lookup() returns a pointer to (struct file), but the callers use only file->name. Make it return the ->name member directly. This adjustment encapsulates struct file and file_list as internal implementation. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/lexer.l')
-rw-r--r--scripts/kconfig/lexer.l5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l
index 71f651bb82ba..89544c3a1a29 100644
--- a/scripts/kconfig/lexer.l
+++ b/scripts/kconfig/lexer.l
@@ -401,13 +401,12 @@ void zconf_initscan(const char *name)
exit(1);
}
- cur_filename = file_lookup(name)->name;
+ cur_filename = file_lookup(name);
yylineno = 1;
}
void zconf_nextfile(const char *name)
{
- struct file *file = file_lookup(name);
struct buffer *buf = xmalloc(sizeof(*buf));
bool recur_include = false;
@@ -443,7 +442,7 @@ void zconf_nextfile(const char *name)
}
yylineno = 1;
- cur_filename = file->name;
+ cur_filename = file_lookup(name);
}
static void zconf_endfile(void)