aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.asm-generic1
-rw-r--r--scripts/Makefile.host1
-rw-r--r--scripts/basic/fixdep.c8
-rwxr-xr-xscripts/checkstack.pl1
-rw-r--r--scripts/coccinelle/misc/of_table.cocci62
-rw-r--r--scripts/coccinelle/misc/returnvar.cocci66
-rwxr-xr-xscripts/config1
-rw-r--r--scripts/docproc.c56
-rw-r--r--scripts/dtc/.gitignore1
-rw-r--r--scripts/dtc/fstree.c1
-rw-r--r--scripts/dtc/libfdt/fdt_empty_tree.c1
-rw-r--r--scripts/dtc/treesource.c1
-rwxr-xr-xscripts/headers.sh2
-rw-r--r--scripts/kallsyms.c2
-rw-r--r--scripts/kconfig/Makefile1
-rwxr-xr-xscripts/kconfig/check.sh1
-rw-r--r--scripts/kconfig/conf.c2
-rw-r--r--scripts/kconfig/gconf.c2
-rw-r--r--scripts/kconfig/lxdialog/checklist.c4
-rw-r--r--scripts/kconfig/lxdialog/inputbox.c2
-rw-r--r--scripts/kconfig/lxdialog/menubox.c4
-rw-r--r--scripts/kconfig/lxdialog/util.c2
-rw-r--r--scripts/kconfig/mconf.c3
-rw-r--r--scripts/kconfig/menu.c6
-rw-r--r--scripts/kconfig/nconf.c1
-rw-r--r--scripts/kconfig/util.c2
-rw-r--r--scripts/kconfig/zconf.l4
-rw-r--r--scripts/kconfig/zconf.lex.c_shipped4
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped2
-rw-r--r--scripts/kconfig/zconf.y2
-rw-r--r--scripts/markup_oops.pl1
-rw-r--r--scripts/mksysmap1
-rw-r--r--scripts/mod/.gitignore1
-rw-r--r--scripts/mod/file2alias.c42
-rw-r--r--scripts/mod/mk_elfconfig.c1
-rw-r--r--scripts/mod/modpost.c30
-rw-r--r--scripts/mod/sumversion.c4
-rwxr-xr-xscripts/objdiff74
-rw-r--r--scripts/package/Makefile1
-rw-r--r--scripts/package/builddeb10
-rw-r--r--scripts/package/buildtar1
-rw-r--r--scripts/pnmtologo.c1
-rw-r--r--scripts/recordmcount.c2
-rw-r--r--scripts/rt-tester/check-all.sh1
-rw-r--r--scripts/rt-tester/rt-tester.py2
-rw-r--r--scripts/selinux/install_policy.sh1
-rwxr-xr-xscripts/show_delta1
-rwxr-xr-xscripts/tags.sh29
48 files changed, 290 insertions, 159 deletions
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic
index d17e0ea911ed..045e0098e962 100644
--- a/scripts/Makefile.asm-generic
+++ b/scripts/Makefile.asm-generic
@@ -21,4 +21,3 @@ all: $(patsubst %, $(obj)/%, $(generic-y))
21 21
22$(obj)/%.h: 22$(obj)/%.h:
23 $(call cmd,wrap) 23 $(call cmd,wrap)
24
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 0f0d6ba87e42..66893643fd7d 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -167,4 +167,3 @@ $(host-cshlib): $(obj)/%: $(host-cshobjs) FORCE
167 167
168targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ 168targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\
169 $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) 169 $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs)
170
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 078fe1d64e7d..b30406860b73 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -409,10 +409,10 @@ static void print_deps(void)
409 exit(2); 409 exit(2);
410 } 410 }
411 if (fstat(fd, &st) < 0) { 411 if (fstat(fd, &st) < 0) {
412 fprintf(stderr, "fixdep: error fstat'ing depfile: "); 412 fprintf(stderr, "fixdep: error fstat'ing depfile: ");
413 perror(depfile); 413 perror(depfile);
414 exit(2); 414 exit(2);
415 } 415 }
416 if (st.st_size == 0) { 416 if (st.st_size == 0) {
417 fprintf(stderr,"fixdep: %s is empty\n",depfile); 417 fprintf(stderr,"fixdep: %s is empty\n",depfile);
418 close(fd); 418 close(fd);
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 544aa56b6200..c05d586b1fee 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -173,4 +173,3 @@ while (my $line = <STDIN>) {
173 173
174# Sort output by size (last field) 174# Sort output by size (last field)
175print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; 175print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack;
176
diff --git a/scripts/coccinelle/misc/of_table.cocci b/scripts/coccinelle/misc/of_table.cocci
new file mode 100644
index 000000000000..3c934046a060
--- /dev/null
+++ b/scripts/coccinelle/misc/of_table.cocci
@@ -0,0 +1,62 @@
1/// Make sure of_device_id tables are NULL terminated
2//
3// Keywords: of_table
4// Confidence: Medium
5// Options: --include-headers
6
7virtual patch
8virtual context
9virtual org
10virtual report
11
12@depends on context@
13identifier var, arr;
14expression E;
15@@
16struct of_device_id arr[] = {
17 ...,
18 {
19 .var = E,
20* }
21};
22
23@depends on patch@
24identifier var, arr;
25expression E;
26@@
27struct of_device_id arr[] = {
28 ...,
29 {
30 .var = E,
31- }
32+ },
33+ { }
34};
35
36@r depends on org || report@
37position p1;
38identifier var, arr;
39expression E;
40@@
41struct of_device_id arr[] = {
42 ...,
43 {
44 .var = E,
45 }
46 @p1
47};
48
49@script:python depends on org@
50p1 << r.p1;
51arr << r.arr;
52@@
53
54cocci.print_main(arr,p1)
55
56@script:python depends on report@
57p1 << r.p1;
58arr << r.arr;
59@@
60
61msg = "%s is not NULL terminated at line %s" % (arr, p1[0].line)
62coccilib.report.print_report(p1[0],msg)
diff --git a/scripts/coccinelle/misc/returnvar.cocci b/scripts/coccinelle/misc/returnvar.cocci
new file mode 100644
index 000000000000..605955a91c44
--- /dev/null
+++ b/scripts/coccinelle/misc/returnvar.cocci
@@ -0,0 +1,66 @@
1///
2/// Removes unneeded variable used to store return value.
3///
4// Confidence: Moderate
5// Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. GPLv2.
6// URL: http://coccinelle.lip6.fr/
7// Comments: Comments on code can be deleted if near code that is removed.
8// "when strict" can be removed to get more hits, but adds false
9// positives
10// Options: --no-includes --include-headers
11
12virtual patch
13virtual report
14virtual context
15virtual org
16
17@depends on patch@
18type T;
19constant C;
20identifier ret;
21@@
22- T ret = C;
23... when != ret
24 when strict
25return
26- ret
27+ C
28;
29
30@depends on context@
31type T;
32constant C;
33identifier ret;
34@@
35* T ret = C;
36... when != ret
37 when strict
38* return ret;
39
40@r1 depends on report || org@
41type T;
42constant C;
43identifier ret;
44position p1, p2;
45@@
46T ret@p1 = C;
47... when != ret
48 when strict
49return ret@p2;
50
51@script:python depends on report@
52p1 << r1.p1;
53p2 << r1.p2;
54C << r1.C;
55ret << r1.ret;
56@@
57coccilib.report.print_report(p1[0], "Unneeded variable: \"" + ret + "\". Return \"" + C + "\" on line " + p2[0].line)
58
59@script:python depends on org@
60p1 << r1.p1;
61p2 << r1.p2;
62C << r1.C;
63ret << r1.ret;
64@@
65cocci.print_main("unneeded \"" + ret + "\" variable", p1)
66cocci.print_sec("return " + C + " here", p2)
diff --git a/scripts/config b/scripts/config
index 68041793698c..026aeb4f32ee 100755
--- a/scripts/config
+++ b/scripts/config
@@ -223,4 +223,3 @@ while [ "$1" != "" ] ; do
223 ;; 223 ;;
224 esac 224 esac
225done 225done
226
diff --git a/scripts/docproc.c b/scripts/docproc.c
index 2b69eaf5b646..e267e621431a 100644
--- a/scripts/docproc.c
+++ b/scripts/docproc.c
@@ -154,7 +154,7 @@ int symfilecnt = 0;
154static void add_new_symbol(struct symfile *sym, char * symname) 154static void add_new_symbol(struct symfile *sym, char * symname)
155{ 155{
156 sym->symbollist = 156 sym->symbollist =
157 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); 157 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
158 sym->symbollist[sym->symbolcnt++].name = strdup(symname); 158 sym->symbollist[sym->symbolcnt++].name = strdup(symname);
159} 159}
160 160
@@ -215,7 +215,7 @@ static void find_export_symbols(char * filename)
215 char *p; 215 char *p;
216 char *e; 216 char *e;
217 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) || 217 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) ||
218 ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) { 218 ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) {
219 /* Skip EXPORT_SYMBOL{_GPL} */ 219 /* Skip EXPORT_SYMBOL{_GPL} */
220 while (isalnum(*p) || *p == '_') 220 while (isalnum(*p) || *p == '_')
221 p++; 221 p++;
@@ -291,28 +291,28 @@ static void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
291static void singfunc(char * filename, char * line) 291static void singfunc(char * filename, char * line)
292{ 292{
293 char *vec[200]; /* Enough for specific functions */ 293 char *vec[200]; /* Enough for specific functions */
294 int i, idx = 0; 294 int i, idx = 0;
295 int startofsym = 1; 295 int startofsym = 1;
296 vec[idx++] = KERNELDOC; 296 vec[idx++] = KERNELDOC;
297 vec[idx++] = DOCBOOK; 297 vec[idx++] = DOCBOOK;
298 vec[idx++] = SHOWNOTFOUND; 298 vec[idx++] = SHOWNOTFOUND;
299 299
300 /* Split line up in individual parameters preceded by FUNCTION */ 300 /* Split line up in individual parameters preceded by FUNCTION */
301 for (i=0; line[i]; i++) { 301 for (i=0; line[i]; i++) {
302 if (isspace(line[i])) { 302 if (isspace(line[i])) {
303 line[i] = '\0'; 303 line[i] = '\0';
304 startofsym = 1; 304 startofsym = 1;
305 continue; 305 continue;
306 } 306 }
307 if (startofsym) { 307 if (startofsym) {
308 startofsym = 0; 308 startofsym = 0;
309 vec[idx++] = FUNCTION; 309 vec[idx++] = FUNCTION;
310 vec[idx++] = &line[i]; 310 vec[idx++] = &line[i];
311 } 311 }
312 } 312 }
313 for (i = 0; i < idx; i++) { 313 for (i = 0; i < idx; i++) {
314 if (strcmp(vec[i], FUNCTION)) 314 if (strcmp(vec[i], FUNCTION))
315 continue; 315 continue;
316 consume_symbol(vec[i + 1]); 316 consume_symbol(vec[i + 1]);
317 } 317 }
318 vec[idx++] = filename; 318 vec[idx++] = filename;
@@ -460,14 +460,14 @@ static void parse_file(FILE *infile)
460 break; 460 break;
461 case 'D': 461 case 'D':
462 while (*s && !isspace(*s)) s++; 462 while (*s && !isspace(*s)) s++;
463 *s = '\0'; 463 *s = '\0';
464 symbolsonly(line+2); 464 symbolsonly(line+2);
465 break; 465 break;
466 case 'F': 466 case 'F':
467 /* filename */ 467 /* filename */
468 while (*s && !isspace(*s)) s++; 468 while (*s && !isspace(*s)) s++;
469 *s++ = '\0'; 469 *s++ = '\0';
470 /* function names */ 470 /* function names */
471 while (isspace(*s)) 471 while (isspace(*s))
472 s++; 472 s++;
473 singlefunctions(line +2, s); 473 singlefunctions(line +2, s);
@@ -515,11 +515,11 @@ int main(int argc, char *argv[])
515 } 515 }
516 /* Open file, exit on error */ 516 /* Open file, exit on error */
517 infile = fopen(argv[2], "r"); 517 infile = fopen(argv[2], "r");
518 if (infile == NULL) { 518 if (infile == NULL) {
519 fprintf(stderr, "docproc: "); 519 fprintf(stderr, "docproc: ");
520 perror(argv[2]); 520 perror(argv[2]);
521 exit(2); 521 exit(2);
522 } 522 }
523 523
524 if (strcmp("doc", argv[1]) == 0) { 524 if (strcmp("doc", argv[1]) == 0) {
525 /* Need to do this in two passes. 525 /* Need to do this in two passes.
diff --git a/scripts/dtc/.gitignore b/scripts/dtc/.gitignore
index 095acb49a374..cdabdc95a6e7 100644
--- a/scripts/dtc/.gitignore
+++ b/scripts/dtc/.gitignore
@@ -2,4 +2,3 @@ dtc
2dtc-lexer.lex.c 2dtc-lexer.lex.c
3dtc-parser.tab.c 3dtc-parser.tab.c
4dtc-parser.tab.h 4dtc-parser.tab.h
5
diff --git a/scripts/dtc/fstree.c b/scripts/dtc/fstree.c
index f3774530170a..e464727c8808 100644
--- a/scripts/dtc/fstree.c
+++ b/scripts/dtc/fstree.c
@@ -88,4 +88,3 @@ struct boot_info *dt_from_fs(const char *dirname)
88 88
89 return build_boot_info(NULL, tree, guess_boot_cpuid(tree)); 89 return build_boot_info(NULL, tree, guess_boot_cpuid(tree));
90} 90}
91
diff --git a/scripts/dtc/libfdt/fdt_empty_tree.c b/scripts/dtc/libfdt/fdt_empty_tree.c
index f72d13b1d19c..f2ae9b77c285 100644
--- a/scripts/dtc/libfdt/fdt_empty_tree.c
+++ b/scripts/dtc/libfdt/fdt_empty_tree.c
@@ -81,4 +81,3 @@ int fdt_create_empty_tree(void *buf, int bufsize)
81 81
82 return fdt_open_into(buf, buf, bufsize); 82 return fdt_open_into(buf, buf, bufsize);
83} 83}
84
diff --git a/scripts/dtc/treesource.c b/scripts/dtc/treesource.c
index 33eeba55fb4d..5740e6992d37 100644
--- a/scripts/dtc/treesource.c
+++ b/scripts/dtc/treesource.c
@@ -281,4 +281,3 @@ void dt_to_source(FILE *f, struct boot_info *bi)
281 281
282 write_tree_source_node(f, bi->dt, 0); 282 write_tree_source_node(f, bi->dt, 0);
283} 283}
284
diff --git a/scripts/headers.sh b/scripts/headers.sh
index 978b42b3acd7..95ece06599a5 100755
--- a/scripts/headers.sh
+++ b/scripts/headers.sh
@@ -28,5 +28,3 @@ for arch in ${archs}; do
28 ;; 28 ;;
29 esac 29 esac
30done 30done
31
32
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 1237dd7fb4ca..dc7aa45e80ce 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -123,7 +123,7 @@ static int read_symbol(FILE *in, struct sym_entry *s)
123 } 123 }
124 if (strlen(str) > KSYM_NAME_LEN) { 124 if (strlen(str) > KSYM_NAME_LEN) {
125 fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n" 125 fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n"
126 "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n", 126 "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",
127 str, strlen(str), KSYM_NAME_LEN); 127 str, strlen(str), KSYM_NAME_LEN);
128 return -1; 128 return -1;
129 } 129 }
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 573ff3f1f533..9c4d2412fb72 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -319,4 +319,3 @@ $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck
319$(obj)/gconf.glade.h: $(obj)/gconf.glade 319$(obj)/gconf.glade.h: $(obj)/gconf.glade
320 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ 320 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
321 $(obj)/gconf.glade 321 $(obj)/gconf.glade
322
diff --git a/scripts/kconfig/check.sh b/scripts/kconfig/check.sh
index 854d9c7c675c..55b79ba1ba2a 100755
--- a/scripts/kconfig/check.sh
+++ b/scripts/kconfig/check.sh
@@ -11,4 +11,3 @@ EOF
11if [ ! "$?" -eq "0" ]; then 11if [ ! "$?" -eq "0" ]; then
12 echo -DKBUILD_NO_NLS; 12 echo -DKBUILD_NO_NLS;
13fi 13fi
14
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index d19944f9c3ac..fef75fc756f4 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -696,7 +696,7 @@ int main(int ac, char **av)
696 } else if (input_mode == savedefconfig) { 696 } else if (input_mode == savedefconfig) {
697 if (conf_write_defconfig(defconfig_file)) { 697 if (conf_write_defconfig(defconfig_file)) {
698 fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"), 698 fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"),
699 defconfig_file); 699 defconfig_file);
700 return 1; 700 return 1;
701 } 701 }
702 } else if (input_mode != listnewconfig) { 702 } else if (input_mode != listnewconfig) {
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index f2bee70e26f4..d0a35b21f308 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -1404,7 +1404,7 @@ static void display_tree(struct menu *menu)
1404 && (tree == tree2)) 1404 && (tree == tree2))
1405 continue; 1405 continue;
1406/* 1406/*
1407 if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) 1407 if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
1408 || (view_mode == FULL_VIEW) 1408 || (view_mode == FULL_VIEW)
1409 || (view_mode == SPLIT_VIEW))*/ 1409 || (view_mode == SPLIT_VIEW))*/
1410 1410
diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index 3b15c08ec1fa..8d016faa28d7 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -168,13 +168,13 @@ do_resize:
168 168
169 /* create new window for the list */ 169 /* create new window for the list */
170 list = subwin(dialog, list_height, list_width, y + box_y + 1, 170 list = subwin(dialog, list_height, list_width, y + box_y + 1,
171 x + box_x + 1); 171 x + box_x + 1);
172 172
173 keypad(list, TRUE); 173 keypad(list, TRUE);
174 174
175 /* draw a box around the list items */ 175 /* draw a box around the list items */
176 draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, 176 draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2,
177 dlg.menubox_border.atr, dlg.menubox.atr); 177 dlg.menubox_border.atr, dlg.menubox.atr);
178 178
179 /* Find length of longest item in order to center checklist */ 179 /* Find length of longest item in order to center checklist */
180 check_x = 0; 180 check_x = 0;
diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
index 447a582198c9..d58de1dc5360 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/scripts/kconfig/lxdialog/inputbox.c
@@ -42,7 +42,7 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)
42 * Display a dialog box for inputing a string 42 * Display a dialog box for inputing a string
43 */ 43 */
44int dialog_inputbox(const char *title, const char *prompt, int height, int width, 44int dialog_inputbox(const char *title, const char *prompt, int height, int width,
45 const char *init) 45 const char *init)
46{ 46{
47 int i, x, y, box_y, box_x, box_width; 47 int i, x, y, box_y, box_x, box_width;
48 int input_x = 0, key = 0, button = -1; 48 int input_x = 0, key = 0, button = -1;
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index c93de0b2faca..11ae9ad7ac7b 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -64,7 +64,7 @@ static int menu_width, item_x;
64 * Print menu item 64 * Print menu item
65 */ 65 */
66static void do_print_item(WINDOW * win, const char *item, int line_y, 66static void do_print_item(WINDOW * win, const char *item, int line_y,
67 int selected, int hotkey) 67 int selected, int hotkey)
68{ 68{
69 int j; 69 int j;
70 char *menu_item = malloc(menu_width + 1); 70 char *menu_item = malloc(menu_width + 1);
@@ -182,7 +182,7 @@ static void do_scroll(WINDOW *win, int *scroll, int n)
182 * Display a menu for choosing among a number of options 182 * Display a menu for choosing among a number of options
183 */ 183 */
184int dialog_menu(const char *title, const char *prompt, 184int dialog_menu(const char *title, const char *prompt,
185 const void *selected, int *s_scroll) 185 const void *selected, int *s_scroll)
186{ 186{
187 int i, j, x, y, box_x, box_y; 187 int i, j, x, y, box_x, box_y;
188 int height, width, menu_height; 188 int height, width, menu_height;
diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c
index 58a8289dd650..f7abdeb92af0 100644
--- a/scripts/kconfig/lxdialog/util.c
+++ b/scripts/kconfig/lxdialog/util.c
@@ -623,7 +623,7 @@ void item_make(const char *fmt, ...)
623void item_add_str(const char *fmt, ...) 623void item_add_str(const char *fmt, ...)
624{ 624{
625 va_list ap; 625 va_list ap;
626 size_t avail; 626 size_t avail;
627 627
628 avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); 628 avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str);
629 629
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 59184bb41ef8..14cea7463a62 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -299,7 +299,7 @@ static void set_config_filename(const char *config_filename)
299 int size; 299 int size;
300 300
301 size = snprintf(menu_backtitle, sizeof(menu_backtitle), 301 size = snprintf(menu_backtitle, sizeof(menu_backtitle),
302 "%s - %s", config_filename, rootmenu.prompt->text); 302 "%s - %s", config_filename, rootmenu.prompt->text);
303 if (size >= sizeof(menu_backtitle)) 303 if (size >= sizeof(menu_backtitle))
304 menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; 304 menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
305 set_dialog_backtitle(menu_backtitle); 305 set_dialog_backtitle(menu_backtitle);
@@ -1034,4 +1034,3 @@ int main(int ac, char **av)
1034 1034
1035 return res; 1035 return res;
1036} 1036}
1037
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3ac2c9c6e280..a26cc5d2a9b0 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -258,8 +258,8 @@ static void sym_check_prop(struct symbol *sym)
258 "config symbol '%s' uses select, but is " 258 "config symbol '%s' uses select, but is "
259 "not boolean or tristate", sym->name); 259 "not boolean or tristate", sym->name);
260 else if (sym2->type != S_UNKNOWN && 260 else if (sym2->type != S_UNKNOWN &&
261 sym2->type != S_BOOLEAN && 261 sym2->type != S_BOOLEAN &&
262 sym2->type != S_TRISTATE) 262 sym2->type != S_TRISTATE)
263 prop_warn(prop, 263 prop_warn(prop,
264 "'%s' has wrong type. 'select' only " 264 "'%s' has wrong type. 'select' only "
265 "accept arguments of boolean and " 265 "accept arguments of boolean and "
@@ -268,7 +268,7 @@ static void sym_check_prop(struct symbol *sym)
268 case P_RANGE: 268 case P_RANGE:
269 if (sym->type != S_INT && sym->type != S_HEX) 269 if (sym->type != S_INT && sym->type != S_HEX)
270 prop_warn(prop, "range is only allowed " 270 prop_warn(prop, "range is only allowed "
271 "for int or hex symbols"); 271 "for int or hex symbols");
272 if (!menu_validate_number(sym, prop->expr->left.sym) || 272 if (!menu_validate_number(sym, prop->expr->left.sym) ||
273 !menu_validate_number(sym, prop->expr->right.sym)) 273 !menu_validate_number(sym, prop->expr->right.sym))
274 prop_warn(prop, "range is invalid"); 274 prop_warn(prop, "range is invalid");
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 4fbecd2473bc..984489ef2b46 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -1554,4 +1554,3 @@ int main(int ac, char **av)
1554 endwin(); 1554 endwin();
1555 return 0; 1555 return 0;
1556} 1556}
1557
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index 6e7fbf196809..94f9c83e324f 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -155,5 +155,3 @@ void *xcalloc(size_t nmemb, size_t size)
155 fprintf(stderr, "Out of memory.\n"); 155 fprintf(stderr, "Out of memory.\n");
156 exit(1); 156 exit(1);
157} 157}
158
159
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index 1a9f53e535ca..6c62d93b4ffb 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -27,8 +27,8 @@ static char *text;
27static int text_size, text_asize; 27static int text_size, text_asize;
28 28
29struct buffer { 29struct buffer {
30 struct buffer *parent; 30 struct buffer *parent;
31 YY_BUFFER_STATE state; 31 YY_BUFFER_STATE state;
32}; 32};
33 33
34struct buffer *current_buf; 34struct buffer *current_buf;
diff --git a/scripts/kconfig/zconf.lex.c_shipped b/scripts/kconfig/zconf.lex.c_shipped
index a0521aa5974b..349a7f24315b 100644
--- a/scripts/kconfig/zconf.lex.c_shipped
+++ b/scripts/kconfig/zconf.lex.c_shipped
@@ -789,8 +789,8 @@ static char *text;
789static int text_size, text_asize; 789static int text_size, text_asize;
790 790
791struct buffer { 791struct buffer {
792 struct buffer *parent; 792 struct buffer *parent;
793 YY_BUFFER_STATE state; 793 YY_BUFFER_STATE state;
794}; 794};
795 795
796struct buffer *current_buf; 796struct buffer *current_buf;
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index 25ae16ac75c8..de5e84ed3f96 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -2314,7 +2314,7 @@ void conf_parse(const char *name)
2314 for_all_symbols(i, sym) { 2314 for_all_symbols(i, sym) {
2315 if (sym_check_deps(sym)) 2315 if (sym_check_deps(sym))
2316 zconfnerrs++; 2316 zconfnerrs++;
2317 } 2317 }
2318 if (zconfnerrs) 2318 if (zconfnerrs)
2319 exit(1); 2319 exit(1);
2320 sym_set_change_count(1); 2320 sym_set_change_count(1);
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 0653886fac48..0f683cfa53e9 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -510,7 +510,7 @@ void conf_parse(const char *name)
510 for_all_symbols(i, sym) { 510 for_all_symbols(i, sym) {
511 if (sym_check_deps(sym)) 511 if (sym_check_deps(sym))
512 zconfnerrs++; 512 zconfnerrs++;
513 } 513 }
514 if (zconfnerrs) 514 if (zconfnerrs)
515 exit(1); 515 exit(1);
516 sym_set_change_count(1); 516 sym_set_change_count(1);
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 827896f56501..c21d16328d3f 100644
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -367,4 +367,3 @@ OPTION:
367EOT 367EOT
368 exit; 368 exit;
369} 369}
370
diff --git a/scripts/mksysmap b/scripts/mksysmap
index c1b6191ef879..7ada35a0f478 100644
--- a/scripts/mksysmap
+++ b/scripts/mksysmap
@@ -42,4 +42,3 @@
42# (At least sparc64 has __crc_ in the middle). 42# (At least sparc64 has __crc_ in the middle).
43 43
44$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2 44$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2
45
diff --git a/scripts/mod/.gitignore b/scripts/mod/.gitignore
index 33bae0df4de5..3bd11b603173 100644
--- a/scripts/mod/.gitignore
+++ b/scripts/mod/.gitignore
@@ -2,4 +2,3 @@ elfconfig.h
2mk_elfconfig 2mk_elfconfig
3modpost 3modpost
4devicetable-offsets.h 4devicetable-offsets.h
5
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 1924990a737f..e614ef689eee 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -644,28 +644,26 @@ ADD_TO_DEVTABLE("pcmcia", pcmcia_device_id, do_pcmcia_entry);
644 644
645static int do_of_entry (const char *filename, void *symval, char *alias) 645static int do_of_entry (const char *filename, void *symval, char *alias)
646{ 646{
647 int len; 647 int len;
648 char *tmp; 648 char *tmp;
649 DEF_FIELD_ADDR(symval, of_device_id, name); 649 DEF_FIELD_ADDR(symval, of_device_id, name);
650 DEF_FIELD_ADDR(symval, of_device_id, type); 650 DEF_FIELD_ADDR(symval, of_device_id, type);
651 DEF_FIELD_ADDR(symval, of_device_id, compatible); 651 DEF_FIELD_ADDR(symval, of_device_id, compatible);
652 652
653 len = sprintf (alias, "of:N%sT%s", 653 len = sprintf(alias, "of:N%sT%s", (*name)[0] ? *name : "*",
654 (*name)[0] ? *name : "*", 654 (*type)[0] ? *type : "*");
655 (*type)[0] ? *type : "*"); 655
656 656 if (compatible[0])
657 if (compatible[0]) 657 sprintf(&alias[len], "%sC%s", (*type)[0] ? "*" : "",
658 sprintf (&alias[len], "%sC%s", 658 *compatible);
659 (*type)[0] ? "*" : "", 659
660 *compatible); 660 /* Replace all whitespace with underscores */
661 661 for (tmp = alias; tmp && *tmp; tmp++)
662 /* Replace all whitespace with underscores */ 662 if (isspace (*tmp))
663 for (tmp = alias; tmp && *tmp; tmp++) 663 *tmp = '_';
664 if (isspace (*tmp)) 664
665 *tmp = '_'; 665 add_wildcard(alias);
666 666 return 1;
667 add_wildcard(alias);
668 return 1;
669} 667}
670ADD_TO_DEVTABLE("of", of_device_id, do_of_entry); 668ADD_TO_DEVTABLE("of", of_device_id, do_of_entry);
671 669
diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c
index 639bca7ba559..a4fd71d71d65 100644
--- a/scripts/mod/mk_elfconfig.c
+++ b/scripts/mod/mk_elfconfig.c
@@ -54,4 +54,3 @@ main(int argc, char **argv)
54 54
55 return 0; 55 return 0;
56} 56}
57
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 026543ba8d86..9d9c5b905b35 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -862,7 +862,7 @@ static const char *section_white_list[] =
862 * without "ax" / "aw". 862 * without "ax" / "aw".
863 */ 863 */
864static void check_section(const char *modname, struct elf_info *elf, 864static void check_section(const char *modname, struct elf_info *elf,
865 Elf_Shdr *sechdr) 865 Elf_Shdr *sechdr)
866{ 866{
867 const char *sec = sech_name(elf, sechdr); 867 const char *sec = sech_name(elf, sechdr);
868 868
@@ -1296,12 +1296,12 @@ static void print_section_list(const char * const list[20])
1296 */ 1296 */
1297static void report_sec_mismatch(const char *modname, 1297static void report_sec_mismatch(const char *modname,
1298 const struct sectioncheck *mismatch, 1298 const struct sectioncheck *mismatch,
1299 const char *fromsec, 1299 const char *fromsec,
1300 unsigned long long fromaddr, 1300 unsigned long long fromaddr,
1301 const char *fromsym, 1301 const char *fromsym,
1302 int from_is_func, 1302 int from_is_func,
1303 const char *tosec, const char *tosym, 1303 const char *tosec, const char *tosym,
1304 int to_is_func) 1304 int to_is_func)
1305{ 1305{
1306 const char *from, *from_p; 1306 const char *from, *from_p;
1307 const char *to, *to_p; 1307 const char *to, *to_p;
@@ -1441,7 +1441,7 @@ static void report_sec_mismatch(const char *modname,
1441} 1441}
1442 1442
1443static void check_section_mismatch(const char *modname, struct elf_info *elf, 1443static void check_section_mismatch(const char *modname, struct elf_info *elf,
1444 Elf_Rela *r, Elf_Sym *sym, const char *fromsec) 1444 Elf_Rela *r, Elf_Sym *sym, const char *fromsec)
1445{ 1445{
1446 const char *tosec; 1446 const char *tosec;
1447 const struct sectioncheck *mismatch; 1447 const struct sectioncheck *mismatch;
@@ -1528,7 +1528,7 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
1528 case R_ARM_ABS32: 1528 case R_ARM_ABS32:
1529 /* From ARM ABI: (S + A) | T */ 1529 /* From ARM ABI: (S + A) | T */
1530 r->r_addend = (int)(long) 1530 r->r_addend = (int)(long)
1531 (elf->symtab_start + ELF_R_SYM(r->r_info)); 1531 (elf->symtab_start + ELF_R_SYM(r->r_info));
1532 break; 1532 break;
1533 case R_ARM_PC24: 1533 case R_ARM_PC24:
1534 case R_ARM_CALL: 1534 case R_ARM_CALL:
@@ -1538,8 +1538,8 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
1538 case R_ARM_THM_JUMP19: 1538 case R_ARM_THM_JUMP19:
1539 /* From ARM ABI: ((S + A) | T) - P */ 1539 /* From ARM ABI: ((S + A) | T) - P */
1540 r->r_addend = (int)(long)(elf->hdr + 1540 r->r_addend = (int)(long)(elf->hdr +
1541 sechdr->sh_offset + 1541 sechdr->sh_offset +
1542 (r->r_offset - sechdr->sh_addr)); 1542 (r->r_offset - sechdr->sh_addr));
1543 break; 1543 break;
1544 default: 1544 default:
1545 return 1; 1545 return 1;
@@ -1571,7 +1571,7 @@ static int addend_mips_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
1571} 1571}
1572 1572
1573static void section_rela(const char *modname, struct elf_info *elf, 1573static void section_rela(const char *modname, struct elf_info *elf,
1574 Elf_Shdr *sechdr) 1574 Elf_Shdr *sechdr)
1575{ 1575{
1576 Elf_Sym *sym; 1576 Elf_Sym *sym;
1577 Elf_Rela *rela; 1577 Elf_Rela *rela;
@@ -1615,7 +1615,7 @@ static void section_rela(const char *modname, struct elf_info *elf,
1615} 1615}
1616 1616
1617static void section_rel(const char *modname, struct elf_info *elf, 1617static void section_rel(const char *modname, struct elf_info *elf,
1618 Elf_Shdr *sechdr) 1618 Elf_Shdr *sechdr)
1619{ 1619{
1620 Elf_Sym *sym; 1620 Elf_Sym *sym;
1621 Elf_Rel *rel; 1621 Elf_Rel *rel;
@@ -1685,7 +1685,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
1685 * be discarded and warns about it. 1685 * be discarded and warns about it.
1686 **/ 1686 **/
1687static void check_sec_ref(struct module *mod, const char *modname, 1687static void check_sec_ref(struct module *mod, const char *modname,
1688 struct elf_info *elf) 1688 struct elf_info *elf)
1689{ 1689{
1690 int i; 1690 int i;
1691 Elf_Shdr *sechdrs = elf->sechdrs; 1691 Elf_Shdr *sechdrs = elf->sechdrs;
@@ -1945,7 +1945,7 @@ static int add_versions(struct buffer *b, struct module *mod)
1945 s->name, mod->name); 1945 s->name, mod->name);
1946 } else { 1946 } else {
1947 merror("\"%s\" [%s.ko] undefined!\n", 1947 merror("\"%s\" [%s.ko] undefined!\n",
1948 s->name, mod->name); 1948 s->name, mod->name);
1949 err = 1; 1949 err = 1;
1950 } 1950 }
1951 } 1951 }
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
index deb2994b04c4..944418da9fe3 100644
--- a/scripts/mod/sumversion.c
+++ b/scripts/mod/sumversion.c
@@ -214,7 +214,7 @@ static void md4_final_ascii(struct md4_ctx *mctx, char *out, unsigned int len)
214 mctx->block[14] = mctx->byte_count << 3; 214 mctx->block[14] = mctx->byte_count << 3;
215 mctx->block[15] = mctx->byte_count >> 29; 215 mctx->block[15] = mctx->byte_count >> 29;
216 le32_to_cpu_array(mctx->block, (sizeof(mctx->block) - 216 le32_to_cpu_array(mctx->block, (sizeof(mctx->block) -
217 sizeof(uint64_t)) / sizeof(uint32_t)); 217 sizeof(uint64_t)) / sizeof(uint32_t));
218 md4_transform(mctx->hash, mctx->block); 218 md4_transform(mctx->hash, mctx->block);
219 cpu_to_le32_array(mctx->hash, sizeof(mctx->hash) / sizeof(uint32_t)); 219 cpu_to_le32_array(mctx->hash, sizeof(mctx->hash) / sizeof(uint32_t));
220 220
@@ -367,7 +367,7 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md)
367 break; 367 break;
368 /* Terminate line at first space, to get rid of final ' \' */ 368 /* Terminate line at first space, to get rid of final ' \' */
369 while (*p) { 369 while (*p) {
370 if (isspace(*p)) { 370 if (isspace(*p)) {
371 *p = '\0'; 371 *p = '\0';
372 break; 372 break;
373 } 373 }
diff --git a/scripts/objdiff b/scripts/objdiff
index b3e4f10bfc3e..62e51dae2138 100755
--- a/scripts/objdiff
+++ b/scripts/objdiff
@@ -25,25 +25,47 @@
25# 25#
26# Note: 'make mrproper' will also remove .tmp_objdiff 26# Note: 'make mrproper' will also remove .tmp_objdiff
27 27
28GIT_DIR="`git rev-parse --git-dir`" 28SRCTREE=$(cd $(git rev-parse --show-toplevel 2>/dev/null); pwd)
29 29
30if [ -d "$GIT_DIR" ]; then 30if [ -z "$SRCTREE" ]; then
31 TMPD="${GIT_DIR%git}tmp_objdiff" 31 echo >&2 "ERROR: Not a git repository."
32
33 [ -d "$TMPD" ] || mkdir "$TMPD"
34else
35 echo "ERROR: git directory not found."
36 exit 1 32 exit 1
37fi 33fi
38 34
35TMPD=$SRCTREE/.tmp_objdiff
36
39usage() { 37usage() {
40 echo "Usage: $0 <command> <args>" 38 echo >&2 "Usage: $0 <command> <args>"
41 echo " record <list of object files>" 39 echo >&2 " record <list of object files or directories>"
42 echo " diff <commitA> <commitB>" 40 echo >&2 " diff <commitA> <commitB>"
43 echo " clean all | <commit>" 41 echo >&2 " clean all | <commit>"
44 exit 1 42 exit 1
45} 43}
46 44
45get_output_dir() {
46 dir=${1%/*}
47
48 if [ "$dir" = "$1" ]; then
49 dir=.
50 fi
51
52 dir=$(cd $dir; pwd)
53
54 echo $TMPD/$CMT${dir#$SRCTREE}
55}
56
57do_objdump() {
58 dir=$(get_output_dir $1)
59 base=${1##*/}
60 dis=$dir/${base%.o}.dis
61
62 [ ! -d "$dir" ] && mkdir -p $dir
63
64 # remove addresses for a cleaner diff
65 # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and
66 $OBJDUMP -D $1 | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dis
67}
68
47dorecord() { 69dorecord() {
48 [ $# -eq 0 ] && usage 70 [ $# -eq 0 ] && usage
49 71
@@ -52,20 +74,16 @@ dorecord() {
52 CMT="`git rev-parse --short HEAD`" 74 CMT="`git rev-parse --short HEAD`"
53 75
54 OBJDUMP="${CROSS_COMPILE}objdump" 76 OBJDUMP="${CROSS_COMPILE}objdump"
55 OBJDIFFD="$TMPD/$CMT"
56
57 [ ! -d "$OBJDIFFD" ] && mkdir -p "$OBJDIFFD"
58 77
59 for f in $FILES; do 78 for d in $FILES; do
60 dn="${f%/*}" 79 if [ -d "$d" ]; then
61 bn="${f##*/}" 80 for f in $(find $d -name '*.o')
62 81 do
63 [ ! -d "$OBJDIFFD/$dn" ] && mkdir -p "$OBJDIFFD/$dn" 82 do_objdump $f
64 83 done
65 # remove addresses for a more clear diff 84 else
66 # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and 85 do_objdump $d
67 $OBJDUMP -D "$f" | sed "s/^[[:space:]]\+[0-9a-f]\+//" \ 86 fi
68 >"$OBJDIFFD/$dn/$bn"
69 done 87 done
70} 88}
71 89
@@ -90,12 +108,12 @@ dodiff() {
90 DSTD="$TMPD/$DST" 108 DSTD="$TMPD/$DST"
91 109
92 if [ ! -d "$SRCD" ]; then 110 if [ ! -d "$SRCD" ]; then
93 echo "ERROR: $SRCD doesn't exist" 111 echo >&2 "ERROR: $SRCD doesn't exist"
94 exit 1 112 exit 1
95 fi 113 fi
96 114
97 if [ ! -d "$DSTD" ]; then 115 if [ ! -d "$DSTD" ]; then
98 echo "ERROR: $DSTD doesn't exist" 116 echo >&2 "ERROR: $DSTD doesn't exist"
99 exit 1 117 exit 1
100 fi 118 fi
101 119
@@ -114,7 +132,7 @@ doclean() {
114 if [ -d "$TMPD/$CMT" ]; then 132 if [ -d "$TMPD/$CMT" ]; then
115 rm -rf $TMPD/$CMT 133 rm -rf $TMPD/$CMT
116 else 134 else
117 echo "$CMT not found" 135 echo >&2 "$CMT not found"
118 fi 136 fi
119 fi 137 fi
120} 138}
@@ -135,7 +153,7 @@ case "$1" in
135 doclean $* 153 doclean $*
136 ;; 154 ;;
137 *) 155 *)
138 echo "Unrecognized command '$1'" 156 echo >&2 "Unrecognized command '$1'"
139 exit 1 157 exit 1
140 ;; 158 ;;
141esac 159esac
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index c5d473393816..99ca6e76eb0a 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -143,4 +143,3 @@ help: FORCE
143 @echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball' 143 @echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball'
144 @echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball' 144 @echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball'
145 @echo ' perf-tarxz-src-pkg - Build $(perf-tar).tar.xz source tarball' 145 @echo ' perf-tarxz-src-pkg - Build $(perf-tar).tar.xz source tarball'
146
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index b151b63f9be3..b5f08f727868 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -35,13 +35,15 @@ create_package() {
35 sparc*) 35 sparc*)
36 debarch=sparc ;; 36 debarch=sparc ;;
37 s390*) 37 s390*)
38 debarch=s390 ;; 38 debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;;
39 ppc*) 39 ppc*)
40 debarch=powerpc ;; 40 debarch=powerpc ;;
41 parisc*) 41 parisc*)
42 debarch=hppa ;; 42 debarch=hppa ;;
43 mips*) 43 mips*)
44 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;; 44 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
45 arm64)
46 debarch=arm64 ;;
45 arm*) 47 arm*)
46 debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;; 48 debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
47 *) 49 *)
@@ -155,11 +157,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
155 for module in $(find lib/modules/ -name *.ko); do 157 for module in $(find lib/modules/ -name *.ko); do
156 mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module) 158 mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
157 # only keep debug symbols in the debug file 159 # only keep debug symbols in the debug file
158 objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module 160 $OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
159 # strip original module from debug symbols 161 # strip original module from debug symbols
160 objcopy --strip-debug $module 162 $OBJCOPY --strip-debug $module
161 # then add a link to those 163 # then add a link to those
162 objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module 164 $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
163 done 165 done
164 ) 166 )
165 fi 167 fi
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index aa22f9447ddc..995c1eafaff6 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -136,4 +136,3 @@ esac
136echo "Tarball successfully created in ${tarball}${file_ext}" 136echo "Tarball successfully created in ${tarball}${file_ext}"
137 137
138exit 0 138exit 0
139
diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c
index 68bb4efc5af4..4718d7895f0b 100644
--- a/scripts/pnmtologo.c
+++ b/scripts/pnmtologo.c
@@ -512,4 +512,3 @@ int main(int argc, char *argv[])
512 } 512 }
513 exit(0); 513 exit(0);
514} 514}
515
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index e11aa4a156d2..650ecc83d7d7 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -487,5 +487,3 @@ main(int argc, char *argv[])
487 } 487 }
488 return !!n_error; 488 return !!n_error;
489} 489}
490
491
diff --git a/scripts/rt-tester/check-all.sh b/scripts/rt-tester/check-all.sh
index 43098afe7431..6b5c83baf148 100644
--- a/scripts/rt-tester/check-all.sh
+++ b/scripts/rt-tester/check-all.sh
@@ -19,4 +19,3 @@ testit t3-l2-pi.tst
19testit t4-l2-pi-deboost.tst 19testit t4-l2-pi-deboost.tst
20testit t5-l4-pi-boost-deboost.tst 20testit t5-l4-pi-boost-deboost.tst
21testit t5-l4-pi-boost-deboost-setsched.tst 21testit t5-l4-pi-boost-deboost-setsched.tst
22
diff --git a/scripts/rt-tester/rt-tester.py b/scripts/rt-tester/rt-tester.py
index 34186cac1d2f..6d916c2a45a5 100644
--- a/scripts/rt-tester/rt-tester.py
+++ b/scripts/rt-tester/rt-tester.py
@@ -216,5 +216,3 @@ while 1:
216# Normal exit pass 216# Normal exit pass
217print "Pass" 217print "Pass"
218sys.exit(0) 218sys.exit(0)
219
220
diff --git a/scripts/selinux/install_policy.sh b/scripts/selinux/install_policy.sh
index 7b9ccf61f8f9..f6a0ce71015f 100644
--- a/scripts/selinux/install_policy.sh
+++ b/scripts/selinux/install_policy.sh
@@ -66,4 +66,3 @@ if [ "eq$dodev" != "eq" ]; then
66 $SF file_contexts /dev 66 $SF file_contexts /dev
67 mount --move /mnt /dev 67 mount --move /mnt /dev
68fi 68fi
69
diff --git a/scripts/show_delta b/scripts/show_delta
index e25732b5d701..5b365009e6a3 100755
--- a/scripts/show_delta
+++ b/scripts/show_delta
@@ -126,4 +126,3 @@ def main():
126 print (convert_line(line, base_time),) 126 print (convert_line(line, base_time),)
127 127
128main() 128main()
129
diff --git a/scripts/tags.sh b/scripts/tags.sh
index f2c5b006a3d7..e6b011fe1d0d 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -25,6 +25,9 @@ else
25 tree=${srctree}/ 25 tree=${srctree}/
26fi 26fi
27 27
28# ignore userspace tools
29ignore="$ignore ( -path ${tree}tools ) -prune -o"
30
28# Find all available archs 31# Find all available archs
29find_all_archs() 32find_all_archs()
30{ 33{
@@ -47,7 +50,8 @@ find_arch_sources()
47 for i in $archincludedir; do 50 for i in $archincludedir; do
48 prune="$prune -wholename $i -prune -o" 51 prune="$prune -wholename $i -prune -o"
49 done 52 done
50 find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" -print; 53 find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" \
54 -not -type l -print;
51} 55}
52 56
53# find sources in arch/$1/include 57# find sources in arch/$1/include
@@ -57,14 +61,15 @@ find_arch_include_sources()
57 -name include -type d -print); 61 -name include -type d -print);
58 if [ -n "$include" ]; then 62 if [ -n "$include" ]; then
59 archincludedir="$archincludedir $include" 63 archincludedir="$archincludedir $include"
60 find $include $ignore -name "$2" -print; 64 find $include $ignore -name "$2" -not -type l -print;
61 fi 65 fi
62} 66}
63 67
64# find sources in include/ 68# find sources in include/
65find_include_sources() 69find_include_sources()
66{ 70{
67 find ${tree}include $ignore -name config -prune -o -name "$1" -print; 71 find ${tree}include $ignore -name config -prune -o -name "$1" \
72 -not -type l -print;
68} 73}
69 74
70# find sources in rest of tree 75# find sources in rest of tree
@@ -73,7 +78,7 @@ find_other_sources()
73{ 78{
74 find ${tree}* $ignore \ 79 find ${tree}* $ignore \
75 \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ 80 \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \
76 -name "$1" -print; 81 -name "$1" -not -type l -print;
77} 82}
78 83
79find_sources() 84find_sources()
@@ -187,6 +192,10 @@ exuberant()
187 --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ 192 --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \
188 --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ 193 --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \
189 --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ 194 --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \
195 --regex-c++='/TESTPCGFLAG\(([^,)]*).*/PageCgroup\1/' \
196 --regex-c++='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \
197 --regex-c++='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \
198 --regex-c++='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \
190 --regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_config_\1/' \ 199 --regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_config_\1/' \
191 --regex-c='/PCI_OP_WRITE\((\w*).*[1-4]\)/pci_bus_write_config_\1/' \ 200 --regex-c='/PCI_OP_WRITE\((\w*).*[1-4]\)/pci_bus_write_config_\1/' \
192 --regex-c='/DEFINE_(MUTEX|SEMAPHORE|SPINLOCK)\((\w*)/\2/v/' \ 201 --regex-c='/DEFINE_(MUTEX|SEMAPHORE|SPINLOCK)\((\w*)/\2/v/' \
@@ -201,7 +210,8 @@ exuberant()
201 --regex-c='/DECLARE_(TASKLET|WORK|DELAYED_WORK)\((\w*)/\2/v/' \ 210 --regex-c='/DECLARE_(TASKLET|WORK|DELAYED_WORK)\((\w*)/\2/v/' \
202 --regex-c='/DEFINE_PCI_DEVICE_TABLE\((\w*)/\1/v/' \ 211 --regex-c='/DEFINE_PCI_DEVICE_TABLE\((\w*)/\1/v/' \
203 --regex-c='/(^\s)OFFSET\((\w*)/\2/v/' \ 212 --regex-c='/(^\s)OFFSET\((\w*)/\2/v/' \
204 --regex-c='/(^\s)DEFINE\((\w*)/\2/v/' 213 --regex-c='/(^\s)DEFINE\((\w*)/\2/v/' \
214 --regex-c='/DEFINE_HASHTABLE\((\w*)/\1/v/'
205 215
206 all_kconfigs | xargs $1 -a \ 216 all_kconfigs | xargs $1 -a \
207 --langdef=kconfig --language-force=kconfig \ 217 --langdef=kconfig --language-force=kconfig \
@@ -244,9 +254,14 @@ emacs()
244 --regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \ 254 --regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \
245 --regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \ 255 --regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \
246 --regex='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' \ 256 --regex='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' \
257 --regex='/TESTPCGFLAG\(([^,)]*).*/PageCgroup\1/' \
258 --regex='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \
259 --regex='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \
260 --regex='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \
247 --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' \ 261 --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' \
248 --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \ 262 --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \
249 --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/' 263 --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/'\
264 --regex='/DEFINE_HASHTABLE\((\w*)/\1/v/'
250 265
251 all_kconfigs | xargs $1 -a \ 266 all_kconfigs | xargs $1 -a \
252 --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' 267 --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
@@ -266,7 +281,7 @@ xtags()
266 emacs $1 281 emacs $1
267 else 282 else
268 all_target_sources | xargs $1 -a 283 all_target_sources | xargs $1 -a
269 fi 284 fi
270} 285}
271 286
272# Support um (which uses SUBARCH) 287# Support um (which uses SUBARCH)