Commit 62070fa42c4ac23d1d71146a4c14702302b80245
1 parent
e11f04962c
Exists in
master
and in
7 other branches
kbuild: kill trailing whitespace in modpost & friends
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Showing 4 changed files with 43 additions and 43 deletions Side-by-side Diff
scripts/mod/file2alias.c
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | typedef unsigned char __u8; |
35 | 35 | |
36 | 36 | /* Big exception to the "don't include kernel headers into userspace, which |
37 | - * even potentially has different endianness and word sizes, since | |
37 | + * even potentially has different endianness and word sizes, since | |
38 | 38 | * we handle those differences explicitly below */ |
39 | 39 | #include "../../include/linux/mod_devicetable.h" |
40 | 40 | #include "../../include/linux/input.h" |
... | ... | @@ -228,7 +228,7 @@ |
228 | 228 | return 1; |
229 | 229 | } |
230 | 230 | |
231 | -/* looks like: "ccw:tNmNdtNdmN" */ | |
231 | +/* looks like: "ccw:tNmNdtNdmN" */ | |
232 | 232 | static int do_ccw_entry(const char *filename, |
233 | 233 | struct ccw_device_id *id, char *alias) |
234 | 234 | { |
scripts/mod/mk_elfconfig.c
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | int |
7 | 7 | main(int argc, char **argv) |
8 | 8 | { |
9 | - unsigned char ei[EI_NIDENT]; | |
9 | + unsigned char ei[EI_NIDENT]; | |
10 | 10 | union { short s; char c[2]; } endian_test; |
11 | 11 | |
12 | 12 | if (argc != 2) { |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | |
58 | 58 | if ((strcmp(argv[1], "v850") == 0) || (strcmp(argv[1], "h8300") == 0)) |
59 | 59 | printf("#define MODULE_SYMBOL_PREFIX \"_\"\n"); |
60 | - else | |
60 | + else | |
61 | 61 | printf("#define MODULE_SYMBOL_PREFIX \"\"\n"); |
62 | 62 | |
63 | 63 | return 0; |
scripts/mod/modpost.c
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | { |
86 | 86 | struct module *mod; |
87 | 87 | char *p, *s; |
88 | - | |
88 | + | |
89 | 89 | mod = NOFAIL(malloc(sizeof(*mod))); |
90 | 90 | memset(mod, 0, sizeof(*mod)); |
91 | 91 | p = NOFAIL(strdup(modname)); |
92 | 92 | |
... | ... | @@ -320,9 +320,9 @@ |
320 | 320 | continue; |
321 | 321 | |
322 | 322 | info->symtab_start = (void *)hdr + sechdrs[i].sh_offset; |
323 | - info->symtab_stop = (void *)hdr + sechdrs[i].sh_offset | |
323 | + info->symtab_stop = (void *)hdr + sechdrs[i].sh_offset | |
324 | 324 | + sechdrs[i].sh_size; |
325 | - info->strtab = (void *)hdr + | |
325 | + info->strtab = (void *)hdr + | |
326 | 326 | sechdrs[sechdrs[i].sh_link].sh_offset; |
327 | 327 | } |
328 | 328 | if (!info->symtab_start) { |
329 | 329 | |
... | ... | @@ -387,15 +387,15 @@ |
387 | 387 | /* Ignore register directives. */ |
388 | 388 | if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER) |
389 | 389 | break; |
390 | - if (symname[0] == '.') { | |
391 | - char *munged = strdup(symname); | |
392 | - munged[0] = '_'; | |
393 | - munged[1] = toupper(munged[1]); | |
394 | - symname = munged; | |
395 | - } | |
390 | + if (symname[0] == '.') { | |
391 | + char *munged = strdup(symname); | |
392 | + munged[0] = '_'; | |
393 | + munged[1] = toupper(munged[1]); | |
394 | + symname = munged; | |
395 | + } | |
396 | 396 | } |
397 | 397 | #endif |
398 | - | |
398 | + | |
399 | 399 | if (memcmp(symname, MODULE_SYMBOL_PREFIX, |
400 | 400 | strlen(MODULE_SYMBOL_PREFIX)) == 0) |
401 | 401 | mod->unres = alloc_symbol(symname + |
402 | 402 | |
403 | 403 | |
... | ... | @@ -458,13 +458,13 @@ |
458 | 458 | static int strrcmp(const char *s, const char *sub) |
459 | 459 | { |
460 | 460 | int slen, sublen; |
461 | - | |
461 | + | |
462 | 462 | if (!s || !sub) |
463 | 463 | return 1; |
464 | - | |
464 | + | |
465 | 465 | slen = strlen(s); |
466 | 466 | sublen = strlen(sub); |
467 | - | |
467 | + | |
468 | 468 | if ((slen == 0) || (sublen == 0)) |
469 | 469 | return 1; |
470 | 470 | |
... | ... | @@ -485,7 +485,7 @@ |
485 | 485 | * tosec = .init.data |
486 | 486 | * fromsec = .data |
487 | 487 | * atsym =__param* |
488 | - * | |
488 | + * | |
489 | 489 | * Pattern 2: |
490 | 490 | * Many drivers utilise a *_driver container with references to |
491 | 491 | * add, remove, probe functions etc. |
... | ... | @@ -508,7 +508,7 @@ |
508 | 508 | "_probe_one", |
509 | 509 | NULL |
510 | 510 | }; |
511 | - | |
511 | + | |
512 | 512 | /* Check for pattern 1 */ |
513 | 513 | if (strcmp(tosec, ".init.data") != 0) |
514 | 514 | f1 = 0; |
... | ... | @@ -521,7 +521,7 @@ |
521 | 521 | return f1; |
522 | 522 | |
523 | 523 | /* Check for pattern 2 */ |
524 | - if ((strcmp(tosec, ".init.text") != 0) && | |
524 | + if ((strcmp(tosec, ".init.text") != 0) && | |
525 | 525 | (strcmp(tosec, ".exit.text") != 0)) |
526 | 526 | f2 = 0; |
527 | 527 | if (strcmp(fromsec, ".data") != 0) |
... | ... | @@ -570,7 +570,7 @@ |
570 | 570 | Elf_Addr afterdiff = ~0; |
571 | 571 | const char *secstrings = (void *)hdr + |
572 | 572 | elf->sechdrs[hdr->e_shstrndx].sh_offset; |
573 | - | |
573 | + | |
574 | 574 | *before = NULL; |
575 | 575 | *after = NULL; |
576 | 576 | |
... | ... | @@ -614,7 +614,7 @@ |
614 | 614 | const char *secstrings = (void *)hdr + |
615 | 615 | sechdrs[hdr->e_shstrndx].sh_offset; |
616 | 616 | const char *secname = secstrings + sechdrs[sym->st_shndx].sh_name; |
617 | - | |
617 | + | |
618 | 618 | find_symbols_between(elf, r.r_offset, fromsec, &before, &after); |
619 | 619 | |
620 | 620 | refsym = find_elf_symbol(elf, r.r_addend, sym); |
621 | 621 | |
... | ... | @@ -622,10 +622,10 @@ |
622 | 622 | refsymname = elf->strtab + refsym->st_name; |
623 | 623 | |
624 | 624 | /* check whitelist - we may ignore it */ |
625 | - if (before && | |
625 | + if (before && | |
626 | 626 | secref_whitelist(secname, fromsec, elf->strtab + before->st_name)) |
627 | 627 | return; |
628 | - | |
628 | + | |
629 | 629 | if (before && after) { |
630 | 630 | warn("%s - Section mismatch: reference to %s:%s from %s " |
631 | 631 | "between '%s' (at offset 0x%llx) and '%s'\n", |
632 | 632 | |
... | ... | @@ -636,13 +636,13 @@ |
636 | 636 | } else if (before) { |
637 | 637 | warn("%s - Section mismatch: reference to %s:%s from %s " |
638 | 638 | "after '%s' (at offset 0x%llx)\n", |
639 | - modname, secname, refsymname, fromsec, | |
639 | + modname, secname, refsymname, fromsec, | |
640 | 640 | elf->strtab + before->st_name, |
641 | 641 | (long long)r.r_offset); |
642 | 642 | } else if (after) { |
643 | 643 | warn("%s - Section mismatch: reference to %s:%s from %s " |
644 | 644 | "before '%s' (at offset -0x%llx)\n", |
645 | - modname, secname, refsymname, fromsec, | |
645 | + modname, secname, refsymname, fromsec, | |
646 | 646 | elf->strtab + before->st_name, |
647 | 647 | (long long)r.r_offset); |
648 | 648 | } else { |
... | ... | @@ -676,7 +676,7 @@ |
676 | 676 | Elf_Shdr *sechdrs = elf->sechdrs; |
677 | 677 | const char *secstrings = (void *)hdr + |
678 | 678 | sechdrs[hdr->e_shstrndx].sh_offset; |
679 | - | |
679 | + | |
680 | 680 | /* Walk through all sections */ |
681 | 681 | for (i = 0; i < hdr->e_shnum; i++) { |
682 | 682 | Elf_Rela *rela; |
683 | 683 | |
... | ... | @@ -724,13 +724,13 @@ |
724 | 724 | |
725 | 725 | /** |
726 | 726 | * Identify sections from which references to a .init section is OK. |
727 | - * | |
727 | + * | |
728 | 728 | * Unfortunately references to read only data that referenced .init |
729 | 729 | * sections had to be excluded. Almost all of these are false |
730 | 730 | * positives, they are created by gcc. The downside of excluding rodata |
731 | 731 | * is that there really are some user references from rodata to |
732 | 732 | * init code, e.g. drivers/video/vgacon.c: |
733 | - * | |
733 | + * | |
734 | 734 | * const struct consw vga_con = { |
735 | 735 | * con_startup: vgacon_startup, |
736 | 736 | * |
737 | 737 | |
... | ... | @@ -769,10 +769,10 @@ |
769 | 769 | for (s = namelist1; *s; s++) |
770 | 770 | if (strcmp(*s, name) == 0) |
771 | 771 | return 1; |
772 | - for (s = namelist2; *s; s++) | |
772 | + for (s = namelist2; *s; s++) | |
773 | 773 | if (strncmp(*s, name, strlen(*s)) == 0) |
774 | 774 | return 1; |
775 | - for (s = namelist3; *s; s++) | |
775 | + for (s = namelist3; *s; s++) | |
776 | 776 | if (strstr(*s, name) != NULL) |
777 | 777 | return 1; |
778 | 778 | return 0; |
779 | 779 | |
... | ... | @@ -792,12 +792,12 @@ |
792 | 792 | if (strcmp(name, ".exit.data") == 0) |
793 | 793 | return 1; |
794 | 794 | return 0; |
795 | - | |
795 | + | |
796 | 796 | } |
797 | 797 | |
798 | 798 | /* |
799 | 799 | * Identify sections from which references to a .exit section is OK. |
800 | - * | |
800 | + * | |
801 | 801 | * [OPD] Keith Ownes <kaos@sgi.com> commented: |
802 | 802 | * For our future {in}sanity, add a comment that this is the ppc .opd |
803 | 803 | * section, not the ia64 .opd section. |
804 | 804 | |
805 | 805 | |
... | ... | @@ -829,14 +829,14 @@ |
829 | 829 | ".unwind", /* Sample: IA_64.unwind.exit.text */ |
830 | 830 | NULL |
831 | 831 | }; |
832 | - | |
832 | + | |
833 | 833 | for (s = namelist1; *s; s++) |
834 | 834 | if (strcmp(*s, name) == 0) |
835 | 835 | return 1; |
836 | - for (s = namelist2; *s; s++) | |
836 | + for (s = namelist2; *s; s++) | |
837 | 837 | if (strncmp(*s, name, strlen(*s)) == 0) |
838 | 838 | return 1; |
839 | - for (s = namelist3; *s; s++) | |
839 | + for (s = namelist3; *s; s++) | |
840 | 840 | if (strstr(*s, name) != NULL) |
841 | 841 | return 1; |
842 | 842 | return 0; |
... | ... | @@ -900,7 +900,7 @@ |
900 | 900 | char tmp[SZ]; |
901 | 901 | int len; |
902 | 902 | va_list ap; |
903 | - | |
903 | + | |
904 | 904 | va_start(ap, fmt); |
905 | 905 | len = vsnprintf(tmp, SZ, fmt, ap); |
906 | 906 | if (buf->size - buf->pos < len + 1) { |
... | ... | @@ -1129,7 +1129,7 @@ |
1129 | 1129 | return 0; |
1130 | 1130 | return 1; |
1131 | 1131 | } |
1132 | - | |
1132 | + | |
1133 | 1133 | static void write_dump(const char *fname) |
1134 | 1134 | { |
1135 | 1135 | struct buffer buf = { }; |
... | ... | @@ -1141,7 +1141,7 @@ |
1141 | 1141 | while (symbol) { |
1142 | 1142 | if (dump_sym(symbol)) |
1143 | 1143 | buf_printf(&buf, "0x%08x\t%s\t%s\n", |
1144 | - symbol->crc, symbol->name, | |
1144 | + symbol->crc, symbol->name, | |
1145 | 1145 | symbol->module->name); |
1146 | 1146 | symbol = symbol->next; |
1147 | 1147 | } |
scripts/mod/modpost.h
... | ... | @@ -13,8 +13,8 @@ |
13 | 13 | |
14 | 14 | #if KERNEL_ELFCLASS == ELFCLASS32 |
15 | 15 | |
16 | -#define Elf_Ehdr Elf32_Ehdr | |
17 | -#define Elf_Shdr Elf32_Shdr | |
16 | +#define Elf_Ehdr Elf32_Ehdr | |
17 | +#define Elf_Shdr Elf32_Shdr | |
18 | 18 | #define Elf_Sym Elf32_Sym |
19 | 19 | #define Elf_Addr Elf32_Addr |
20 | 20 | #define Elf_Section Elf32_Section |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | #define ELF_R_TYPE ELF32_R_TYPE |
27 | 27 | #else |
28 | 28 | |
29 | -#define Elf_Ehdr Elf64_Ehdr | |
30 | -#define Elf_Shdr Elf64_Shdr | |
29 | +#define Elf_Ehdr Elf64_Ehdr | |
30 | +#define Elf_Shdr Elf64_Shdr | |
31 | 31 | #define Elf_Sym Elf64_Sym |
32 | 32 | #define Elf_Addr Elf64_Addr |
33 | 33 | #define Elf_Section Elf64_Section |