aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 18:37:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 18:37:02 -0400
commitc37efa932598de5e30330a1414e34d9e082e0d9e (patch)
tree1e3b782d257fa39a54f583af3dc7c32d7cffc67d /scripts
parent9e12a7e7d89ad813d01092890010cf67d0f914bd (diff)
parentabe1ee3a221d53778c3e58747bbec6e518e5471b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits) Use macros for .data.page_aligned section. Use macros for .bss.page_aligned section. Use new __init_task_data macro in arch init_task.c files. kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts. arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 kbuild: add static to prototypes kbuild: fail build if recordmcount.pl fails kbuild: set -fconserve-stack option for gcc 4.5 kbuild: echo the record_mcount command gconfig: disable "typeahead find" search in treeviews kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling checkincludes.pl: add option to remove duplicates in place markup_oops: use modinfo to avoid confusion with underscored module names checkincludes.pl: provide usage helper checkincludes.pl: close file as soon as we're done with it ctags: usability fix kernel hacking: move STRIP_ASM_SYMS from General gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma kbuild: Check if linker supports the -X option kbuild: introduce ld-option ... Fix trivial conflict in scripts/basic/fixdep.c
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include16
-rw-r--r--scripts/Makefile.build6
-rw-r--r--scripts/basic/docproc.c34
-rw-r--r--scripts/basic/fixdep.c26
-rw-r--r--scripts/basic/hash.c4
-rwxr-xr-xscripts/checkincludes.pl71
-rw-r--r--scripts/kconfig/conf.c24
-rw-r--r--scripts/kconfig/confdata.c2
-rw-r--r--scripts/kconfig/expr.c6
-rw-r--r--scripts/kconfig/gconf.c21
-rw-r--r--scripts/kconfig/gconf.glade4
-rw-r--r--scripts/kconfig/kxgettext.c4
-rw-r--r--scripts/kconfig/lkc_proto.h2
-rw-r--r--scripts/kconfig/mconf.c78
-rw-r--r--scripts/kconfig/menu.c84
-rw-r--r--scripts/kconfig/qconf.cc10
-rw-r--r--scripts/kconfig/symbol.c6
-rw-r--r--scripts/markup_oops.pl5
-rwxr-xr-xscripts/tags.sh3
19 files changed, 235 insertions, 171 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index c29be8f90248..4f9c1908593b 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -83,11 +83,12 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
83# is automatically cleaned up. 83# is automatically cleaned up.
84try-run = $(shell set -e; \ 84try-run = $(shell set -e; \
85 TMP="$(TMPOUT).$$$$.tmp"; \ 85 TMP="$(TMPOUT).$$$$.tmp"; \
86 TMPO="$(TMPOUT).$$$$.o"; \
86 if ($(1)) >/dev/null 2>&1; \ 87 if ($(1)) >/dev/null 2>&1; \
87 then echo "$(2)"; \ 88 then echo "$(2)"; \
88 else echo "$(3)"; \ 89 else echo "$(3)"; \
89 fi; \ 90 fi; \
90 rm -f "$$TMP") 91 rm -f "$$TMP" "$$TMPO")
91 92
92# as-option 93# as-option
93# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) 94# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
@@ -105,12 +106,12 @@ as-instr = $(call try-run,\
105# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) 106# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
106 107
107cc-option = $(call try-run,\ 108cc-option = $(call try-run,\
108 $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) 109 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
109 110
110# cc-option-yn 111# cc-option-yn
111# Usage: flag := $(call cc-option-yn,-march=winchip-c6) 112# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
112cc-option-yn = $(call try-run,\ 113cc-option-yn = $(call try-run,\
113 $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) 114 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
114 115
115# cc-option-align 116# cc-option-align
116# Prefix align with either -falign or -malign 117# Prefix align with either -falign or -malign
@@ -130,10 +131,15 @@ cc-fullversion = $(shell $(CONFIG_SHELL) \
130# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) 131# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
131cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) 132cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
132 133
134# cc-ldoption
135# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
136cc-ldoption = $(call try-run,\
137 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
138
133# ld-option 139# ld-option
134# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both) 140# Usage: LDFLAGS += $(call ld-option, -X)
135ld-option = $(call try-run,\ 141ld-option = $(call try-run,\
136 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) 142 $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
137 143
138###### 144######
139 145
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5c4b7a400c18..341b58902ffc 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -206,7 +206,7 @@ cmd_modversions = \
206endif 206endif
207 207
208ifdef CONFIG_FTRACE_MCOUNT_RECORD 208ifdef CONFIG_FTRACE_MCOUNT_RECORD
209cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ 209cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
210 "$(if $(CONFIG_64BIT),64,32)" \ 210 "$(if $(CONFIG_64BIT),64,32)" \
211 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ 211 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
212 "$(if $(part-of-module),1,0)" "$(@)"; 212 "$(if $(part-of-module),1,0)" "$(@)";
@@ -216,6 +216,7 @@ define rule_cc_o_c
216 $(call echo-cmd,checksrc) $(cmd_checksrc) \ 216 $(call echo-cmd,checksrc) $(cmd_checksrc) \
217 $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ 217 $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \
218 $(cmd_modversions) \ 218 $(cmd_modversions) \
219 $(call echo-cmd,record_mcount) \
219 $(cmd_record_mcount) \ 220 $(cmd_record_mcount) \
220 scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ 221 scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \
221 $(dot-target).tmp; \ 222 $(dot-target).tmp; \
@@ -269,7 +270,8 @@ targets += $(extra-y) $(MAKECMDGOALS) $(always)
269# Linker scripts preprocessor (.lds.S -> .lds) 270# Linker scripts preprocessor (.lds.S -> .lds)
270# --------------------------------------------------------------------------- 271# ---------------------------------------------------------------------------
271quiet_cmd_cpp_lds_S = LDS $@ 272quiet_cmd_cpp_lds_S = LDS $@
272 cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $< 273 cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
274 -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
273 275
274$(obj)/%.lds: $(src)/%.lds.S FORCE 276$(obj)/%.lds: $(src)/%.lds.S FORCE
275 $(call if_changed_dep,cpp_lds_S) 277 $(call if_changed_dep,cpp_lds_S)
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index 99ca7a698687..79ab973fb43a 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -71,7 +71,7 @@ FILELINE * docsection;
71 71
72static char *srctree, *kernsrctree; 72static char *srctree, *kernsrctree;
73 73
74void usage (void) 74static void usage (void)
75{ 75{
76 fprintf(stderr, "Usage: docproc {doc|depend} file\n"); 76 fprintf(stderr, "Usage: docproc {doc|depend} file\n");
77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); 77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
@@ -84,7 +84,7 @@ void usage (void)
84/* 84/*
85 * Execute kernel-doc with parameters given in svec 85 * Execute kernel-doc with parameters given in svec
86 */ 86 */
87void exec_kernel_doc(char **svec) 87static void exec_kernel_doc(char **svec)
88{ 88{
89 pid_t pid; 89 pid_t pid;
90 int ret; 90 int ret;
@@ -129,7 +129,7 @@ struct symfile
129struct symfile symfilelist[MAXFILES]; 129struct symfile symfilelist[MAXFILES];
130int symfilecnt = 0; 130int symfilecnt = 0;
131 131
132void add_new_symbol(struct symfile *sym, char * symname) 132static void add_new_symbol(struct symfile *sym, char * symname)
133{ 133{
134 sym->symbollist = 134 sym->symbollist =
135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); 135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
@@ -137,14 +137,14 @@ void add_new_symbol(struct symfile *sym, char * symname)
137} 137}
138 138
139/* Add a filename to the list */ 139/* Add a filename to the list */
140struct symfile * add_new_file(char * filename) 140static struct symfile * add_new_file(char * filename)
141{ 141{
142 symfilelist[symfilecnt++].filename = strdup(filename); 142 symfilelist[symfilecnt++].filename = strdup(filename);
143 return &symfilelist[symfilecnt - 1]; 143 return &symfilelist[symfilecnt - 1];
144} 144}
145 145
146/* Check if file already are present in the list */ 146/* Check if file already are present in the list */
147struct symfile * filename_exist(char * filename) 147static struct symfile * filename_exist(char * filename)
148{ 148{
149 int i; 149 int i;
150 for (i=0; i < symfilecnt; i++) 150 for (i=0; i < symfilecnt; i++)
@@ -157,20 +157,20 @@ struct symfile * filename_exist(char * filename)
157 * List all files referenced within the template file. 157 * List all files referenced within the template file.
158 * Files are separated by tabs. 158 * Files are separated by tabs.
159 */ 159 */
160void adddep(char * file) { printf("\t%s", file); } 160static void adddep(char * file) { printf("\t%s", file); }
161void adddep2(char * file, char * line) { line = line; adddep(file); } 161static void adddep2(char * file, char * line) { line = line; adddep(file); }
162void noaction(char * line) { line = line; } 162static void noaction(char * line) { line = line; }
163void noaction2(char * file, char * line) { file = file; line = line; } 163static void noaction2(char * file, char * line) { file = file; line = line; }
164 164
165/* Echo the line without further action */ 165/* Echo the line without further action */
166void printline(char * line) { printf("%s", line); } 166static void printline(char * line) { printf("%s", line); }
167 167
168/* 168/*
169 * Find all symbols in filename that are exported with EXPORT_SYMBOL & 169 * Find all symbols in filename that are exported with EXPORT_SYMBOL &
170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly). 170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
171 * All symbols located are stored in symfilelist. 171 * All symbols located are stored in symfilelist.
172 */ 172 */
173void find_export_symbols(char * filename) 173static void find_export_symbols(char * filename)
174{ 174{
175 FILE * fp; 175 FILE * fp;
176 struct symfile *sym; 176 struct symfile *sym;
@@ -227,7 +227,7 @@ void find_export_symbols(char * filename)
227 * intfunc uses -nofunction 227 * intfunc uses -nofunction
228 * extfunc uses -function 228 * extfunc uses -function
229 */ 229 */
230void docfunctions(char * filename, char * type) 230static void docfunctions(char * filename, char * type)
231{ 231{
232 int i,j; 232 int i,j;
233 int symcnt = 0; 233 int symcnt = 0;
@@ -258,15 +258,15 @@ void docfunctions(char * filename, char * type)
258 fflush(stdout); 258 fflush(stdout);
259 free(vec); 259 free(vec);
260} 260}
261void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); } 261static void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
262void extfunc(char * filename) { docfunctions(filename, FUNCTION); } 262static void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
263 263
264/* 264/*
265 * Document specific function(s) in a file. 265 * Document specific function(s) in a file.
266 * Call kernel-doc with the following parameters: 266 * Call kernel-doc with the following parameters:
267 * kernel-doc -docbook -function function1 [-function function2] 267 * kernel-doc -docbook -function function1 [-function function2]
268 */ 268 */
269void singfunc(char * filename, char * line) 269static void singfunc(char * filename, char * line)
270{ 270{
271 char *vec[200]; /* Enough for specific functions */ 271 char *vec[200]; /* Enough for specific functions */
272 int i, idx = 0; 272 int i, idx = 0;
@@ -297,7 +297,7 @@ void singfunc(char * filename, char * line)
297 * Call kernel-doc with the following parameters: 297 * Call kernel-doc with the following parameters:
298 * kernel-doc -docbook -function "doc section" filename 298 * kernel-doc -docbook -function "doc section" filename
299 */ 299 */
300void docsect(char *filename, char *line) 300static void docsect(char *filename, char *line)
301{ 301{
302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */ 302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */
303 char *s; 303 char *s;
@@ -324,7 +324,7 @@ void docsect(char *filename, char *line)
324 * 5) Lines containing !P 324 * 5) Lines containing !P
325 * 6) Default lines - lines not matching the above 325 * 6) Default lines - lines not matching the above
326 */ 326 */
327void parse_file(FILE *infile) 327static void parse_file(FILE *infile)
328{ 328{
329 char line[MAXLINESZ]; 329 char line[MAXLINESZ];
330 char * s; 330 char * s;
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 8ab448611680..6bf21f83837d 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -124,7 +124,7 @@ char *target;
124char *depfile; 124char *depfile;
125char *cmdline; 125char *cmdline;
126 126
127void usage(void) 127static void usage(void)
128{ 128{
129 fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n"); 129 fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n");
130 exit(1); 130 exit(1);
@@ -133,7 +133,7 @@ void usage(void)
133/* 133/*
134 * Print out the commandline prefixed with cmd_<target filename> := 134 * Print out the commandline prefixed with cmd_<target filename> :=
135 */ 135 */
136void print_cmdline(void) 136static void print_cmdline(void)
137{ 137{
138 printf("cmd_%s := %s\n\n", target, cmdline); 138 printf("cmd_%s := %s\n\n", target, cmdline);
139} 139}
@@ -146,7 +146,7 @@ int len_config = 0;
146 * Grow the configuration string to a desired length. 146 * Grow the configuration string to a desired length.
147 * Usually the first growth is plenty. 147 * Usually the first growth is plenty.
148 */ 148 */
149void grow_config(int len) 149static void grow_config(int len)
150{ 150{
151 while (len_config + len > size_config) { 151 while (len_config + len > size_config) {
152 if (size_config == 0) 152 if (size_config == 0)
@@ -162,7 +162,7 @@ void grow_config(int len)
162/* 162/*
163 * Lookup a value in the configuration string. 163 * Lookup a value in the configuration string.
164 */ 164 */
165int is_defined_config(const char * name, int len) 165static int is_defined_config(const char * name, int len)
166{ 166{
167 const char * pconfig; 167 const char * pconfig;
168 const char * plast = str_config + len_config - len; 168 const char * plast = str_config + len_config - len;
@@ -178,7 +178,7 @@ int is_defined_config(const char * name, int len)
178/* 178/*
179 * Add a new value to the configuration string. 179 * Add a new value to the configuration string.
180 */ 180 */
181void define_config(const char * name, int len) 181static void define_config(const char * name, int len)
182{ 182{
183 grow_config(len + 1); 183 grow_config(len + 1);
184 184
@@ -190,7 +190,7 @@ void define_config(const char * name, int len)
190/* 190/*
191 * Clear the set of configuration strings. 191 * Clear the set of configuration strings.
192 */ 192 */
193void clear_config(void) 193static void clear_config(void)
194{ 194{
195 len_config = 0; 195 len_config = 0;
196 define_config("", 0); 196 define_config("", 0);
@@ -199,7 +199,7 @@ void clear_config(void)
199/* 199/*
200 * Record the use of a CONFIG_* word. 200 * Record the use of a CONFIG_* word.
201 */ 201 */
202void use_config(char *m, int slen) 202static void use_config(char *m, int slen)
203{ 203{
204 char s[PATH_MAX]; 204 char s[PATH_MAX];
205 char *p; 205 char *p;
@@ -220,7 +220,7 @@ void use_config(char *m, int slen)
220 printf(" $(wildcard include/config/%s.h) \\\n", s); 220 printf(" $(wildcard include/config/%s.h) \\\n", s);
221} 221}
222 222
223void parse_config_file(char *map, size_t len) 223static void parse_config_file(char *map, size_t len)
224{ 224{
225 int *end = (int *) (map + len); 225 int *end = (int *) (map + len);
226 /* start at +1, so that p can never be < map */ 226 /* start at +1, so that p can never be < map */
@@ -254,7 +254,7 @@ void parse_config_file(char *map, size_t len)
254} 254}
255 255
256/* test is s ends in sub */ 256/* test is s ends in sub */
257int strrcmp(char *s, char *sub) 257static int strrcmp(char *s, char *sub)
258{ 258{
259 int slen = strlen(s); 259 int slen = strlen(s);
260 int sublen = strlen(sub); 260 int sublen = strlen(sub);
@@ -265,7 +265,7 @@ int strrcmp(char *s, char *sub)
265 return memcmp(s + slen - sublen, sub, sublen); 265 return memcmp(s + slen - sublen, sub, sublen);
266} 266}
267 267
268void do_config_file(char *filename) 268static void do_config_file(char *filename)
269{ 269{
270 struct stat st; 270 struct stat st;
271 int fd; 271 int fd;
@@ -296,7 +296,7 @@ void do_config_file(char *filename)
296 close(fd); 296 close(fd);
297} 297}
298 298
299void parse_dep_file(void *map, size_t len) 299static void parse_dep_file(void *map, size_t len)
300{ 300{
301 char *m = map; 301 char *m = map;
302 char *end = m + len; 302 char *end = m + len;
@@ -336,7 +336,7 @@ void parse_dep_file(void *map, size_t len)
336 printf("$(deps_%s):\n", target); 336 printf("$(deps_%s):\n", target);
337} 337}
338 338
339void print_deps(void) 339static void print_deps(void)
340{ 340{
341 struct stat st; 341 struct stat st;
342 int fd; 342 int fd;
@@ -368,7 +368,7 @@ void print_deps(void)
368 close(fd); 368 close(fd);
369} 369}
370 370
371void traps(void) 371static void traps(void)
372{ 372{
373 static char test[] __attribute__((aligned(sizeof(int)))) = "CONF"; 373 static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
374 int *p = (int *)test; 374 int *p = (int *)test;
diff --git a/scripts/basic/hash.c b/scripts/basic/hash.c
index 3299ad7fc8c0..2ef5d3f666b8 100644
--- a/scripts/basic/hash.c
+++ b/scripts/basic/hash.c
@@ -21,7 +21,7 @@ static void usage(void)
21 * http://www.cse.yorku.ca/~oz/hash.html 21 * http://www.cse.yorku.ca/~oz/hash.html
22 */ 22 */
23 23
24unsigned int djb2_hash(char *str) 24static unsigned int djb2_hash(char *str)
25{ 25{
26 unsigned long hash = 5381; 26 unsigned long hash = 5381;
27 int c; 27 int c;
@@ -34,7 +34,7 @@ unsigned int djb2_hash(char *str)
34 return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1)); 34 return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1));
35} 35}
36 36
37unsigned int r5_hash(char *str) 37static unsigned int r5_hash(char *str)
38{ 38{
39 unsigned long hash = 0; 39 unsigned long hash = 0;
40 int c; 40 int c;
diff --git a/scripts/checkincludes.pl b/scripts/checkincludes.pl
index 8e6b716c191c..676ddc07d6fa 100755
--- a/scripts/checkincludes.pl
+++ b/scripts/checkincludes.pl
@@ -1,24 +1,85 @@
1#!/usr/bin/perl 1#!/usr/bin/perl
2# 2#
3# checkincludes: Find files included more than once in (other) files. 3# checkincludes: find/remove files included more than once
4#
4# Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>. 5# Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>.
6# Copyright 2009 Luis R. Rodriguez <mcgrof@gmail.com>
7#
8# This script checks for duplicate includes. It also has support
9# to remove them in place. Note that this will not take into
10# consideration macros so you should run this only if you know
11# you do have real dups and do not have them under #ifdef's. You
12# could also just review the results.
13
14sub usage {
15 print "Usage: checkincludes.pl [-r]\n";
16 print "By default we just warn of duplicates\n";
17 print "To remove duplicated includes in place use -r\n";
18 exit 1;
19}
20
21my $remove = 0;
22
23if ($#ARGV < 0) {
24 usage();
25}
26
27if ($#ARGV >= 1) {
28 if ($ARGV[0] =~ /^-/) {
29 if ($ARGV[0] eq "-r") {
30 $remove = 1;
31 shift;
32 } else {
33 usage();
34 }
35 }
36}
5 37
6foreach $file (@ARGV) { 38foreach $file (@ARGV) {
7 open(FILE, $file) or die "Cannot open $file: $!.\n"; 39 open(FILE, $file) or die "Cannot open $file: $!.\n";
8 40
9 my %includedfiles = (); 41 my %includedfiles = ();
42 my @file_lines = ();
10 43
11 while (<FILE>) { 44 while (<FILE>) {
12 if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) { 45 if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) {
13 ++$includedfiles{$1}; 46 ++$includedfiles{$1};
14 } 47 }
48 push(@file_lines, $_);
15 } 49 }
16 50
17 foreach $filename (keys %includedfiles) { 51 close(FILE);
18 if ($includedfiles{$filename} > 1) { 52
19 print "$file: $filename is included more than once.\n"; 53 if (!$remove) {
54 foreach $filename (keys %includedfiles) {
55 if ($includedfiles{$filename} > 1) {
56 print "$file: $filename is included more than once.\n";
57 }
20 } 58 }
59 next;
21 } 60 }
22 61
62 open(FILE,">$file") || die("Cannot write to $file: $!");
63
64 my $dups = 0;
65 foreach (@file_lines) {
66 if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) {
67 foreach $filename (keys %includedfiles) {
68 if ($1 eq $filename) {
69 if ($includedfiles{$filename} > 1) {
70 $includedfiles{$filename}--;
71 $dups++;
72 } else {
73 print FILE $_;
74 }
75 }
76 }
77 } else {
78 print FILE $_;
79 }
80 }
81 if ($dups > 0) {
82 print "$file: removed $dups duplicate includes\n";
83 }
23 close(FILE); 84 close(FILE);
24} 85}
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 3baaaecd6b13..9960d1c303f8 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -38,14 +38,14 @@ static int conf_cnt;
38static char line[128]; 38static char line[128];
39static struct menu *rootEntry; 39static struct menu *rootEntry;
40 40
41static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); 41static void print_help(struct menu *menu)
42
43static const char *get_help(struct menu *menu)
44{ 42{
45 if (menu_has_help(menu)) 43 struct gstr help = str_new();
46 return _(menu_get_help(menu)); 44
47 else 45 menu_get_ext_help(menu, &help);
48 return nohelp_text; 46
47 printf("\n%s\n", str_get(&help));
48 str_free(&help);
49} 49}
50 50
51static void strip(char *str) 51static void strip(char *str)
@@ -121,7 +121,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
121 return 1; 121 return 1;
122} 122}
123 123
124int conf_string(struct menu *menu) 124static int conf_string(struct menu *menu)
125{ 125{
126 struct symbol *sym = menu->sym; 126 struct symbol *sym = menu->sym;
127 const char *def; 127 const char *def;
@@ -140,7 +140,7 @@ int conf_string(struct menu *menu)
140 case '?': 140 case '?':
141 /* print help */ 141 /* print help */
142 if (line[1] == '\n') { 142 if (line[1] == '\n') {
143 printf("\n%s\n", get_help(menu)); 143 print_help(menu);
144 def = NULL; 144 def = NULL;
145 break; 145 break;
146 } 146 }
@@ -220,7 +220,7 @@ static int conf_sym(struct menu *menu)
220 if (sym_set_tristate_value(sym, newval)) 220 if (sym_set_tristate_value(sym, newval))
221 return 0; 221 return 0;
222help: 222help:
223 printf("\n%s\n", get_help(menu)); 223 print_help(menu);
224 } 224 }
225} 225}
226 226
@@ -307,7 +307,7 @@ static int conf_choice(struct menu *menu)
307 fgets(line, 128, stdin); 307 fgets(line, 128, stdin);
308 strip(line); 308 strip(line);
309 if (line[0] == '?') { 309 if (line[0] == '?') {
310 printf("\n%s\n", get_help(menu)); 310 print_help(menu);
311 continue; 311 continue;
312 } 312 }
313 if (!line[0]) 313 if (!line[0])
@@ -331,7 +331,7 @@ static int conf_choice(struct menu *menu)
331 if (!child) 331 if (!child)
332 continue; 332 continue;
333 if (line[strlen(line) - 1] == '?') { 333 if (line[strlen(line) - 1] == '?') {
334 printf("\n%s\n", get_help(child)); 334 print_help(child);
335 continue; 335 continue;
336 } 336 }
337 sym_set_choice_value(sym, child->sym); 337 sym_set_choice_value(sym, child->sym);
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index a04da3459f0f..b55e72ff2fc6 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -560,7 +560,7 @@ int conf_write(const char *name)
560 return 0; 560 return 0;
561} 561}
562 562
563int conf_split_config(void) 563static int conf_split_config(void)
564{ 564{
565 const char *name; 565 const char *name;
566 char path[128]; 566 char path[128];
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 579ece4fa584..edd3f39a080a 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -348,7 +348,7 @@ struct expr *expr_trans_bool(struct expr *e)
348/* 348/*
349 * e1 || e2 -> ? 349 * e1 || e2 -> ?
350 */ 350 */
351struct expr *expr_join_or(struct expr *e1, struct expr *e2) 351static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
352{ 352{
353 struct expr *tmp; 353 struct expr *tmp;
354 struct symbol *sym1, *sym2; 354 struct symbol *sym1, *sym2;
@@ -412,7 +412,7 @@ struct expr *expr_join_or(struct expr *e1, struct expr *e2)
412 return NULL; 412 return NULL;
413} 413}
414 414
415struct expr *expr_join_and(struct expr *e1, struct expr *e2) 415static struct expr *expr_join_and(struct expr *e1, struct expr *e2)
416{ 416{
417 struct expr *tmp; 417 struct expr *tmp;
418 struct symbol *sym1, *sym2; 418 struct symbol *sym1, *sym2;
@@ -1098,6 +1098,8 @@ void expr_fprint(struct expr *e, FILE *out)
1098static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) 1098static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
1099{ 1099{
1100 str_append((struct gstr*)data, str); 1100 str_append((struct gstr*)data, str);
1101 if (sym)
1102 str_printf((struct gstr*)data, " [=%s]", sym_get_string_value(sym));
1101} 1103}
1102 1104
1103void expr_gstr_print(struct expr *e, struct gstr *gs) 1105void expr_gstr_print(struct expr *e, struct gstr *gs)
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 199b22bb49e2..65464366fe38 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -456,19 +456,9 @@ static void text_insert_help(struct menu *menu)
456 GtkTextBuffer *buffer; 456 GtkTextBuffer *buffer;
457 GtkTextIter start, end; 457 GtkTextIter start, end;
458 const char *prompt = _(menu_get_prompt(menu)); 458 const char *prompt = _(menu_get_prompt(menu));
459 gchar *name; 459 struct gstr help = str_new();
460 const char *help;
461 460
462 help = menu_get_help(menu); 461 menu_get_ext_help(menu, &help);
463
464 /* Gettextize if the help text not empty */
465 if ((help != 0) && (help[0] != 0))
466 help = _(help);
467
468 if (menu->sym && menu->sym->name)
469 name = g_strdup_printf(menu->sym->name);
470 else
471 name = g_strdup("");
472 462
473 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); 463 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
474 gtk_text_buffer_get_bounds(buffer, &start, &end); 464 gtk_text_buffer_get_bounds(buffer, &start, &end);
@@ -478,14 +468,11 @@ static void text_insert_help(struct menu *menu)
478 gtk_text_buffer_get_end_iter(buffer, &end); 468 gtk_text_buffer_get_end_iter(buffer, &end);
479 gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, 469 gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1,
480 NULL); 470 NULL);
481 gtk_text_buffer_insert_at_cursor(buffer, " ", 1);
482 gtk_text_buffer_get_end_iter(buffer, &end);
483 gtk_text_buffer_insert_with_tags(buffer, &end, name, -1, tag1,
484 NULL);
485 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); 471 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
486 gtk_text_buffer_get_end_iter(buffer, &end); 472 gtk_text_buffer_get_end_iter(buffer, &end);
487 gtk_text_buffer_insert_with_tags(buffer, &end, help, -1, tag2, 473 gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2,
488 NULL); 474 NULL);
475 str_free(&help);
489} 476}
490 477
491 478
diff --git a/scripts/kconfig/gconf.glade b/scripts/kconfig/gconf.glade
index 803233fdd6dd..b1c86c19292c 100644
--- a/scripts/kconfig/gconf.glade
+++ b/scripts/kconfig/gconf.glade
@@ -547,7 +547,7 @@
547 <property name="headers_visible">True</property> 547 <property name="headers_visible">True</property>
548 <property name="rules_hint">False</property> 548 <property name="rules_hint">False</property>
549 <property name="reorderable">False</property> 549 <property name="reorderable">False</property>
550 <property name="enable_search">True</property> 550 <property name="enable_search">False</property>
551 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/> 551 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/>
552 <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/> 552 <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/>
553 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/> 553 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/>
@@ -582,7 +582,7 @@
582 <property name="headers_visible">True</property> 582 <property name="headers_visible">True</property>
583 <property name="rules_hint">False</property> 583 <property name="rules_hint">False</property>
584 <property name="reorderable">False</property> 584 <property name="reorderable">False</property>
585 <property name="enable_search">True</property> 585 <property name="enable_search">False</property>
586 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/> 586 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/>
587 <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/> 587 <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/>
588 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/> 588 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
diff --git a/scripts/kconfig/kxgettext.c b/scripts/kconfig/kxgettext.c
index 8d9ce22b0fc5..dcc3fcc0cc9a 100644
--- a/scripts/kconfig/kxgettext.c
+++ b/scripts/kconfig/kxgettext.c
@@ -166,7 +166,7 @@ static int message__add(const char *msg, char *option, char *file, int lineno)
166 return rc; 166 return rc;
167} 167}
168 168
169void menu_build_message_list(struct menu *menu) 169static void menu_build_message_list(struct menu *menu)
170{ 170{
171 struct menu *child; 171 struct menu *child;
172 172
@@ -211,7 +211,7 @@ static void message__print_gettext_msgid_msgstr(struct message *self)
211 "msgstr \"\"\n", self->msg); 211 "msgstr \"\"\n", self->msg);
212} 212}
213 213
214void menu__xgettext(void) 214static void menu__xgettext(void)
215{ 215{
216 struct message *m = message__list; 216 struct message *m = message__list;
217 217
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index 8e69461313d1..ffeb532b2cff 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -17,6 +17,8 @@ P(menu_get_root_menu,struct menu *,(struct menu *menu));
17P(menu_get_parent_menu,struct menu *,(struct menu *menu)); 17P(menu_get_parent_menu,struct menu *,(struct menu *menu));
18P(menu_has_help,bool,(struct menu *menu)); 18P(menu_has_help,bool,(struct menu *menu));
19P(menu_get_help,const char *,(struct menu *menu)); 19P(menu_get_help,const char *,(struct menu *menu));
20P(get_symbol_str,void,(struct gstr *r, struct symbol *sym));
21P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));
20 22
21/* symbol.c */ 23/* symbol.c */
22P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); 24P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 25b60bc117f7..d82953573588 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -199,8 +199,6 @@ inputbox_instructions_string[] = N_(
199setmod_text[] = N_( 199setmod_text[] = N_(
200 "This feature depends on another which has been configured as a module.\n" 200 "This feature depends on another which has been configured as a module.\n"
201 "As a result, this feature will be built as a module."), 201 "As a result, this feature will be built as a module."),
202nohelp_text[] = N_(
203 "There is no help available for this kernel option.\n"),
204load_config_text[] = N_( 202load_config_text[] = N_(
205 "Enter the name of the configuration file you wish to load. " 203 "Enter the name of the configuration file you wish to load. "
206 "Accept the name shown to restore the configuration you " 204 "Accept the name shown to restore the configuration you "
@@ -284,66 +282,6 @@ static void show_textbox(const char *title, const char *text, int r, int c);
284static void show_helptext(const char *title, const char *text); 282static void show_helptext(const char *title, const char *text);
285static void show_help(struct menu *menu); 283static void show_help(struct menu *menu);
286 284
287static void get_prompt_str(struct gstr *r, struct property *prop)
288{
289 int i, j;
290 struct menu *submenu[8], *menu;
291
292 str_printf(r, _("Prompt: %s\n"), _(prop->text));
293 str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
294 prop->menu->lineno);
295 if (!expr_is_yes(prop->visible.expr)) {
296 str_append(r, _(" Depends on: "));
297 expr_gstr_print(prop->visible.expr, r);
298 str_append(r, "\n");
299 }
300 menu = prop->menu->parent;
301 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
302 submenu[i++] = menu;
303 if (i > 0) {
304 str_printf(r, _(" Location:\n"));
305 for (j = 4; --i >= 0; j += 2) {
306 menu = submenu[i];
307 str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
308 if (menu->sym) {
309 str_printf(r, " (%s [=%s])", menu->sym->name ?
310 menu->sym->name : _("<choice>"),
311 sym_get_string_value(menu->sym));
312 }
313 str_append(r, "\n");
314 }
315 }
316}
317
318static void get_symbol_str(struct gstr *r, struct symbol *sym)
319{
320 bool hit;
321 struct property *prop;
322
323 if (sym && sym->name)
324 str_printf(r, "Symbol: %s [=%s]\n", sym->name,
325 sym_get_string_value(sym));
326 for_all_prompts(sym, prop)
327 get_prompt_str(r, prop);
328 hit = false;
329 for_all_properties(sym, prop, P_SELECT) {
330 if (!hit) {
331 str_append(r, " Selects: ");
332 hit = true;
333 } else
334 str_printf(r, " && ");
335 expr_gstr_print(prop->expr, r);
336 }
337 if (hit)
338 str_append(r, "\n");
339 if (sym->rev_dep.expr) {
340 str_append(r, _(" Selected by: "));
341 expr_gstr_print(sym->rev_dep.expr, r);
342 str_append(r, "\n");
343 }
344 str_append(r, "\n\n");
345}
346
347static struct gstr get_relations_str(struct symbol **sym_arr) 285static struct gstr get_relations_str(struct symbol **sym_arr)
348{ 286{
349 struct symbol *sym; 287 struct symbol *sym;
@@ -699,19 +637,9 @@ static void show_helptext(const char *title, const char *text)
699static void show_help(struct menu *menu) 637static void show_help(struct menu *menu)
700{ 638{
701 struct gstr help = str_new(); 639 struct gstr help = str_new();
702 struct symbol *sym = menu->sym; 640
703 641 menu_get_ext_help(menu, &help);
704 if (menu_has_help(menu)) 642
705 {
706 if (sym->name) {
707 str_printf(&help, "CONFIG_%s:\n\n", sym->name);
708 str_append(&help, _(menu_get_help(menu)));
709 str_append(&help, "\n");
710 }
711 } else {
712 str_append(&help, nohelp_text);
713 }
714 get_symbol_str(&help, sym);
715 show_helptext(_(menu_get_prompt(menu)), str_get(&help)); 643 show_helptext(_(menu_get_prompt(menu)), str_get(&help));
716 str_free(&help); 644 str_free(&help);
717} 645}
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 07ff8d105c9d..059a2465c574 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -9,6 +9,9 @@
9#define LKC_DIRECT_LINK 9#define LKC_DIRECT_LINK
10#include "lkc.h" 10#include "lkc.h"
11 11
12static const char nohelp_text[] = N_(
13 "There is no help available for this kernel option.\n");
14
12struct menu rootmenu; 15struct menu rootmenu;
13static struct menu **last_entry_ptr; 16static struct menu **last_entry_ptr;
14 17
@@ -74,7 +77,7 @@ void menu_end_menu(void)
74 current_menu = current_menu->parent; 77 current_menu = current_menu->parent;
75} 78}
76 79
77struct expr *menu_check_dep(struct expr *e) 80static struct expr *menu_check_dep(struct expr *e)
78{ 81{
79 if (!e) 82 if (!e)
80 return e; 83 return e;
@@ -184,7 +187,7 @@ static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
184 (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); 187 (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name));
185} 188}
186 189
187void sym_check_prop(struct symbol *sym) 190static void sym_check_prop(struct symbol *sym)
188{ 191{
189 struct property *prop; 192 struct property *prop;
190 struct symbol *sym2; 193 struct symbol *sym2;
@@ -451,3 +454,80 @@ const char *menu_get_help(struct menu *menu)
451 else 454 else
452 return ""; 455 return "";
453} 456}
457
458static void get_prompt_str(struct gstr *r, struct property *prop)
459{
460 int i, j;
461 struct menu *submenu[8], *menu;
462
463 str_printf(r, _("Prompt: %s\n"), _(prop->text));
464 str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
465 prop->menu->lineno);
466 if (!expr_is_yes(prop->visible.expr)) {
467 str_append(r, _(" Depends on: "));
468 expr_gstr_print(prop->visible.expr, r);
469 str_append(r, "\n");
470 }
471 menu = prop->menu->parent;
472 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
473 submenu[i++] = menu;
474 if (i > 0) {
475 str_printf(r, _(" Location:\n"));
476 for (j = 4; --i >= 0; j += 2) {
477 menu = submenu[i];
478 str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
479 if (menu->sym) {
480 str_printf(r, " (%s [=%s])", menu->sym->name ?
481 menu->sym->name : _("<choice>"),
482 sym_get_string_value(menu->sym));
483 }
484 str_append(r, "\n");
485 }
486 }
487}
488
489void get_symbol_str(struct gstr *r, struct symbol *sym)
490{
491 bool hit;
492 struct property *prop;
493
494 if (sym && sym->name)
495 str_printf(r, "Symbol: %s [=%s]\n", sym->name,
496 sym_get_string_value(sym));
497 for_all_prompts(sym, prop)
498 get_prompt_str(r, prop);
499 hit = false;
500 for_all_properties(sym, prop, P_SELECT) {
501 if (!hit) {
502 str_append(r, " Selects: ");
503 hit = true;
504 } else
505 str_printf(r, " && ");
506 expr_gstr_print(prop->expr, r);
507 }
508 if (hit)
509 str_append(r, "\n");
510 if (sym->rev_dep.expr) {
511 str_append(r, _(" Selected by: "));
512 expr_gstr_print(sym->rev_dep.expr, r);
513 str_append(r, "\n");
514 }
515 str_append(r, "\n\n");
516}
517
518void menu_get_ext_help(struct menu *menu, struct gstr *help)
519{
520 struct symbol *sym = menu->sym;
521
522 if (menu_has_help(menu)) {
523 if (sym->name) {
524 str_printf(help, "CONFIG_%s:\n\n", sym->name);
525 str_append(help, _(menu_get_help(menu)));
526 str_append(help, "\n");
527 }
528 } else {
529 str_append(help, nohelp_text);
530 }
531 if (sym)
532 get_symbol_str(help, sym);
533}
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index ce7d508c7520..00c51507cfcc 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1042,12 +1042,10 @@ void ConfigInfoView::menuInfo(void)
1042 if (showDebug()) 1042 if (showDebug())
1043 debug = debug_info(sym); 1043 debug = debug_info(sym);
1044 1044
1045 help = menu_get_help(menu); 1045 struct gstr help_gstr = str_new();
1046 /* Gettextize if the help text not empty */ 1046 menu_get_ext_help(menu, &help_gstr);
1047 if (help.isEmpty()) 1047 help = print_filter(str_get(&help_gstr));
1048 help = print_filter(menu_get_help(menu)); 1048 str_free(&help_gstr);
1049 else
1050 help = print_filter(_(menu_get_help(menu)));
1051 } else if (menu->prompt) { 1049 } else if (menu->prompt) {
1052 head += "<big><b>"; 1050 head += "<big><b>";
1053 head += print_filter(_(menu->prompt->text)); 1051 head += print_filter(_(menu->prompt->text));
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 18f3e5c33634..6c8fbbb66ebc 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -36,7 +36,7 @@ tristate modules_val;
36 36
37struct expr *sym_env_list; 37struct expr *sym_env_list;
38 38
39void sym_add_default(struct symbol *sym, const char *def) 39static void sym_add_default(struct symbol *sym, const char *def)
40{ 40{
41 struct property *prop = prop_alloc(P_DEFAULT, sym); 41 struct property *prop = prop_alloc(P_DEFAULT, sym);
42 42
@@ -125,7 +125,7 @@ struct property *sym_get_default_prop(struct symbol *sym)
125 return NULL; 125 return NULL;
126} 126}
127 127
128struct property *sym_get_range_prop(struct symbol *sym) 128static struct property *sym_get_range_prop(struct symbol *sym)
129{ 129{
130 struct property *prop; 130 struct property *prop;
131 131
@@ -943,7 +943,7 @@ const char *prop_get_type_name(enum prop_type type)
943 return "unknown"; 943 return "unknown";
944} 944}
945 945
946void prop_add_env(const char *env) 946static void prop_add_env(const char *env)
947{ 947{
948 struct symbol *sym, *sym2; 948 struct symbol *sym, *sym2;
949 struct property *prop; 949 struct property *prop;
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 89774011965d..5f0fcb712e29 100644
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -184,10 +184,7 @@ if ($target eq "0") {
184 184
185# if it's a module, we need to find the .ko file and calculate a load offset 185# if it's a module, we need to find the .ko file and calculate a load offset
186if ($module ne "") { 186if ($module ne "") {
187 my $dir = dirname($filename); 187 my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`;
188 $dir = $dir . "/";
189 my $mod = $module . ".ko";
190 my $modulefile = `find $dir -name $mod | head -1`;
191 chomp($modulefile); 188 chomp($modulefile);
192 $filename = $modulefile; 189 $filename = $modulefile;
193 if ($filename eq "") { 190 if ($filename eq "") {
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 4a34ec591e8c..d52f7a01557c 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -101,7 +101,8 @@ exuberant()
101 -I ____cacheline_aligned_in_smp \ 101 -I ____cacheline_aligned_in_smp \
102 -I ____cacheline_internodealigned_in_smp \ 102 -I ____cacheline_internodealigned_in_smp \
103 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ 103 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
104 --extra=+f --c-kinds=+px \ 104 -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
105 --extra=+f --c-kinds=-px \
105 --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' \ 106 --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' \
106 --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' 107 --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/'
107 108