diff mbox series

[-next,2/2] Kconfig: remove unused function 'menu_get_root_menu'

Message ID 20220912094838.2398580-3-zengheng4@huawei.com (mailing list archive)
State New, archived
Headers show
Series Kconfig: clean code | expand

Commit Message

Zeng Heng Sept. 12, 2022, 9:48 a.m. UTC
There is nowhere calling `menu_get_root_menu` function,
so remove it.

Signed-off-by: Zeng Heng <zengheng4@huawei.com>
---
 scripts/kconfig/lkc.h  | 1 -
 scripts/kconfig/menu.c | 5 -----
 2 files changed, 6 deletions(-)

Comments

Masahiro Yamada Sept. 13, 2022, 4:37 p.m. UTC | #1
On Mon, Sep 12, 2022 at 6:41 PM Zeng Heng <zengheng4@huawei.com> wrote:
>
> There is nowhere calling `menu_get_root_menu` function,
> so remove it.
>
> Signed-off-by: Zeng Heng <zengheng4@huawei.com>


Applied to linux-kbuild. Thanks.


> ---
>  scripts/kconfig/lkc.h  | 1 -
>  scripts/kconfig/menu.c | 5 -----
>  2 files changed, 6 deletions(-)
>
> diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
> index 279d56a44136..a61907686d22 100644
> --- a/scripts/kconfig/lkc.h
> +++ b/scripts/kconfig/lkc.h
> @@ -98,7 +98,6 @@ 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);
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index 3d6f7cba8846..62b6313f51c8 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -661,11 +661,6 @@ const char *menu_get_prompt(struct menu *menu)
>         return NULL;
>  }
>
> -struct menu *menu_get_root_menu(struct menu *menu)
> -{
> -       return &rootmenu;
> -}
> -
>  struct menu *menu_get_parent_menu(struct menu *menu)
>  {
>         enum prop_type type;
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 279d56a44136..a61907686d22 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -98,7 +98,6 @@  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);
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3d6f7cba8846..62b6313f51c8 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -661,11 +661,6 @@  const char *menu_get_prompt(struct menu *menu)
 	return NULL;
 }
 
-struct menu *menu_get_root_menu(struct menu *menu)
-{
-	return &rootmenu;
-}
-
 struct menu *menu_get_parent_menu(struct menu *menu)
 {
 	enum prop_type type;