kconfig: remove sym from struct property
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 17 Dec 2019 04:14:22 +0000 (13:14 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 5 Feb 2021 10:49:38 +0000 (11:49 +0100)
struct property can reference to the symbol that it is associated with
by prop->menu->sym.

Fix up the one usage of prop->sym, and remove sym from struct property.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/expr.h
config/parser.y
config/symbol.c

index 017843c9a4f42c81b234c8c25838ca514053047d..6e102a3b8bd5d79e33b241ca0fa03525f1b5e58f 100644 (file)
@@ -191,7 +191,6 @@ enum prop_type {
 
 struct property {
        struct property *next;     /* next property - null if last */
-       struct symbol *sym;        /* the symbol for which the property is associated */
        enum prop_type type;       /* type of property */
        const char *text;          /* the prompt value - P_PROMPT, P_MENU, P_COMMENT */
        struct expr_value visible;
index af770bf758ad2b5dc074674090aa3d15ef6c2255..708b6c4b13ca4c9ec4994889eaa7d7253cf271a8 100644 (file)
@@ -660,7 +660,7 @@ static void print_symbol(FILE *out, struct menu *menu)
                        break;
                case P_SYMBOL:
                        fputs( "  symbol ", out);
-                       fprintf(out, "%s\n", prop->sym->name);
+                       fprintf(out, "%s\n", prop->menu->sym->name);
                        break;
                default:
                        fprintf(out, "  unknown prop %d!\n", prop->type);
index f56eec5ea4c7fc26658bc55a25c7eadb9203e231..dbc5365d8bbc545530f561291c1994ff31d6443c 100644 (file)
@@ -1281,7 +1281,6 @@ struct property *prop_alloc(enum prop_type type, struct symbol *sym)
        prop = xmalloc(sizeof(*prop));
        memset(prop, 0, sizeof(*prop));
        prop->type = type;
-       prop->sym = sym;
        prop->file = current_file;
        prop->lineno = zconf_lineno();