aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2015-02-24 10:37:13 -0500
committerMichal Marek <mmarek@suse.cz>2015-02-25 09:00:17 -0500
commitad8d40cda3ad22ad9e8863d55a5c88f85c0173f0 (patch)
treedda16c06e987fb9ac7177ea58fa88957cbe46f0f /scripts
parent463157444e377bf9b279101b1f16a94c4648c03a (diff)
kconfig: Remove unnecessary prototypes from headers
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c5
-rw-r--r--scripts/kconfig/expr.c18
-rw-r--r--scripts/kconfig/expr.h5
-rw-r--r--scripts/kconfig/lkc.h11
-rw-r--r--scripts/kconfig/lkc_proto.h3
-rw-r--r--scripts/kconfig/menu.c4
-rw-r--r--scripts/kconfig/symbol.c42
7 files changed, 40 insertions, 48 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 28df18dd1147..c814f57672fc 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -16,6 +16,11 @@
16 16
17#include "lkc.h" 17#include "lkc.h"
18 18
19struct conf_printer {
20 void (*print_symbol)(FILE *, struct symbol *, const char *, void *);
21 void (*print_comment)(FILE *, const char *, void *);
22};
23
19static void conf_warning(const char *fmt, ...) 24static void conf_warning(const char *fmt, ...)
20 __attribute__ ((format (printf, 1, 2))); 25 __attribute__ ((format (printf, 1, 2)));
21 26
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 4b4cf8e21314..fb0a2a286dca 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -11,6 +11,12 @@
11 11
12#define DEBUG_EXPR 0 12#define DEBUG_EXPR 0
13 13
14static int expr_eq(struct expr *e1, struct expr *e2);
15static struct expr *expr_eliminate_yn(struct expr *e);
16static struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2);
17static struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
18static void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
19
14struct expr *expr_alloc_symbol(struct symbol *sym) 20struct expr *expr_alloc_symbol(struct symbol *sym)
15{ 21{
16 struct expr *e = xcalloc(1, sizeof(*e)); 22 struct expr *e = xcalloc(1, sizeof(*e));
@@ -186,7 +192,7 @@ void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)
186#undef e1 192#undef e1
187#undef e2 193#undef e2
188 194
189int expr_eq(struct expr *e1, struct expr *e2) 195static int expr_eq(struct expr *e1, struct expr *e2)
190{ 196{
191 int res, old_count; 197 int res, old_count;
192 198
@@ -228,7 +234,7 @@ int expr_eq(struct expr *e1, struct expr *e2)
228 return 0; 234 return 0;
229} 235}
230 236
231struct expr *expr_eliminate_yn(struct expr *e) 237static struct expr *expr_eliminate_yn(struct expr *e)
232{ 238{
233 struct expr *tmp; 239 struct expr *tmp;
234 240
@@ -823,7 +829,7 @@ bool expr_depends_symbol(struct expr *dep, struct symbol *sym)
823 return false; 829 return false;
824} 830}
825 831
826struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) 832static struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)
827{ 833{
828 struct expr *tmp = NULL; 834 struct expr *tmp = NULL;
829 expr_extract_eq(E_AND, &tmp, ep1, ep2); 835 expr_extract_eq(E_AND, &tmp, ep1, ep2);
@@ -834,7 +840,7 @@ struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)
834 return tmp; 840 return tmp;
835} 841}
836 842
837struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2) 843static struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)
838{ 844{
839 struct expr *tmp = NULL; 845 struct expr *tmp = NULL;
840 expr_extract_eq(E_OR, &tmp, ep1, ep2); 846 expr_extract_eq(E_OR, &tmp, ep1, ep2);
@@ -845,7 +851,7 @@ struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)
845 return tmp; 851 return tmp;
846} 852}
847 853
848void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2) 854static void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2)
849{ 855{
850#define e1 (*ep1) 856#define e1 (*ep1)
851#define e2 (*ep2) 857#define e2 (*ep2)
@@ -976,7 +982,7 @@ tristate expr_calc_value(struct expr *e)
976 } 982 }
977} 983}
978 984
979int expr_compare_type(enum expr_type t1, enum expr_type t2) 985static int expr_compare_type(enum expr_type t1, enum expr_type t2)
980{ 986{
981 if (t1 == t2) 987 if (t1 == t2)
982 return 0; 988 return 0;
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 412ea8a2abb8..a2fc96a2bd2c 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -205,18 +205,13 @@ struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
205struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); 205struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
206struct expr *expr_copy(const struct expr *org); 206struct expr *expr_copy(const struct expr *org);
207void expr_free(struct expr *e); 207void expr_free(struct expr *e);
208int expr_eq(struct expr *e1, struct expr *e2);
209void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); 208void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
210tristate expr_calc_value(struct expr *e); 209tristate expr_calc_value(struct expr *e);
211struct expr *expr_eliminate_yn(struct expr *e);
212struct expr *expr_trans_bool(struct expr *e); 210struct expr *expr_trans_bool(struct expr *e);
213struct expr *expr_eliminate_dups(struct expr *e); 211struct expr *expr_eliminate_dups(struct expr *e);
214struct expr *expr_transform(struct expr *e); 212struct expr *expr_transform(struct expr *e);
215int expr_contains_symbol(struct expr *dep, struct symbol *sym); 213int expr_contains_symbol(struct expr *dep, struct symbol *sym);
216bool expr_depends_symbol(struct expr *dep, struct symbol *sym); 214bool expr_depends_symbol(struct expr *dep, struct symbol *sym);
217struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2);
218struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
219void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
220struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym); 215struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
221struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2); 216struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2);
222 217
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 9f845eab56cb..91ca126ea080 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -68,9 +68,6 @@ struct kconf_id {
68 enum symbol_type stype; 68 enum symbol_type stype;
69}; 69};
70 70
71extern int zconfdebug;
72
73int zconfparse(void);
74void zconfdump(FILE *out); 71void zconfdump(FILE *out);
75void zconf_starthelp(void); 72void zconf_starthelp(void);
76FILE *zconf_fopen(const char *name); 73FILE *zconf_fopen(const char *name);
@@ -88,11 +85,6 @@ void sym_add_change_count(int count);
88bool conf_set_all_new_symbols(enum conf_def_mode mode); 85bool conf_set_all_new_symbols(enum conf_def_mode mode);
89void set_all_choice_values(struct symbol *csym); 86void set_all_choice_values(struct symbol *csym);
90 87
91struct conf_printer {
92 void (*print_symbol)(FILE *, struct symbol *, const char *, void *);
93 void (*print_comment)(FILE *, const char *, void *);
94};
95
96/* confdata.c and expr.c */ 88/* confdata.c and expr.c */
97static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) 89static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
98{ 90{
@@ -111,7 +103,6 @@ void menu_add_entry(struct symbol *sym);
111void menu_end_entry(void); 103void menu_end_entry(void);
112void menu_add_dep(struct expr *dep); 104void menu_add_dep(struct expr *dep);
113void menu_add_visibility(struct expr *dep); 105void menu_add_visibility(struct expr *dep);
114struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
115struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 106struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
116void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 107void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
117void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); 108void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
@@ -145,8 +136,6 @@ extern struct expr *sym_env_list;
145 136
146void sym_init(void); 137void sym_init(void);
147void sym_clear_all_valid(void); 138void sym_clear_all_valid(void);
148void sym_set_all_changed(void);
149void sym_set_changed(struct symbol *sym);
150struct symbol *sym_choice_default(struct symbol *sym); 139struct symbol *sym_choice_default(struct symbol *sym);
151const char *sym_get_string_default(struct symbol *sym); 140const char *sym_get_string_default(struct symbol *sym);
152struct symbol *sym_check_deps(struct symbol *sym); 141struct symbol *sym_check_deps(struct symbol *sym);
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index ceddbcf1e5ac..d5398718ec2a 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -22,7 +22,6 @@ struct menu * menu_get_root_menu(struct menu *menu);
22struct menu * menu_get_parent_menu(struct menu *menu); 22struct menu * menu_get_parent_menu(struct menu *menu);
23bool menu_has_help(struct menu *menu); 23bool menu_has_help(struct menu *menu);
24const char * menu_get_help(struct menu *menu); 24const char * menu_get_help(struct menu *menu);
25void get_symbol_str(struct gstr *r, struct symbol *sym, struct list_head *head);
26struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head); 25struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head);
27void menu_get_ext_help(struct menu *menu, struct gstr *help); 26void menu_get_ext_help(struct menu *menu, struct gstr *help);
28 27
@@ -45,11 +44,9 @@ bool sym_string_within_range(struct symbol *sym, const char *str);
45bool sym_set_string_value(struct symbol *sym, const char *newval); 44bool sym_set_string_value(struct symbol *sym, const char *newval);
46bool sym_is_changable(struct symbol *sym); 45bool sym_is_changable(struct symbol *sym);
47struct property * sym_get_choice_prop(struct symbol *sym); 46struct property * sym_get_choice_prop(struct symbol *sym);
48struct property * sym_get_default_prop(struct symbol *sym);
49const char * sym_get_string_value(struct symbol *sym); 47const char * sym_get_string_value(struct symbol *sym);
50 48
51const char * prop_get_type_name(enum prop_type type); 49const char * prop_get_type_name(enum prop_type type);
52 50
53/* expr.c */ 51/* expr.c */
54int expr_compare_type(enum expr_type t1, enum expr_type t2);
55void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken); 52void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken);
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 72c9dba84c5d..b05cc3d4a9be 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -125,7 +125,7 @@ void menu_set_type(int type)
125 sym_type_name(sym->type), sym_type_name(type)); 125 sym_type_name(sym->type), sym_type_name(type));
126} 126}
127 127
128struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) 128static struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep)
129{ 129{
130 struct property *prop = prop_alloc(type, current_entry->sym); 130 struct property *prop = prop_alloc(type, current_entry->sym);
131 131
@@ -615,7 +615,7 @@ static struct property *get_symbol_prop(struct symbol *sym)
615/* 615/*
616 * head is optional and may be NULL 616 * head is optional and may be NULL
617 */ 617 */
618void get_symbol_str(struct gstr *r, struct symbol *sym, 618static void get_symbol_str(struct gstr *r, struct symbol *sym,
619 struct list_head *head) 619 struct list_head *head)
620{ 620{
621 bool hit; 621 bool hit;
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 7caabdb51c64..6731377f9bb2 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -112,7 +112,7 @@ struct property *sym_get_env_prop(struct symbol *sym)
112 return NULL; 112 return NULL;
113} 113}
114 114
115struct property *sym_get_default_prop(struct symbol *sym) 115static struct property *sym_get_default_prop(struct symbol *sym)
116{ 116{
117 struct property *prop; 117 struct property *prop;
118 118
@@ -186,6 +186,26 @@ static void sym_validate_range(struct symbol *sym)
186 sym->curr.val = strdup(str); 186 sym->curr.val = strdup(str);
187} 187}
188 188
189static void sym_set_changed(struct symbol *sym)
190{
191 struct property *prop;
192
193 sym->flags |= SYMBOL_CHANGED;
194 for (prop = sym->prop; prop; prop = prop->next) {
195 if (prop->menu)
196 prop->menu->flags |= MENU_CHANGED;
197 }
198}
199
200static void sym_set_all_changed(void)
201{
202 struct symbol *sym;
203 int i;
204
205 for_all_symbols(i, sym)
206 sym_set_changed(sym);
207}
208
189static void sym_calc_visibility(struct symbol *sym) 209static void sym_calc_visibility(struct symbol *sym)
190{ 210{
191 struct property *prop; 211 struct property *prop;
@@ -451,26 +471,6 @@ void sym_clear_all_valid(void)
451 sym_calc_value(modules_sym); 471 sym_calc_value(modules_sym);
452} 472}
453 473
454void sym_set_changed(struct symbol *sym)
455{
456 struct property *prop;
457
458 sym->flags |= SYMBOL_CHANGED;
459 for (prop = sym->prop; prop; prop = prop->next) {
460 if (prop->menu)
461 prop->menu->flags |= MENU_CHANGED;
462 }
463}
464
465void sym_set_all_changed(void)
466{
467 struct symbol *sym;
468 int i;
469
470 for_all_symbols(i, sym)
471 sym_set_changed(sym);
472}
473
474bool sym_tristate_within_range(struct symbol *sym, tristate val) 474bool sym_tristate_within_range(struct symbol *sym, tristate val)
475{ 475{
476 int type = sym_get_type(sym); 476 int type = sym_get_type(sym);