summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-11-13 11:59:41 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2022-11-21 02:18:39 +0100
commit1791360cb37ff5ef797afe9006cb315ebb7e969e (patch)
treec5dbd3b74ee621110c6da72459ff21dfc94796f1 /scripts/kconfig
parentmodpost: fix array_size.cocci warning (diff)
downloadlinux-1791360cb37ff5ef797afe9006cb315ebb7e969e.tar.xz
linux-1791360cb37ff5ef797afe9006cb315ebb7e969e.zip
kconfig: remove unneeded variable in get_prompt_str()
The variable 'accessible' is redundant. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/menu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 109325f31bef..b90fff833588 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -724,10 +724,8 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
menu = prop->menu;
for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) {
- bool accessible = menu_is_visible(menu);
-
submenu[i++] = menu;
- if (location == NULL && accessible)
+ if (location == NULL && menu_is_visible(menu))
location = menu;
}
if (head && location) {