diff options
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r-- | scripts/kconfig/menu.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index a3cade659f89..e98a05c8e508 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
@@ -508,7 +508,7 @@ const char *menu_get_help(struct menu *menu) | |||
508 | } | 508 | } |
509 | 509 | ||
510 | static void get_prompt_str(struct gstr *r, struct property *prop, | 510 | static void get_prompt_str(struct gstr *r, struct property *prop, |
511 | struct jk_head *head) | 511 | struct list_head *head) |
512 | { | 512 | { |
513 | int i, j; | 513 | int i, j; |
514 | struct menu *submenu[8], *menu, *location = NULL; | 514 | struct menu *submenu[8], *menu, *location = NULL; |
@@ -544,12 +544,13 @@ static void get_prompt_str(struct gstr *r, struct property *prop, | |||
544 | } else | 544 | } else |
545 | jump->target = location; | 545 | jump->target = location; |
546 | 546 | ||
547 | if (CIRCLEQ_EMPTY(head)) | 547 | if (list_empty(head)) |
548 | jump->index = 0; | 548 | jump->index = 0; |
549 | else | 549 | else |
550 | jump->index = CIRCLEQ_LAST(head)->index + 1; | 550 | jump->index = list_entry(head->prev, struct jump_key, |
551 | entries)->index + 1; | ||
551 | 552 | ||
552 | CIRCLEQ_INSERT_TAIL(head, jump, entries); | 553 | list_add_tail(&jump->entries, head); |
553 | } | 554 | } |
554 | 555 | ||
555 | if (i > 0) { | 556 | if (i > 0) { |
@@ -573,7 +574,8 @@ static void get_prompt_str(struct gstr *r, struct property *prop, | |||
573 | /* | 574 | /* |
574 | * head is optional and may be NULL | 575 | * head is optional and may be NULL |
575 | */ | 576 | */ |
576 | void get_symbol_str(struct gstr *r, struct symbol *sym, struct jk_head *head) | 577 | void get_symbol_str(struct gstr *r, struct symbol *sym, |
578 | struct list_head *head) | ||
577 | { | 579 | { |
578 | bool hit; | 580 | bool hit; |
579 | struct property *prop; | 581 | struct property *prop; |
@@ -612,7 +614,7 @@ void get_symbol_str(struct gstr *r, struct symbol *sym, struct jk_head *head) | |||
612 | str_append(r, "\n\n"); | 614 | str_append(r, "\n\n"); |
613 | } | 615 | } |
614 | 616 | ||
615 | struct gstr get_relations_str(struct symbol **sym_arr, struct jk_head *head) | 617 | struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head) |
616 | { | 618 | { |
617 | struct symbol *sym; | 619 | struct symbol *sym; |
618 | struct gstr res = str_new(); | 620 | struct gstr res = str_new(); |