Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kbuild misc updates from Michal Marek:
"This is the non-critical part of kbuild for v3.16-rc1:
- make deb-pkg can do s390x and arm64
- new patterns in scripts/tags.sh
- scripts/tags.sh skips userspace tools' sources (which sometimes
have copies of kernel structures) and symlinks
- improvements to the objdiff tool
- two new coccinelle patches
- other minor fixes"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts: objdiff: support directories for the augument of record command
scripts: objdiff: fix a comment
scripts: objdiff: change the extension of disassembly from .o to .dis
scripts: objdiff: improve path flexibility for record command
scripts: objdiff: remove unnecessary code
scripts: objdiff: direct error messages to stderr
scripts: objdiff: get the path to .tmp_objdiff more simply
deb-pkg: Add automatic support for s390x architecture
coccicheck: Add unneeded return variable test
kbuild: Fix a typo in documentation
kbuild: trivial - use tabs for code indent where possible
kbuild: trivial - remove trailing empty lines
coccinelle: Check for missing NULL terminators in of_device_id tables
scripts/tags.sh: ignore symlink'ed source files
scripts/tags.sh: add regular expression replacement pattern for memcg
builddeb: add arm64 in the supported architectures
builddeb: use $OBJCOPY variable instead of objcopy
scripts/tags.sh: ignore code of user space tools
scripts/tags.sh: add pattern for DEFINE_HASHTABLE
.gitignore: ignore Module.symvers in all directories

+289 -158
+2 -2
.gitignore
··· 22 22 *.lst 23 23 *.symtypes 24 24 *.order 25 - modules.builtin 26 25 *.elf 27 26 *.bin 28 27 *.gz ··· 32 33 *.lzo 33 34 *.patch 34 35 *.gcno 36 + modules.builtin 37 + Module.symvers 35 38 36 39 # 37 40 # Top-level generic files ··· 45 44 /vmlinuz 46 45 /System.map 47 46 /Module.markers 48 - /Module.symvers 49 47 50 48 # 51 49 # Debian directory (make deb-pkg)
+1 -1
Documentation/kbuild/modules.txt
··· 470 470 471 471 Sometimes, an external module uses exported symbols from 472 472 another external module. kbuild needs to have full knowledge of 473 - all symbols to avoid spliitting out warnings about undefined 473 + all symbols to avoid spitting out warnings about undefined 474 474 symbols. Three solutions exist for this situation. 475 475 476 476 NOTE: The method with a top-level kbuild file is recommended
-1
scripts/Makefile.asm-generic
··· 21 21 22 22 $(obj)/%.h: 23 23 $(call cmd,wrap) 24 -
-1
scripts/Makefile.host
··· 167 167 168 168 targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ 169 169 $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) 170 -
+4 -4
scripts/basic/fixdep.c
··· 409 409 exit(2); 410 410 } 411 411 if (fstat(fd, &st) < 0) { 412 - fprintf(stderr, "fixdep: error fstat'ing depfile: "); 413 - perror(depfile); 414 - exit(2); 415 - } 412 + fprintf(stderr, "fixdep: error fstat'ing depfile: "); 413 + perror(depfile); 414 + exit(2); 415 + } 416 416 if (st.st_size == 0) { 417 417 fprintf(stderr,"fixdep: %s is empty\n",depfile); 418 418 close(fd);
-1
scripts/checkstack.pl
··· 173 173 174 174 # Sort output by size (last field) 175 175 print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; 176 -
+62
scripts/coccinelle/misc/of_table.cocci
··· 1 + /// Make sure of_device_id tables are NULL terminated 2 + // 3 + // Keywords: of_table 4 + // Confidence: Medium 5 + // Options: --include-headers 6 + 7 + virtual patch 8 + virtual context 9 + virtual org 10 + virtual report 11 + 12 + @depends on context@ 13 + identifier var, arr; 14 + expression E; 15 + @@ 16 + struct of_device_id arr[] = { 17 + ..., 18 + { 19 + .var = E, 20 + * } 21 + }; 22 + 23 + @depends on patch@ 24 + identifier var, arr; 25 + expression E; 26 + @@ 27 + struct of_device_id arr[] = { 28 + ..., 29 + { 30 + .var = E, 31 + - } 32 + + }, 33 + + { } 34 + }; 35 + 36 + @r depends on org || report@ 37 + position p1; 38 + identifier var, arr; 39 + expression E; 40 + @@ 41 + struct of_device_id arr[] = { 42 + ..., 43 + { 44 + .var = E, 45 + } 46 + @p1 47 + }; 48 + 49 + @script:python depends on org@ 50 + p1 << r.p1; 51 + arr << r.arr; 52 + @@ 53 + 54 + cocci.print_main(arr,p1) 55 + 56 + @script:python depends on report@ 57 + p1 << r.p1; 58 + arr << r.arr; 59 + @@ 60 + 61 + msg = "%s is not NULL terminated at line %s" % (arr, p1[0].line) 62 + coccilib.report.print_report(p1[0],msg)
+66
scripts/coccinelle/misc/returnvar.cocci
··· 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 + 12 + virtual patch 13 + virtual report 14 + virtual context 15 + virtual org 16 + 17 + @depends on patch@ 18 + type T; 19 + constant C; 20 + identifier ret; 21 + @@ 22 + - T ret = C; 23 + ... when != ret 24 + when strict 25 + return 26 + - ret 27 + + C 28 + ; 29 + 30 + @depends on context@ 31 + type T; 32 + constant C; 33 + identifier ret; 34 + @@ 35 + * T ret = C; 36 + ... when != ret 37 + when strict 38 + * return ret; 39 + 40 + @r1 depends on report || org@ 41 + type T; 42 + constant C; 43 + identifier ret; 44 + position p1, p2; 45 + @@ 46 + T ret@p1 = C; 47 + ... when != ret 48 + when strict 49 + return ret@p2; 50 + 51 + @script:python depends on report@ 52 + p1 << r1.p1; 53 + p2 << r1.p2; 54 + C << r1.C; 55 + ret << r1.ret; 56 + @@ 57 + coccilib.report.print_report(p1[0], "Unneeded variable: \"" + ret + "\". Return \"" + C + "\" on line " + p2[0].line) 58 + 59 + @script:python depends on org@ 60 + p1 << r1.p1; 61 + p2 << r1.p2; 62 + C << r1.C; 63 + ret << r1.ret; 64 + @@ 65 + cocci.print_main("unneeded \"" + ret + "\" variable", p1) 66 + cocci.print_sec("return " + C + " here", p2)
-1
scripts/config
··· 223 223 ;; 224 224 esac 225 225 done 226 -
+28 -28
scripts/docproc.c
··· 154 154 static void add_new_symbol(struct symfile *sym, char * symname) 155 155 { 156 156 sym->symbollist = 157 - realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); 157 + realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); 158 158 sym->symbollist[sym->symbolcnt++].name = strdup(symname); 159 159 } 160 160 ··· 215 215 char *p; 216 216 char *e; 217 217 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) || 218 - ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) { 218 + ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) { 219 219 /* Skip EXPORT_SYMBOL{_GPL} */ 220 220 while (isalnum(*p) || *p == '_') 221 221 p++; ··· 291 291 static void singfunc(char * filename, char * line) 292 292 { 293 293 char *vec[200]; /* Enough for specific functions */ 294 - int i, idx = 0; 295 - int startofsym = 1; 294 + int i, idx = 0; 295 + int startofsym = 1; 296 296 vec[idx++] = KERNELDOC; 297 297 vec[idx++] = DOCBOOK; 298 298 vec[idx++] = SHOWNOTFOUND; 299 299 300 - /* Split line up in individual parameters preceded by FUNCTION */ 301 - for (i=0; line[i]; i++) { 302 - if (isspace(line[i])) { 303 - line[i] = '\0'; 304 - startofsym = 1; 305 - continue; 306 - } 307 - if (startofsym) { 308 - startofsym = 0; 309 - vec[idx++] = FUNCTION; 310 - vec[idx++] = &line[i]; 311 - } 312 - } 300 + /* Split line up in individual parameters preceded by FUNCTION */ 301 + for (i=0; line[i]; i++) { 302 + if (isspace(line[i])) { 303 + line[i] = '\0'; 304 + startofsym = 1; 305 + continue; 306 + } 307 + if (startofsym) { 308 + startofsym = 0; 309 + vec[idx++] = FUNCTION; 310 + vec[idx++] = &line[i]; 311 + } 312 + } 313 313 for (i = 0; i < idx; i++) { 314 - if (strcmp(vec[i], FUNCTION)) 315 - continue; 314 + if (strcmp(vec[i], FUNCTION)) 315 + continue; 316 316 consume_symbol(vec[i + 1]); 317 317 } 318 318 vec[idx++] = filename; ··· 460 460 break; 461 461 case 'D': 462 462 while (*s && !isspace(*s)) s++; 463 - *s = '\0'; 464 - symbolsonly(line+2); 465 - break; 463 + *s = '\0'; 464 + symbolsonly(line+2); 465 + break; 466 466 case 'F': 467 467 /* filename */ 468 468 while (*s && !isspace(*s)) s++; 469 469 *s++ = '\0'; 470 - /* function names */ 470 + /* function names */ 471 471 while (isspace(*s)) 472 472 s++; 473 473 singlefunctions(line +2, s); ··· 515 515 } 516 516 /* Open file, exit on error */ 517 517 infile = fopen(argv[2], "r"); 518 - if (infile == NULL) { 519 - fprintf(stderr, "docproc: "); 520 - perror(argv[2]); 521 - exit(2); 522 - } 518 + if (infile == NULL) { 519 + fprintf(stderr, "docproc: "); 520 + perror(argv[2]); 521 + exit(2); 522 + } 523 523 524 524 if (strcmp("doc", argv[1]) == 0) { 525 525 /* Need to do this in two passes.
-1
scripts/dtc/.gitignore
··· 2 2 dtc-lexer.lex.c 3 3 dtc-parser.tab.c 4 4 dtc-parser.tab.h 5 -
-1
scripts/dtc/fstree.c
··· 88 88 89 89 return build_boot_info(NULL, tree, guess_boot_cpuid(tree)); 90 90 } 91 -
-1
scripts/dtc/libfdt/fdt_empty_tree.c
··· 81 81 82 82 return fdt_open_into(buf, buf, bufsize); 83 83 } 84 -
-1
scripts/dtc/treesource.c
··· 281 281 282 282 write_tree_source_node(f, bi->dt, 0); 283 283 } 284 -
-2
scripts/headers.sh
··· 28 28 ;; 29 29 esac 30 30 done 31 - 32 -
+1 -1
scripts/kallsyms.c
··· 123 123 } 124 124 if (strlen(str) > KSYM_NAME_LEN) { 125 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 127 str, strlen(str), KSYM_NAME_LEN); 128 128 return -1; 129 129 }
-1
scripts/kconfig/Makefile
··· 319 319 $(obj)/gconf.glade.h: $(obj)/gconf.glade 320 320 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ 321 321 $(obj)/gconf.glade 322 -
-1
scripts/kconfig/check.sh
··· 11 11 if [ ! "$?" -eq "0" ]; then 12 12 echo -DKBUILD_NO_NLS; 13 13 fi 14 -
+1 -1
scripts/kconfig/conf.c
··· 696 696 } else if (input_mode == savedefconfig) { 697 697 if (conf_write_defconfig(defconfig_file)) { 698 698 fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"), 699 - defconfig_file); 699 + defconfig_file); 700 700 return 1; 701 701 } 702 702 } else if (input_mode != listnewconfig) {
+1 -1
scripts/kconfig/gconf.c
··· 1404 1404 && (tree == tree2)) 1405 1405 continue; 1406 1406 /* 1407 - if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) 1407 + if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) 1408 1408 || (view_mode == FULL_VIEW) 1409 1409 || (view_mode == SPLIT_VIEW))*/ 1410 1410
+2 -2
scripts/kconfig/lxdialog/checklist.c
··· 168 168 169 169 /* create new window for the list */ 170 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 173 keypad(list, TRUE); 174 174 175 175 /* draw a box around the list items */ 176 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 179 /* Find length of longest item in order to center checklist */ 180 180 check_x = 0;
+1 -1
scripts/kconfig/lxdialog/inputbox.c
··· 42 42 * Display a dialog box for inputing a string 43 43 */ 44 44 int dialog_inputbox(const char *title, const char *prompt, int height, int width, 45 - const char *init) 45 + const char *init) 46 46 { 47 47 int i, x, y, box_y, box_x, box_width; 48 48 int input_x = 0, key = 0, button = -1;
+2 -2
scripts/kconfig/lxdialog/menubox.c
··· 64 64 * Print menu item 65 65 */ 66 66 static 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 69 int j; 70 70 char *menu_item = malloc(menu_width + 1); ··· 182 182 * Display a menu for choosing among a number of options 183 183 */ 184 184 int 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 187 int i, j, x, y, box_x, box_y; 188 188 int height, width, menu_height;
+1 -1
scripts/kconfig/lxdialog/util.c
··· 623 623 void item_add_str(const char *fmt, ...) 624 624 { 625 625 va_list ap; 626 - size_t avail; 626 + size_t avail; 627 627 628 628 avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); 629 629
+1 -2
scripts/kconfig/mconf.c
··· 299 299 int size; 300 300 301 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 303 if (size >= sizeof(menu_backtitle)) 304 304 menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; 305 305 set_dialog_backtitle(menu_backtitle); ··· 1034 1034 1035 1035 return res; 1036 1036 } 1037 -
+3 -3
scripts/kconfig/menu.c
··· 258 258 "config symbol '%s' uses select, but is " 259 259 "not boolean or tristate", sym->name); 260 260 else if (sym2->type != S_UNKNOWN && 261 - sym2->type != S_BOOLEAN && 262 - sym2->type != S_TRISTATE) 261 + sym2->type != S_BOOLEAN && 262 + sym2->type != S_TRISTATE) 263 263 prop_warn(prop, 264 264 "'%s' has wrong type. 'select' only " 265 265 "accept arguments of boolean and " ··· 268 268 case P_RANGE: 269 269 if (sym->type != S_INT && sym->type != S_HEX) 270 270 prop_warn(prop, "range is only allowed " 271 - "for int or hex symbols"); 271 + "for int or hex symbols"); 272 272 if (!menu_validate_number(sym, prop->expr->left.sym) || 273 273 !menu_validate_number(sym, prop->expr->right.sym)) 274 274 prop_warn(prop, "range is invalid");
-1
scripts/kconfig/nconf.c
··· 1554 1554 endwin(); 1555 1555 return 0; 1556 1556 } 1557 -
-2
scripts/kconfig/util.c
··· 155 155 fprintf(stderr, "Out of memory.\n"); 156 156 exit(1); 157 157 } 158 - 159 -
+2 -2
scripts/kconfig/zconf.l
··· 27 27 static int text_size, text_asize; 28 28 29 29 struct buffer { 30 - struct buffer *parent; 31 - YY_BUFFER_STATE state; 30 + struct buffer *parent; 31 + YY_BUFFER_STATE state; 32 32 }; 33 33 34 34 struct buffer *current_buf;
+2 -2
scripts/kconfig/zconf.lex.c_shipped
··· 789 789 static int text_size, text_asize; 790 790 791 791 struct buffer { 792 - struct buffer *parent; 793 - YY_BUFFER_STATE state; 792 + struct buffer *parent; 793 + YY_BUFFER_STATE state; 794 794 }; 795 795 796 796 struct buffer *current_buf;
+1 -1
scripts/kconfig/zconf.tab.c_shipped
··· 2314 2314 for_all_symbols(i, sym) { 2315 2315 if (sym_check_deps(sym)) 2316 2316 zconfnerrs++; 2317 - } 2317 + } 2318 2318 if (zconfnerrs) 2319 2319 exit(1); 2320 2320 sym_set_change_count(1);
+1 -1
scripts/kconfig/zconf.y
··· 510 510 for_all_symbols(i, sym) { 511 511 if (sym_check_deps(sym)) 512 512 zconfnerrs++; 513 - } 513 + } 514 514 if (zconfnerrs) 515 515 exit(1); 516 516 sym_set_change_count(1);
-1
scripts/markup_oops.pl
··· 367 367 EOT 368 368 exit; 369 369 } 370 -
-1
scripts/mksysmap
··· 42 42 # (At least sparc64 has __crc_ in the middle). 43 43 44 44 $NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2 45 -
-1
scripts/mod/.gitignore
··· 2 2 mk_elfconfig 3 3 modpost 4 4 devicetable-offsets.h 5 -
+16 -18
scripts/mod/file2alias.c
··· 644 644 645 645 static int do_of_entry (const char *filename, void *symval, char *alias) 646 646 { 647 - int len; 648 - char *tmp; 649 - DEF_FIELD_ADDR(symval, of_device_id, name); 650 - DEF_FIELD_ADDR(symval, of_device_id, type); 651 - DEF_FIELD_ADDR(symval, of_device_id, compatible); 647 + int len; 648 + char *tmp; 649 + DEF_FIELD_ADDR(symval, of_device_id, name); 650 + DEF_FIELD_ADDR(symval, of_device_id, type); 651 + DEF_FIELD_ADDR(symval, of_device_id, compatible); 652 652 653 - len = sprintf (alias, "of:N%sT%s", 654 - (*name)[0] ? *name : "*", 655 - (*type)[0] ? *type : "*"); 653 + len = sprintf(alias, "of:N%sT%s", (*name)[0] ? *name : "*", 654 + (*type)[0] ? *type : "*"); 656 655 657 - if (compatible[0]) 658 - sprintf (&alias[len], "%sC%s", 659 - (*type)[0] ? "*" : "", 660 - *compatible); 656 + if (compatible[0]) 657 + sprintf(&alias[len], "%sC%s", (*type)[0] ? "*" : "", 658 + *compatible); 661 659 662 - /* Replace all whitespace with underscores */ 663 - for (tmp = alias; tmp && *tmp; tmp++) 664 - if (isspace (*tmp)) 665 - *tmp = '_'; 660 + /* Replace all whitespace with underscores */ 661 + for (tmp = alias; tmp && *tmp; tmp++) 662 + if (isspace (*tmp)) 663 + *tmp = '_'; 666 664 667 - add_wildcard(alias); 668 - return 1; 665 + add_wildcard(alias); 666 + return 1; 669 667 } 670 668 ADD_TO_DEVTABLE("of", of_device_id, do_of_entry); 671 669
-1
scripts/mod/mk_elfconfig.c
··· 54 54 55 55 return 0; 56 56 } 57 -
+15 -15
scripts/mod/modpost.c
··· 862 862 * without "ax" / "aw". 863 863 */ 864 864 static void check_section(const char *modname, struct elf_info *elf, 865 - Elf_Shdr *sechdr) 865 + Elf_Shdr *sechdr) 866 866 { 867 867 const char *sec = sech_name(elf, sechdr); 868 868 ··· 1296 1296 */ 1297 1297 static void report_sec_mismatch(const char *modname, 1298 1298 const struct sectioncheck *mismatch, 1299 - const char *fromsec, 1300 - unsigned long long fromaddr, 1301 - const char *fromsym, 1302 - int from_is_func, 1303 - const char *tosec, const char *tosym, 1304 - int to_is_func) 1299 + const char *fromsec, 1300 + unsigned long long fromaddr, 1301 + const char *fromsym, 1302 + int from_is_func, 1303 + const char *tosec, const char *tosym, 1304 + int to_is_func) 1305 1305 { 1306 1306 const char *from, *from_p; 1307 1307 const char *to, *to_p; ··· 1441 1441 } 1442 1442 1443 1443 static 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 1446 const char *tosec; 1447 1447 const struct sectioncheck *mismatch; ··· 1528 1528 case R_ARM_ABS32: 1529 1529 /* From ARM ABI: (S + A) | T */ 1530 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 1532 break; 1533 1533 case R_ARM_PC24: 1534 1534 case R_ARM_CALL: ··· 1538 1538 case R_ARM_THM_JUMP19: 1539 1539 /* From ARM ABI: ((S + A) | T) - P */ 1540 1540 r->r_addend = (int)(long)(elf->hdr + 1541 - sechdr->sh_offset + 1542 - (r->r_offset - sechdr->sh_addr)); 1541 + sechdr->sh_offset + 1542 + (r->r_offset - sechdr->sh_addr)); 1543 1543 break; 1544 1544 default: 1545 1545 return 1; ··· 1571 1571 } 1572 1572 1573 1573 static void section_rela(const char *modname, struct elf_info *elf, 1574 - Elf_Shdr *sechdr) 1574 + Elf_Shdr *sechdr) 1575 1575 { 1576 1576 Elf_Sym *sym; 1577 1577 Elf_Rela *rela; ··· 1615 1615 } 1616 1616 1617 1617 static void section_rel(const char *modname, struct elf_info *elf, 1618 - Elf_Shdr *sechdr) 1618 + Elf_Shdr *sechdr) 1619 1619 { 1620 1620 Elf_Sym *sym; 1621 1621 Elf_Rel *rel; ··· 1685 1685 * be discarded and warns about it. 1686 1686 **/ 1687 1687 static void check_sec_ref(struct module *mod, const char *modname, 1688 - struct elf_info *elf) 1688 + struct elf_info *elf) 1689 1689 { 1690 1690 int i; 1691 1691 Elf_Shdr *sechdrs = elf->sechdrs; ··· 1945 1945 s->name, mod->name); 1946 1946 } else { 1947 1947 merror("\"%s\" [%s.ko] undefined!\n", 1948 - s->name, mod->name); 1948 + s->name, mod->name); 1949 1949 err = 1; 1950 1950 } 1951 1951 }
+2 -2
scripts/mod/sumversion.c
··· 214 214 mctx->block[14] = mctx->byte_count << 3; 215 215 mctx->block[15] = mctx->byte_count >> 29; 216 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 218 md4_transform(mctx->hash, mctx->block); 219 219 cpu_to_le32_array(mctx->hash, sizeof(mctx->hash) / sizeof(uint32_t)); 220 220 ··· 367 367 break; 368 368 /* Terminate line at first space, to get rid of final ' \' */ 369 369 while (*p) { 370 - if (isspace(*p)) { 370 + if (isspace(*p)) { 371 371 *p = '\0'; 372 372 break; 373 373 }
+46 -28
scripts/objdiff
··· 25 25 # 26 26 # Note: 'make mrproper' will also remove .tmp_objdiff 27 27 28 - GIT_DIR="`git rev-parse --git-dir`" 28 + SRCTREE=$(cd $(git rev-parse --show-toplevel 2>/dev/null); pwd) 29 29 30 - if [ -d "$GIT_DIR" ]; then 31 - TMPD="${GIT_DIR%git}tmp_objdiff" 32 - 33 - [ -d "$TMPD" ] || mkdir "$TMPD" 34 - else 35 - echo "ERROR: git directory not found." 30 + if [ -z "$SRCTREE" ]; then 31 + echo >&2 "ERROR: Not a git repository." 36 32 exit 1 37 33 fi 38 34 35 + TMPD=$SRCTREE/.tmp_objdiff 36 + 39 37 usage() { 40 - echo "Usage: $0 <command> <args>" 41 - echo " record <list of object files>" 42 - echo " diff <commitA> <commitB>" 43 - echo " clean all | <commit>" 38 + echo >&2 "Usage: $0 <command> <args>" 39 + echo >&2 " record <list of object files or directories>" 40 + echo >&2 " diff <commitA> <commitB>" 41 + echo >&2 " clean all | <commit>" 44 42 exit 1 43 + } 44 + 45 + get_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 + 57 + do_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 45 67 } 46 68 47 69 dorecord() { ··· 74 52 CMT="`git rev-parse --short HEAD`" 75 53 76 54 OBJDUMP="${CROSS_COMPILE}objdump" 77 - OBJDIFFD="$TMPD/$CMT" 78 55 79 - [ ! -d "$OBJDIFFD" ] && mkdir -p "$OBJDIFFD" 80 - 81 - for f in $FILES; do 82 - dn="${f%/*}" 83 - bn="${f##*/}" 84 - 85 - [ ! -d "$OBJDIFFD/$dn" ] && mkdir -p "$OBJDIFFD/$dn" 86 - 87 - # remove addresses for a more clear diff 88 - # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and 89 - $OBJDUMP -D "$f" | sed "s/^[[:space:]]\+[0-9a-f]\+//" \ 90 - >"$OBJDIFFD/$dn/$bn" 56 + for d in $FILES; do 57 + if [ -d "$d" ]; then 58 + for f in $(find $d -name '*.o') 59 + do 60 + do_objdump $f 61 + done 62 + else 63 + do_objdump $d 64 + fi 91 65 done 92 66 } 93 67 ··· 108 90 DSTD="$TMPD/$DST" 109 91 110 92 if [ ! -d "$SRCD" ]; then 111 - echo "ERROR: $SRCD doesn't exist" 93 + echo >&2 "ERROR: $SRCD doesn't exist" 112 94 exit 1 113 95 fi 114 96 115 97 if [ ! -d "$DSTD" ]; then 116 - echo "ERROR: $DSTD doesn't exist" 98 + echo >&2 "ERROR: $DSTD doesn't exist" 117 99 exit 1 118 100 fi 119 101 ··· 132 114 if [ -d "$TMPD/$CMT" ]; then 133 115 rm -rf $TMPD/$CMT 134 116 else 135 - echo "$CMT not found" 117 + echo >&2 "$CMT not found" 136 118 fi 137 119 fi 138 120 } ··· 153 135 doclean $* 154 136 ;; 155 137 *) 156 - echo "Unrecognized command '$1'" 138 + echo >&2 "Unrecognized command '$1'" 157 139 exit 1 158 140 ;; 159 141 esac
-1
scripts/package/Makefile
··· 143 143 @echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball' 144 144 @echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball' 145 145 @echo ' perf-tarxz-src-pkg - Build $(perf-tar).tar.xz source tarball' 146 -
+6 -4
scripts/package/builddeb
··· 35 35 sparc*) 36 36 debarch=sparc ;; 37 37 s390*) 38 - debarch=s390 ;; 38 + debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;; 39 39 ppc*) 40 40 debarch=powerpc ;; 41 41 parisc*) 42 42 debarch=hppa ;; 43 43 mips*) 44 44 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;; 45 + arm64) 46 + debarch=arm64 ;; 45 47 arm*) 46 48 debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;; 47 49 *) ··· 157 155 for module in $(find lib/modules/ -name *.ko); do 158 156 mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module) 159 157 # only keep debug symbols in the debug file 160 - objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module 158 + $OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module 161 159 # strip original module from debug symbols 162 - objcopy --strip-debug $module 160 + $OBJCOPY --strip-debug $module 163 161 # then add a link to those 164 - objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module 162 + $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module 165 163 done 166 164 ) 167 165 fi
-1
scripts/package/buildtar
··· 136 136 echo "Tarball successfully created in ${tarball}${file_ext}" 137 137 138 138 exit 0 139 -
-1
scripts/pnmtologo.c
··· 512 512 } 513 513 exit(0); 514 514 } 515 -
-2
scripts/recordmcount.c
··· 487 487 } 488 488 return !!n_error; 489 489 } 490 - 491 -
-1
scripts/rt-tester/check-all.sh
··· 19 19 testit t4-l2-pi-deboost.tst 20 20 testit t5-l4-pi-boost-deboost.tst 21 21 testit t5-l4-pi-boost-deboost-setsched.tst 22 -
-2
scripts/rt-tester/rt-tester.py
··· 216 216 # Normal exit pass 217 217 print "Pass" 218 218 sys.exit(0) 219 - 220 -
-1
scripts/selinux/install_policy.sh
··· 66 66 $SF file_contexts /dev 67 67 mount --move /mnt /dev 68 68 fi 69 -
-1
scripts/show_delta
··· 126 126 print (convert_line(line, base_time),) 127 127 128 128 main() 129 -
+22 -7
scripts/tags.sh
··· 25 25 tree=${srctree}/ 26 26 fi 27 27 28 + # ignore userspace tools 29 + ignore="$ignore ( -path ${tree}tools ) -prune -o" 30 + 28 31 # Find all available archs 29 32 find_all_archs() 30 33 { ··· 50 47 for i in $archincludedir; do 51 48 prune="$prune -wholename $i -prune -o" 52 49 done 53 - find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" -print; 50 + find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" \ 51 + -not -type l -print; 54 52 } 55 53 56 54 # find sources in arch/$1/include ··· 61 57 -name include -type d -print); 62 58 if [ -n "$include" ]; then 63 59 archincludedir="$archincludedir $include" 64 - find $include $ignore -name "$2" -print; 60 + find $include $ignore -name "$2" -not -type l -print; 65 61 fi 66 62 } 67 63 68 64 # find sources in include/ 69 65 find_include_sources() 70 66 { 71 - find ${tree}include $ignore -name config -prune -o -name "$1" -print; 67 + find ${tree}include $ignore -name config -prune -o -name "$1" \ 68 + -not -type l -print; 72 69 } 73 70 74 71 # find sources in rest of tree ··· 78 73 { 79 74 find ${tree}* $ignore \ 80 75 \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ 81 - -name "$1" -print; 76 + -name "$1" -not -type l -print; 82 77 } 83 78 84 79 find_sources() ··· 192 187 --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ 193 188 --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ 194 189 --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ 190 + --regex-c++='/TESTPCGFLAG\(([^,)]*).*/PageCgroup\1/' \ 191 + --regex-c++='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \ 192 + --regex-c++='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \ 193 + --regex-c++='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \ 195 194 --regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_config_\1/' \ 196 195 --regex-c='/PCI_OP_WRITE\((\w*).*[1-4]\)/pci_bus_write_config_\1/' \ 197 196 --regex-c='/DEFINE_(MUTEX|SEMAPHORE|SPINLOCK)\((\w*)/\2/v/' \ ··· 210 201 --regex-c='/DECLARE_(TASKLET|WORK|DELAYED_WORK)\((\w*)/\2/v/' \ 211 202 --regex-c='/DEFINE_PCI_DEVICE_TABLE\((\w*)/\1/v/' \ 212 203 --regex-c='/(^\s)OFFSET\((\w*)/\2/v/' \ 213 - --regex-c='/(^\s)DEFINE\((\w*)/\2/v/' 204 + --regex-c='/(^\s)DEFINE\((\w*)/\2/v/' \ 205 + --regex-c='/DEFINE_HASHTABLE\((\w*)/\1/v/' 214 206 215 207 all_kconfigs | xargs $1 -a \ 216 208 --langdef=kconfig --language-force=kconfig \ ··· 254 244 --regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \ 255 245 --regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \ 256 246 --regex='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' \ 247 + --regex='/TESTPCGFLAG\(([^,)]*).*/PageCgroup\1/' \ 248 + --regex='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \ 249 + --regex='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \ 250 + --regex='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \ 257 251 --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' \ 258 252 --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \ 259 - --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/' 253 + --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/'\ 254 + --regex='/DEFINE_HASHTABLE\((\w*)/\1/v/' 260 255 261 256 all_kconfigs | xargs $1 -a \ 262 257 --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' ··· 281 266 emacs $1 282 267 else 283 268 all_target_sources | xargs $1 -a 284 - fi 269 + fi 285 270 } 286 271 287 272 # Support um (which uses SUBARCH)