diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 18:37:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 18:37:02 -0400 |
commit | c37efa932598de5e30330a1414e34d9e082e0d9e (patch) | |
tree | 1e3b782d257fa39a54f583af3dc7c32d7cffc67d /scripts/basic | |
parent | 9e12a7e7d89ad813d01092890010cf67d0f914bd (diff) | |
parent | abe1ee3a221d53778c3e58747bbec6e518e5471b (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/basic')
-rw-r--r-- | scripts/basic/docproc.c | 34 | ||||
-rw-r--r-- | scripts/basic/fixdep.c | 26 | ||||
-rw-r--r-- | scripts/basic/hash.c | 4 |
3 files changed, 32 insertions, 32 deletions
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 | ||
72 | static char *srctree, *kernsrctree; | 72 | static char *srctree, *kernsrctree; |
73 | 73 | ||
74 | void usage (void) | 74 | static 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 | */ |
87 | void exec_kernel_doc(char **svec) | 87 | static 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 | |||
129 | struct symfile symfilelist[MAXFILES]; | 129 | struct symfile symfilelist[MAXFILES]; |
130 | int symfilecnt = 0; | 130 | int symfilecnt = 0; |
131 | 131 | ||
132 | void add_new_symbol(struct symfile *sym, char * symname) | 132 | static 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 */ |
140 | struct symfile * add_new_file(char * filename) | 140 | static 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 */ |
147 | struct symfile * filename_exist(char * filename) | 147 | static 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 | */ |
160 | void adddep(char * file) { printf("\t%s", file); } | 160 | static void adddep(char * file) { printf("\t%s", file); } |
161 | void adddep2(char * file, char * line) { line = line; adddep(file); } | 161 | static void adddep2(char * file, char * line) { line = line; adddep(file); } |
162 | void noaction(char * line) { line = line; } | 162 | static void noaction(char * line) { line = line; } |
163 | void noaction2(char * file, char * line) { file = file; line = line; } | 163 | static 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 */ |
166 | void printline(char * line) { printf("%s", line); } | 166 | static 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 | */ |
173 | void find_export_symbols(char * filename) | 173 | static 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 | */ |
230 | void docfunctions(char * filename, char * type) | 230 | static 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 | } |
261 | void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); } | 261 | static void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); } |
262 | void extfunc(char * filename) { docfunctions(filename, FUNCTION); } | 262 | static 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 | */ |
269 | void singfunc(char * filename, char * line) | 269 | static 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 | */ |
300 | void docsect(char *filename, char *line) | 300 | static 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 | */ |
327 | void parse_file(FILE *infile) | 327 | static 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; | |||
124 | char *depfile; | 124 | char *depfile; |
125 | char *cmdline; | 125 | char *cmdline; |
126 | 126 | ||
127 | void usage(void) | 127 | static 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 | */ |
136 | void print_cmdline(void) | 136 | static 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 | */ |
149 | void grow_config(int len) | 149 | static 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 | */ |
165 | int is_defined_config(const char * name, int len) | 165 | static 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 | */ |
181 | void define_config(const char * name, int len) | 181 | static 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 | */ |
193 | void clear_config(void) | 193 | static 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 | */ |
202 | void use_config(char *m, int slen) | 202 | static 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 | ||
223 | void parse_config_file(char *map, size_t len) | 223 | static 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 */ |
257 | int strrcmp(char *s, char *sub) | 257 | static 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 | ||
268 | void do_config_file(char *filename) | 268 | static 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 | ||
299 | void parse_dep_file(void *map, size_t len) | 299 | static 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 | ||
339 | void print_deps(void) | 339 | static 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 | ||
371 | void traps(void) | 371 | static 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 | ||
24 | unsigned int djb2_hash(char *str) | 24 | static 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 | ||
37 | unsigned int r5_hash(char *str) | 37 | static unsigned int r5_hash(char *str) |
38 | { | 38 | { |
39 | unsigned long hash = 0; | 39 | unsigned long hash = 0; |
40 | int c; | 40 | int c; |