diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkpatch.pl | 72 | ||||
| -rw-r--r-- | scripts/coccinelle/iterators/use_after_iter.cocci | 147 | ||||
| -rw-r--r-- | scripts/coccinelle/misc/irqf_oneshot.cocci | 65 | ||||
| -rwxr-xr-x | scripts/config | 62 | ||||
| -rwxr-xr-x | scripts/decodecode | 2 | ||||
| -rwxr-xr-x | scripts/get_maintainer.pl | 3 | ||||
| -rwxr-xr-x[-rw-r--r--] | scripts/gfp-translate | 0 | ||||
| -rw-r--r-- | scripts/kconfig/.gitignore | 1 | ||||
| -rw-r--r-- | scripts/kconfig/Makefile | 41 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 61 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/check-lxdialog.sh | 8 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/textbox.c | 3 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 6 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.c | 10 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.gui.c | 8 | ||||
| -rw-r--r-- | scripts/kconfig/streamline_config.pl | 175 | ||||
| -rwxr-xr-x | scripts/kernel-doc | 1 | ||||
| -rw-r--r-- | scripts/link-vmlinux.sh | 4 | ||||
| -rw-r--r-- | scripts/mksysmap | 2 | ||||
| -rw-r--r-- | scripts/mod/file2alias.c | 5 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 11 | ||||
| -rw-r--r-- | scripts/package/builddeb | 7 | ||||
| -rw-r--r-- | scripts/sortextable.c | 1 | ||||
| -rwxr-xr-x | scripts/tags.sh | 6 |
24 files changed, 618 insertions, 83 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e5bd60ff48e3..ca05ba217f5f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -1600,13 +1600,17 @@ sub process { | |||
| 1600 | 1600 | ||
| 1601 | # Check signature styles | 1601 | # Check signature styles |
| 1602 | if (!$in_header_lines && | 1602 | if (!$in_header_lines && |
| 1603 | $line =~ /^(\s*)($signature_tags)(\s*)(.*)/) { | 1603 | $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) { |
| 1604 | my $space_before = $1; | 1604 | my $space_before = $1; |
| 1605 | my $sign_off = $2; | 1605 | my $sign_off = $2; |
| 1606 | my $space_after = $3; | 1606 | my $space_after = $3; |
| 1607 | my $email = $4; | 1607 | my $email = $4; |
| 1608 | my $ucfirst_sign_off = ucfirst(lc($sign_off)); | 1608 | my $ucfirst_sign_off = ucfirst(lc($sign_off)); |
| 1609 | 1609 | ||
| 1610 | if ($sign_off !~ /$signature_tags/) { | ||
| 1611 | WARN("BAD_SIGN_OFF", | ||
| 1612 | "Non-standard signature: $sign_off\n" . $herecurr); | ||
| 1613 | } | ||
| 1610 | if (defined $space_before && $space_before ne "") { | 1614 | if (defined $space_before && $space_before ne "") { |
| 1611 | WARN("BAD_SIGN_OFF", | 1615 | WARN("BAD_SIGN_OFF", |
| 1612 | "Do not use whitespace before $ucfirst_sign_off\n" . $herecurr); | 1616 | "Do not use whitespace before $ucfirst_sign_off\n" . $herecurr); |
| @@ -1848,8 +1852,8 @@ sub process { | |||
| 1848 | 1852 | ||
| 1849 | my $pos = pos_last_openparen($rest); | 1853 | my $pos = pos_last_openparen($rest); |
| 1850 | if ($pos >= 0) { | 1854 | if ($pos >= 0) { |
| 1851 | $line =~ /^\+([ \t]*)/; | 1855 | $line =~ /^(\+| )([ \t]*)/; |
| 1852 | my $newindent = $1; | 1856 | my $newindent = $2; |
| 1853 | 1857 | ||
| 1854 | my $goodtabindent = $oldindent . | 1858 | my $goodtabindent = $oldindent . |
| 1855 | "\t" x ($pos / 8) . | 1859 | "\t" x ($pos / 8) . |
| @@ -2984,6 +2988,46 @@ sub process { | |||
| 2984 | } | 2988 | } |
| 2985 | } | 2989 | } |
| 2986 | 2990 | ||
| 2991 | # do {} while (0) macro tests: | ||
| 2992 | # single-statement macros do not need to be enclosed in do while (0) loop, | ||
| 2993 | # macro should not end with a semicolon | ||
| 2994 | if ($^V && $^V ge 5.10.0 && | ||
| 2995 | $realfile !~ m@/vmlinux.lds.h$@ && | ||
| 2996 | $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) { | ||
| 2997 | my $ln = $linenr; | ||
| 2998 | my $cnt = $realcnt; | ||
| 2999 | my ($off, $dstat, $dcond, $rest); | ||
| 3000 | my $ctx = ''; | ||
| 3001 | ($dstat, $dcond, $ln, $cnt, $off) = | ||
| 3002 | ctx_statement_block($linenr, $realcnt, 0); | ||
| 3003 | $ctx = $dstat; | ||
| 3004 | |||
| 3005 | $dstat =~ s/\\\n.//g; | ||
| 3006 | |||
| 3007 | if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) { | ||
| 3008 | my $stmts = $2; | ||
| 3009 | my $semis = $3; | ||
| 3010 | |||
| 3011 | $ctx =~ s/\n*$//; | ||
| 3012 | my $cnt = statement_rawlines($ctx); | ||
| 3013 | my $herectx = $here . "\n"; | ||
| 3014 | |||
| 3015 | for (my $n = 0; $n < $cnt; $n++) { | ||
| 3016 | $herectx .= raw_line($linenr, $n) . "\n"; | ||
| 3017 | } | ||
| 3018 | |||
| 3019 | if (($stmts =~ tr/;/;/) == 1 && | ||
| 3020 | $stmts !~ /^\s*(if|while|for|switch)\b/) { | ||
| 3021 | WARN("SINGLE_STATEMENT_DO_WHILE_MACRO", | ||
| 3022 | "Single statement macros should not use a do {} while (0) loop\n" . "$herectx"); | ||
| 3023 | } | ||
| 3024 | if (defined $semis && $semis ne "") { | ||
| 3025 | WARN("DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON", | ||
| 3026 | "do {} while (0) macros should not be semicolon terminated\n" . "$herectx"); | ||
| 3027 | } | ||
| 3028 | } | ||
| 3029 | } | ||
| 3030 | |||
| 2987 | # make sure symbols are always wrapped with VMLINUX_SYMBOL() ... | 3031 | # make sure symbols are always wrapped with VMLINUX_SYMBOL() ... |
| 2988 | # all assignments may have only one of the following with an assignment: | 3032 | # all assignments may have only one of the following with an assignment: |
| 2989 | # . | 3033 | # . |
| @@ -3261,6 +3305,12 @@ sub process { | |||
| 3261 | "sizeof(& should be avoided\n" . $herecurr); | 3305 | "sizeof(& should be avoided\n" . $herecurr); |
| 3262 | } | 3306 | } |
| 3263 | 3307 | ||
| 3308 | # check for sizeof without parenthesis | ||
| 3309 | if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) { | ||
| 3310 | WARN("SIZEOF_PARENTHESIS", | ||
| 3311 | "sizeof $1 should be sizeof($1)\n" . $herecurr); | ||
| 3312 | } | ||
| 3313 | |||
| 3264 | # check for line continuations in quoted strings with odd counts of " | 3314 | # check for line continuations in quoted strings with odd counts of " |
| 3265 | if ($rawline =~ /\\$/ && $rawline =~ tr/"/"/ % 2) { | 3315 | if ($rawline =~ /\\$/ && $rawline =~ tr/"/"/ % 2) { |
| 3266 | WARN("LINE_CONTINUATIONS", | 3316 | WARN("LINE_CONTINUATIONS", |
| @@ -3309,6 +3359,22 @@ sub process { | |||
| 3309 | } | 3359 | } |
| 3310 | } | 3360 | } |
| 3311 | 3361 | ||
| 3362 | # check usleep_range arguments | ||
| 3363 | if ($^V && $^V ge 5.10.0 && | ||
| 3364 | defined $stat && | ||
| 3365 | $stat =~ /^\+(?:.*?)\busleep_range\s*\(\s*($FuncArg)\s*,\s*($FuncArg)\s*\)/) { | ||
| 3366 | my $min = $1; | ||
| 3367 | my $max = $7; | ||
| 3368 | if ($min eq $max) { | ||
| 3369 | WARN("USLEEP_RANGE", | ||
| 3370 | "usleep_range should not use min == max args; see Documentation/timers/timers-howto.txt\n" . "$here\n$stat\n"); | ||
| 3371 | } elsif ($min =~ /^\d+$/ && $max =~ /^\d+$/ && | ||
| 3372 | $min > $max) { | ||
| 3373 | WARN("USLEEP_RANGE", | ||
| 3374 | "usleep_range args reversed, use min then max; see Documentation/timers/timers-howto.txt\n" . "$here\n$stat\n"); | ||
| 3375 | } | ||
| 3376 | } | ||
| 3377 | |||
| 3312 | # check for new externs in .c files. | 3378 | # check for new externs in .c files. |
| 3313 | if ($realfile =~ /\.c$/ && defined $stat && | 3379 | if ($realfile =~ /\.c$/ && defined $stat && |
| 3314 | $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) | 3380 | $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) |
diff --git a/scripts/coccinelle/iterators/use_after_iter.cocci b/scripts/coccinelle/iterators/use_after_iter.cocci new file mode 100644 index 000000000000..06284c57a951 --- /dev/null +++ b/scripts/coccinelle/iterators/use_after_iter.cocci | |||
| @@ -0,0 +1,147 @@ | |||
| 1 | /// If list_for_each_entry, etc complete a traversal of the list, the iterator | ||
| 2 | /// variable ends up pointing to an address at an offset from the list head, | ||
| 3 | /// and not a meaningful structure. Thus this value should not be used after | ||
| 4 | /// the end of the iterator. | ||
| 5 | //#False positives arise when there is a goto in the iterator and the | ||
| 6 | //#reported reference is at the label of this goto. Some flag tests | ||
| 7 | //#may also cause a report to be a false positive. | ||
| 8 | /// | ||
| 9 | // Confidence: Moderate | ||
| 10 | // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. | ||
| 11 | // Copyright: (C) 2012 Gilles Muller, INRIA/LIP6. GPLv2. | ||
| 12 | // URL: http://coccinelle.lip6.fr/ | ||
| 13 | // Comments: | ||
| 14 | // Options: -no_includes -include_headers | ||
| 15 | |||
| 16 | virtual context | ||
| 17 | virtual org | ||
| 18 | virtual report | ||
| 19 | |||
| 20 | @r exists@ | ||
| 21 | identifier c,member; | ||
| 22 | expression E,x; | ||
| 23 | iterator name list_for_each_entry; | ||
| 24 | iterator name list_for_each_entry_reverse; | ||
| 25 | iterator name list_for_each_entry_continue; | ||
| 26 | iterator name list_for_each_entry_continue_reverse; | ||
| 27 | iterator name list_for_each_entry_from; | ||
| 28 | iterator name list_for_each_entry_safe; | ||
| 29 | iterator name list_for_each_entry_safe_continue; | ||
| 30 | iterator name list_for_each_entry_safe_from; | ||
| 31 | iterator name list_for_each_entry_safe_reverse; | ||
| 32 | iterator name hlist_for_each_entry; | ||
| 33 | iterator name hlist_for_each_entry_continue; | ||
| 34 | iterator name hlist_for_each_entry_from; | ||
| 35 | iterator name hlist_for_each_entry_safe; | ||
| 36 | statement S; | ||
| 37 | position p1,p2; | ||
| 38 | @@ | ||
| 39 | |||
| 40 | ( | ||
| 41 | list_for_each_entry@p1(c,...,member) { ... when != break; | ||
| 42 | when forall | ||
| 43 | when strict | ||
| 44 | } | ||
| 45 | | | ||
| 46 | list_for_each_entry_reverse@p1(c,...,member) { ... when != break; | ||
| 47 | when forall | ||
| 48 | when strict | ||
| 49 | } | ||
| 50 | | | ||
| 51 | list_for_each_entry_continue@p1(c,...,member) { ... when != break; | ||
| 52 | when forall | ||
| 53 | when strict | ||
| 54 | } | ||
| 55 | | | ||
| 56 | list_for_each_entry_continue_reverse@p1(c,...,member) { ... when != break; | ||
| 57 | when forall | ||
| 58 | when strict | ||
| 59 | } | ||
| 60 | | | ||
| 61 | list_for_each_entry_from@p1(c,...,member) { ... when != break; | ||
| 62 | when forall | ||
| 63 | when strict | ||
| 64 | } | ||
| 65 | | | ||
| 66 | list_for_each_entry_safe@p1(c,...,member) { ... when != break; | ||
| 67 | when forall | ||
| 68 | when strict | ||
| 69 | } | ||
| 70 | | | ||
| 71 | list_for_each_entry_safe_continue@p1(c,...,member) { ... when != break; | ||
| 72 | when forall | ||
| 73 | when strict | ||
| 74 | } | ||
| 75 | | | ||
| 76 | list_for_each_entry_safe_from@p1(c,...,member) { ... when != break; | ||
| 77 | when forall | ||
| 78 | when strict | ||
| 79 | } | ||
| 80 | | | ||
| 81 | list_for_each_entry_safe_reverse@p1(c,...,member) { ... when != break; | ||
| 82 | when forall | ||
| 83 | when strict | ||
| 84 | } | ||
| 85 | ) | ||
| 86 | ... | ||
| 87 | ( | ||
| 88 | list_for_each_entry(c,...) S | ||
| 89 | | | ||
| 90 | list_for_each_entry_reverse(c,...) S | ||
| 91 | | | ||
| 92 | list_for_each_entry_continue(c,...) S | ||
| 93 | | | ||
| 94 | list_for_each_entry_continue_reverse(c,...) S | ||
| 95 | | | ||
| 96 | list_for_each_entry_from(c,...) S | ||
| 97 | | | ||
| 98 | list_for_each_entry_safe(c,...) S | ||
| 99 | | | ||
| 100 | list_for_each_entry_safe(x,c,...) S | ||
| 101 | | | ||
| 102 | list_for_each_entry_safe_continue(c,...) S | ||
| 103 | | | ||
| 104 | list_for_each_entry_safe_continue(x,c,...) S | ||
| 105 | | | ||
| 106 | list_for_each_entry_safe_from(c,...) S | ||
| 107 | | | ||
| 108 | list_for_each_entry_safe_from(x,c,...) S | ||
| 109 | | | ||
| 110 | list_for_each_entry_safe_reverse(c,...) S | ||
| 111 | | | ||
| 112 | list_for_each_entry_safe_reverse(x,c,...) S | ||
| 113 | | | ||
| 114 | hlist_for_each_entry(c,...) S | ||
| 115 | | | ||
| 116 | hlist_for_each_entry_continue(c,...) S | ||
| 117 | | | ||
| 118 | hlist_for_each_entry_from(c,...) S | ||
| 119 | | | ||
| 120 | hlist_for_each_entry_safe(c,...) S | ||
| 121 | | | ||
| 122 | list_remove_head(x,c,...) | ||
| 123 | | | ||
| 124 | sizeof(<+...c...+>) | ||
| 125 | | | ||
| 126 | &c->member | ||
| 127 | | | ||
| 128 | c = E | ||
| 129 | | | ||
| 130 | *c@p2 | ||
| 131 | ) | ||
| 132 | |||
| 133 | @script:python depends on org@ | ||
| 134 | p1 << r.p1; | ||
| 135 | p2 << r.p2; | ||
| 136 | @@ | ||
| 137 | |||
| 138 | cocci.print_main("invalid iterator index reference",p2) | ||
| 139 | cocci.print_secs("iterator",p1) | ||
| 140 | |||
| 141 | @script:python depends on report@ | ||
| 142 | p1 << r.p1; | ||
| 143 | p2 << r.p2; | ||
| 144 | @@ | ||
| 145 | |||
| 146 | msg = "ERROR: invalid reference to the index variable of the iterator on line %s" % (p1[0].line) | ||
| 147 | coccilib.report.print_report(p2[0], msg) | ||
diff --git a/scripts/coccinelle/misc/irqf_oneshot.cocci b/scripts/coccinelle/misc/irqf_oneshot.cocci new file mode 100644 index 000000000000..6cfde94be0ef --- /dev/null +++ b/scripts/coccinelle/misc/irqf_oneshot.cocci | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | /// Make sure threaded IRQs without a primary handler are always request with | ||
| 2 | /// IRQF_ONESHOT | ||
| 3 | /// | ||
| 4 | // | ||
| 5 | // Confidence: Good | ||
| 6 | // Comments: | ||
| 7 | // Options: --no-includes | ||
| 8 | |||
| 9 | virtual patch | ||
| 10 | virtual context | ||
| 11 | virtual org | ||
| 12 | virtual report | ||
| 13 | |||
| 14 | @r1@ | ||
| 15 | expression irq; | ||
| 16 | expression thread_fn; | ||
| 17 | expression flags; | ||
| 18 | position p; | ||
| 19 | @@ | ||
| 20 | request_threaded_irq@p(irq, NULL, thread_fn, | ||
| 21 | ( | ||
| 22 | flags | IRQF_ONESHOT | ||
| 23 | | | ||
| 24 | IRQF_ONESHOT | ||
| 25 | ) | ||
| 26 | , ...) | ||
| 27 | |||
| 28 | @depends on patch@ | ||
| 29 | expression irq; | ||
| 30 | expression thread_fn; | ||
| 31 | expression flags; | ||
| 32 | position p != r1.p; | ||
| 33 | @@ | ||
| 34 | request_threaded_irq@p(irq, NULL, thread_fn, | ||
| 35 | ( | ||
| 36 | -0 | ||
| 37 | +IRQF_ONESHOT | ||
| 38 | | | ||
| 39 | -flags | ||
| 40 | +flags | IRQF_ONESHOT | ||
| 41 | ) | ||
| 42 | , ...) | ||
| 43 | |||
| 44 | @depends on context@ | ||
| 45 | position p != r1.p; | ||
| 46 | @@ | ||
| 47 | *request_threaded_irq@p(...) | ||
| 48 | |||
| 49 | @match depends on report || org@ | ||
| 50 | expression irq; | ||
| 51 | position p != r1.p; | ||
| 52 | @@ | ||
| 53 | request_threaded_irq@p(irq, NULL, ...) | ||
| 54 | |||
| 55 | @script:python depends on org@ | ||
| 56 | p << match.p; | ||
| 57 | @@ | ||
| 58 | msg = "ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT" | ||
| 59 | coccilib.org.print_todo(p[0],msg) | ||
| 60 | |||
| 61 | @script:python depends on report@ | ||
| 62 | p << match.p; | ||
| 63 | @@ | ||
| 64 | msg = "ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT" | ||
| 65 | coccilib.report.print_report(p[0],msg) | ||
diff --git a/scripts/config b/scripts/config index ed6653ef9702..ee355394f4ef 100755 --- a/scripts/config +++ b/scripts/config | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | # Manipulate options in a .config file from the command line | 2 | # Manipulate options in a .config file from the command line |
| 3 | 3 | ||
| 4 | # If no prefix forced, use the default CONFIG_ | ||
| 5 | CONFIG_="${CONFIG_-CONFIG_}" | ||
| 6 | |||
| 4 | usage() { | 7 | usage() { |
| 5 | cat >&2 <<EOL | 8 | cat >&2 <<EOL |
| 6 | Manipulate options in a .config file from the command line. | 9 | Manipulate options in a .config file from the command line. |
| @@ -14,6 +17,7 @@ commands: | |||
| 14 | Set option to "string" | 17 | Set option to "string" |
| 15 | --set-val option value | 18 | --set-val option value |
| 16 | Set option to value | 19 | Set option to value |
| 20 | --undefine|-u option Undefine option | ||
| 17 | --state|-s option Print state of option (n,y,m,undef) | 21 | --state|-s option Print state of option (n,y,m,undef) |
| 18 | 22 | ||
| 19 | --enable-after|-E beforeopt option | 23 | --enable-after|-E beforeopt option |
| @@ -26,10 +30,17 @@ commands: | |||
| 26 | commands can be repeated multiple times | 30 | commands can be repeated multiple times |
| 27 | 31 | ||
| 28 | options: | 32 | options: |
| 29 | --file .config file to change (default .config) | 33 | --file config-file .config file to change (default .config) |
| 34 | --keep-case|-k Keep next symbols' case (dont' upper-case it) | ||
| 30 | 35 | ||
| 31 | config doesn't check the validity of the .config file. This is done at next | 36 | config doesn't check the validity of the .config file. This is done at next |
| 32 | make time. | 37 | make time. |
| 38 | |||
| 39 | By default, config will upper-case the given symbol. Use --keep-case to keep | ||
| 40 | the case of all following symbols unchanged. | ||
| 41 | |||
| 42 | config uses 'CONFIG_' as the default symbol prefix. Set the environment | ||
| 43 | variable CONFIG_ to the prefix to use. Eg.: CONFIG_="FOO_" config ... | ||
| 33 | EOL | 44 | EOL |
| 34 | exit 1 | 45 | exit 1 |
| 35 | } | 46 | } |
| @@ -40,11 +51,13 @@ checkarg() { | |||
| 40 | usage | 51 | usage |
| 41 | fi | 52 | fi |
| 42 | case "$ARG" in | 53 | case "$ARG" in |
| 43 | CONFIG_*) | 54 | ${CONFIG_}*) |
| 44 | ARG="${ARG/CONFIG_/}" | 55 | ARG="${ARG/${CONFIG_}/}" |
| 45 | ;; | 56 | ;; |
| 46 | esac | 57 | esac |
| 47 | ARG="`echo $ARG | tr a-z A-Z`" | 58 | if [ "$MUNGE_CASE" = "yes" ] ; then |
| 59 | ARG="`echo $ARG | tr a-z A-Z`" | ||
| 60 | fi | ||
| 48 | } | 61 | } |
| 49 | 62 | ||
| 50 | set_var() { | 63 | set_var() { |
| @@ -61,6 +74,12 @@ set_var() { | |||
| 61 | fi | 74 | fi |
| 62 | } | 75 | } |
| 63 | 76 | ||
| 77 | undef_var() { | ||
| 78 | local name=$1 | ||
| 79 | |||
| 80 | sed -ri "/^($name=|# $name is not set)/d" "$FN" | ||
| 81 | } | ||
| 82 | |||
| 64 | if [ "$1" = "--file" ]; then | 83 | if [ "$1" = "--file" ]; then |
| 65 | FN="$2" | 84 | FN="$2" |
| 66 | if [ "$FN" = "" ] ; then | 85 | if [ "$FN" = "" ] ; then |
| @@ -75,10 +94,16 @@ if [ "$1" = "" ] ; then | |||
| 75 | usage | 94 | usage |
| 76 | fi | 95 | fi |
| 77 | 96 | ||
| 97 | MUNGE_CASE=yes | ||
| 78 | while [ "$1" != "" ] ; do | 98 | while [ "$1" != "" ] ; do |
| 79 | CMD="$1" | 99 | CMD="$1" |
| 80 | shift | 100 | shift |
| 81 | case "$CMD" in | 101 | case "$CMD" in |
| 102 | --keep-case|-k) | ||
| 103 | MUNGE_CASE=no | ||
| 104 | shift | ||
| 105 | continue | ||
| 106 | ;; | ||
| 82 | --refresh) | 107 | --refresh) |
| 83 | ;; | 108 | ;; |
| 84 | --*-after) | 109 | --*-after) |
| @@ -95,55 +120,58 @@ while [ "$1" != "" ] ; do | |||
| 95 | esac | 120 | esac |
| 96 | case "$CMD" in | 121 | case "$CMD" in |
| 97 | --enable|-e) | 122 | --enable|-e) |
| 98 | set_var "CONFIG_$ARG" "CONFIG_$ARG=y" | 123 | set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=y" |
| 99 | ;; | 124 | ;; |
| 100 | 125 | ||
| 101 | --disable|-d) | 126 | --disable|-d) |
| 102 | set_var "CONFIG_$ARG" "# CONFIG_$ARG is not set" | 127 | set_var "${CONFIG_}$ARG" "# ${CONFIG_}$ARG is not set" |
| 103 | ;; | 128 | ;; |
| 104 | 129 | ||
| 105 | --module|-m) | 130 | --module|-m) |
| 106 | set_var "CONFIG_$ARG" "CONFIG_$ARG=m" | 131 | set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=m" |
| 107 | ;; | 132 | ;; |
| 108 | 133 | ||
| 109 | --set-str) | 134 | --set-str) |
| 110 | # sed swallows one level of escaping, so we need double-escaping | 135 | # sed swallows one level of escaping, so we need double-escaping |
| 111 | set_var "CONFIG_$ARG" "CONFIG_$ARG=\"${1//\"/\\\\\"}\"" | 136 | set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=\"${1//\"/\\\\\"}\"" |
| 112 | shift | 137 | shift |
| 113 | ;; | 138 | ;; |
| 114 | 139 | ||
| 115 | --set-val) | 140 | --set-val) |
| 116 | set_var "CONFIG_$ARG" "CONFIG_$ARG=$1" | 141 | set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=$1" |
| 117 | shift | 142 | shift |
| 118 | ;; | 143 | ;; |
| 144 | --undefine|-u) | ||
| 145 | undef_var "${CONFIG_}$ARG" | ||
| 146 | ;; | ||
| 119 | 147 | ||
| 120 | --state|-s) | 148 | --state|-s) |
| 121 | if grep -q "# CONFIG_$ARG is not set" $FN ; then | 149 | if grep -q "# ${CONFIG_}$ARG is not set" $FN ; then |
| 122 | echo n | 150 | echo n |
| 123 | else | 151 | else |
| 124 | V="$(grep "^CONFIG_$ARG=" $FN)" | 152 | V="$(grep "^${CONFIG_}$ARG=" $FN)" |
| 125 | if [ $? != 0 ] ; then | 153 | if [ $? != 0 ] ; then |
| 126 | echo undef | 154 | echo undef |
| 127 | else | 155 | else |
| 128 | V="${V/#CONFIG_$ARG=/}" | 156 | V="${V/#${CONFIG_}$ARG=/}" |
| 129 | V="${V/#\"/}" | 157 | V="${V/#\"/}" |
| 130 | V="${V/%\"/}" | 158 | V="${V/%\"/}" |
| 131 | V="${V/\\\"/\"}" | 159 | V="${V//\\\"/\"}" |
| 132 | echo "${V}" | 160 | echo "${V}" |
| 133 | fi | 161 | fi |
| 134 | fi | 162 | fi |
| 135 | ;; | 163 | ;; |
| 136 | 164 | ||
| 137 | --enable-after|-E) | 165 | --enable-after|-E) |
| 138 | set_var "CONFIG_$B" "CONFIG_$B=y" "CONFIG_$A" | 166 | set_var "${CONFIG_}$B" "${CONFIG_}$B=y" "${CONFIG_}$A" |
| 139 | ;; | 167 | ;; |
| 140 | 168 | ||
| 141 | --disable-after|-D) | 169 | --disable-after|-D) |
| 142 | set_var "CONFIG_$B" "# CONFIG_$B is not set" "CONFIG_$A" | 170 | set_var "${CONFIG_}$B" "# ${CONFIG_}$B is not set" "${CONFIG_}$A" |
| 143 | ;; | 171 | ;; |
| 144 | 172 | ||
| 145 | --module-after|-M) | 173 | --module-after|-M) |
| 146 | set_var "CONFIG_$B" "CONFIG_$B=m" "CONFIG_$A" | 174 | set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A" |
| 147 | ;; | 175 | ;; |
| 148 | 176 | ||
| 149 | # undocumented because it ignores --file (fixme) | 177 | # undocumented because it ignores --file (fixme) |
diff --git a/scripts/decodecode b/scripts/decodecode index 18ba881c3415..4f8248d5a11f 100755 --- a/scripts/decodecode +++ b/scripts/decodecode | |||
| @@ -89,7 +89,7 @@ echo $code >> $T.s | |||
| 89 | disas $T | 89 | disas $T |
| 90 | cat $T.dis >> $T.aa | 90 | cat $T.dis >> $T.aa |
| 91 | 91 | ||
| 92 | faultline=`cat $T.dis | head -1 | cut -d":" -f2` | 92 | faultline=`cat $T.dis | head -1 | cut -d":" -f2-` |
| 93 | faultline=`echo "$faultline" | sed -e 's/\[/\\\[/g; s/\]/\\\]/g'` | 93 | faultline=`echo "$faultline" | sed -e 's/\[/\\\[/g; s/\]/\\\]/g'` |
| 94 | 94 | ||
| 95 | cat $T.oo | sed -e "s/\($faultline\)/\*\1 <-- trapping instruction/g" | 95 | cat $T.oo | sed -e "s/\($faultline\)/\*\1 <-- trapping instruction/g" |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 0948c6b5a321..8b673dd4627f 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
| @@ -83,6 +83,8 @@ push(@signature_tags, "Signed-off-by:"); | |||
| 83 | push(@signature_tags, "Reviewed-by:"); | 83 | push(@signature_tags, "Reviewed-by:"); |
| 84 | push(@signature_tags, "Acked-by:"); | 84 | push(@signature_tags, "Acked-by:"); |
| 85 | 85 | ||
| 86 | my $signature_pattern = "\(" . join("|", @signature_tags) . "\)"; | ||
| 87 | |||
| 86 | # rfc822 email address - preloaded methods go here. | 88 | # rfc822 email address - preloaded methods go here. |
| 87 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; | 89 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; |
| 88 | my $rfc822_char = '[\\000-\\377]'; | 90 | my $rfc822_char = '[\\000-\\377]'; |
| @@ -473,7 +475,6 @@ my @subsystem = (); | |||
| 473 | my @status = (); | 475 | my @status = (); |
| 474 | my %deduplicate_name_hash = (); | 476 | my %deduplicate_name_hash = (); |
| 475 | my %deduplicate_address_hash = (); | 477 | my %deduplicate_address_hash = (); |
| 476 | my $signature_pattern; | ||
| 477 | 478 | ||
| 478 | my @maintainers = get_maintainers(); | 479 | my @maintainers = get_maintainers(); |
| 479 | 480 | ||
diff --git a/scripts/gfp-translate b/scripts/gfp-translate index c9230e158a8f..c9230e158a8f 100644..100755 --- a/scripts/gfp-translate +++ b/scripts/gfp-translate | |||
diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore index ee120d441565..be603c4fef62 100644 --- a/scripts/kconfig/.gitignore +++ b/scripts/kconfig/.gitignore | |||
| @@ -7,7 +7,6 @@ config* | |||
| 7 | *.tab.h | 7 | *.tab.h |
| 8 | zconf.hash.c | 8 | zconf.hash.c |
| 9 | *.moc | 9 | *.moc |
| 10 | lkc_defs.h | ||
| 11 | gconf.glade.h | 10 | gconf.glade.h |
| 12 | *.pot | 11 | *.pot |
| 13 | *.mo | 12 | *.mo |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 79662658fb91..77d53999ffb9 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -114,7 +114,7 @@ help: | |||
| 114 | @echo ' alldefconfig - New config with all symbols set to default' | 114 | @echo ' alldefconfig - New config with all symbols set to default' |
| 115 | @echo ' randconfig - New config with random answer to all options' | 115 | @echo ' randconfig - New config with random answer to all options' |
| 116 | @echo ' listnewconfig - List new options' | 116 | @echo ' listnewconfig - List new options' |
| 117 | @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)' | 117 | @echo ' oldnoconfig - Same as silentoldconfig but sets new symbols to their default value' |
| 118 | 118 | ||
| 119 | # lxdialog stuff | 119 | # lxdialog stuff |
| 120 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh | 120 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh |
| @@ -234,12 +234,12 @@ $(obj)/.tmp_qtcheck: | |||
| 234 | if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ | 234 | if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ |
| 235 | done; \ | 235 | done; \ |
| 236 | if [ -z "$$dir" ]; then \ | 236 | if [ -z "$$dir" ]; then \ |
| 237 | echo "*"; \ | 237 | echo >&2 "*"; \ |
| 238 | echo "* Unable to find any QT installation. Please make sure that"; \ | 238 | echo >&2 "* Unable to find any QT installation. Please make sure that"; \ |
| 239 | echo "* the QT4 or QT3 development package is correctly installed and"; \ | 239 | echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \ |
| 240 | echo "* either qmake can be found or install pkg-config or set"; \ | 240 | echo >&2 "* either qmake can be found or install pkg-config or set"; \ |
| 241 | echo "* the QTDIR environment variable to the correct location."; \ | 241 | echo >&2 "* the QTDIR environment variable to the correct location."; \ |
| 242 | echo "*"; \ | 242 | echo >&2 "*"; \ |
| 243 | false; \ | 243 | false; \ |
| 244 | fi; \ | 244 | fi; \ |
| 245 | libpath=$$dir/lib; lib=qt; osdir=""; \ | 245 | libpath=$$dir/lib; lib=qt; osdir=""; \ |
| @@ -260,8 +260,8 @@ $(obj)/.tmp_qtcheck: | |||
| 260 | else \ | 260 | else \ |
| 261 | cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ | 261 | cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ |
| 262 | libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ | 262 | libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ |
| 263 | binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \ | 263 | moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \ |
| 264 | moc="$$binpath/bin/moc"; \ | 264 | [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \ |
| 265 | fi; \ | 265 | fi; \ |
| 266 | echo "KC_QT_CFLAGS=$$cflags" > $@; \ | 266 | echo "KC_QT_CFLAGS=$$cflags" > $@; \ |
| 267 | echo "KC_QT_LIBS=$$libs" >> $@; \ | 267 | echo "KC_QT_LIBS=$$libs" >> $@; \ |
| @@ -279,17 +279,17 @@ $(obj)/.tmp_gtkcheck: | |||
| 279 | if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ | 279 | if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ |
| 280 | touch $@; \ | 280 | touch $@; \ |
| 281 | else \ | 281 | else \ |
| 282 | echo "*"; \ | 282 | echo >&2 "*"; \ |
| 283 | echo "* GTK+ is present but version >= 2.0.0 is required."; \ | 283 | echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \ |
| 284 | echo "*"; \ | 284 | echo >&2 "*"; \ |
| 285 | false; \ | 285 | false; \ |
| 286 | fi \ | 286 | fi \ |
| 287 | else \ | 287 | else \ |
| 288 | echo "*"; \ | 288 | echo >&2 "*"; \ |
| 289 | echo "* Unable to find the GTK+ installation. Please make sure that"; \ | 289 | echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \ |
| 290 | echo "* the GTK+ 2.0 development package is correctly installed..."; \ | 290 | echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \ |
| 291 | echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ | 291 | echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ |
| 292 | echo "*"; \ | 292 | echo >&2 "*"; \ |
| 293 | false; \ | 293 | false; \ |
| 294 | fi | 294 | fi |
| 295 | endif | 295 | endif |
| @@ -298,8 +298,11 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c | |||
| 298 | 298 | ||
| 299 | $(obj)/qconf.o: $(obj)/qconf.moc | 299 | $(obj)/qconf.o: $(obj)/qconf.moc |
| 300 | 300 | ||
| 301 | $(obj)/%.moc: $(src)/%.h | 301 | quiet_cmd_moc = MOC $@ |
| 302 | $(KC_QT_MOC) -i $< -o $@ | 302 | cmd_moc = $(KC_QT_MOC) -i $< -o $@ |
| 303 | |||
| 304 | $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck | ||
| 305 | $(call cmd,moc) | ||
| 303 | 306 | ||
| 304 | # Extract gconf menu items for I18N support | 307 | # Extract gconf menu items for I18N support |
| 305 | $(obj)/gconf.glade.h: $(obj)/gconf.glade | 308 | $(obj)/gconf.glade.h: $(obj)/gconf.glade |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 52577f052bc1..13ddf1126c2a 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
| @@ -182,10 +182,66 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) | |||
| 182 | return 0; | 182 | return 0; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | #define LINE_GROWTH 16 | ||
| 186 | static int add_byte(int c, char **lineptr, size_t slen, size_t *n) | ||
| 187 | { | ||
| 188 | char *nline; | ||
| 189 | size_t new_size = slen + 1; | ||
| 190 | if (new_size > *n) { | ||
| 191 | new_size += LINE_GROWTH - 1; | ||
| 192 | new_size *= 2; | ||
| 193 | nline = realloc(*lineptr, new_size); | ||
| 194 | if (!nline) | ||
| 195 | return -1; | ||
| 196 | |||
| 197 | *lineptr = nline; | ||
| 198 | *n = new_size; | ||
| 199 | } | ||
| 200 | |||
| 201 | (*lineptr)[slen] = c; | ||
| 202 | |||
| 203 | return 0; | ||
| 204 | } | ||
| 205 | |||
| 206 | static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream) | ||
| 207 | { | ||
| 208 | char *line = *lineptr; | ||
| 209 | size_t slen = 0; | ||
| 210 | |||
| 211 | for (;;) { | ||
| 212 | int c = getc(stream); | ||
| 213 | |||
| 214 | switch (c) { | ||
| 215 | case '\n': | ||
| 216 | if (add_byte(c, &line, slen, n) < 0) | ||
| 217 | goto e_out; | ||
| 218 | slen++; | ||
| 219 | /* fall through */ | ||
| 220 | case EOF: | ||
| 221 | if (add_byte('\0', &line, slen, n) < 0) | ||
| 222 | goto e_out; | ||
| 223 | *lineptr = line; | ||
| 224 | if (slen == 0) | ||
| 225 | return -1; | ||
| 226 | return slen; | ||
| 227 | default: | ||
| 228 | if (add_byte(c, &line, slen, n) < 0) | ||
| 229 | goto e_out; | ||
| 230 | slen++; | ||
| 231 | } | ||
| 232 | } | ||
| 233 | |||
| 234 | e_out: | ||
| 235 | line[slen-1] = '\0'; | ||
| 236 | *lineptr = line; | ||
| 237 | return -1; | ||
| 238 | } | ||
| 239 | |||
| 185 | int conf_read_simple(const char *name, int def) | 240 | int conf_read_simple(const char *name, int def) |
| 186 | { | 241 | { |
| 187 | FILE *in = NULL; | 242 | FILE *in = NULL; |
| 188 | char line[1024]; | 243 | char *line = NULL; |
| 244 | size_t line_asize = 0; | ||
| 189 | char *p, *p2; | 245 | char *p, *p2; |
| 190 | struct symbol *sym; | 246 | struct symbol *sym; |
| 191 | int i, def_flags; | 247 | int i, def_flags; |
| @@ -247,7 +303,7 @@ load: | |||
| 247 | } | 303 | } |
| 248 | } | 304 | } |
| 249 | 305 | ||
| 250 | while (fgets(line, sizeof(line), in)) { | 306 | while (compat_getline(&line, &line_asize, in) != -1) { |
| 251 | conf_lineno++; | 307 | conf_lineno++; |
| 252 | sym = NULL; | 308 | sym = NULL; |
| 253 | if (line[0] == '#') { | 309 | if (line[0] == '#') { |
| @@ -335,6 +391,7 @@ setsym: | |||
| 335 | cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); | 391 | cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); |
| 336 | } | 392 | } |
| 337 | } | 393 | } |
| 394 | free(line); | ||
| 338 | fclose(in); | 395 | fclose(in); |
| 339 | 396 | ||
| 340 | if (modules_sym) | 397 | if (modules_sym) |
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh index 82cc3a85e7f8..e3b12c010417 100644 --- a/scripts/kconfig/lxdialog/check-lxdialog.sh +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | # What library to link | 4 | # What library to link |
| 5 | ldflags() | 5 | ldflags() |
| 6 | { | 6 | { |
| 7 | for ext in so a dylib ; do | 7 | for ext in so a dll.a dylib ; do |
| 8 | for lib in ncursesw ncurses curses ; do | 8 | for lib in ncursesw ncurses curses ; do |
| 9 | $cc -print-file-name=lib${lib}.${ext} | grep -q / | 9 | $cc -print-file-name=lib${lib}.${ext} | grep -q / |
| 10 | if [ $? -eq 0 ]; then | 10 | if [ $? -eq 0 ]; then |
| @@ -19,12 +19,12 @@ ldflags() | |||
| 19 | # Where is ncurses.h? | 19 | # Where is ncurses.h? |
| 20 | ccflags() | 20 | ccflags() |
| 21 | { | 21 | { |
| 22 | if [ -f /usr/include/ncurses/ncurses.h ]; then | 22 | if [ -f /usr/include/ncursesw/curses.h ]; then |
| 23 | echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' | ||
| 24 | elif [ -f /usr/include/ncurses/ncurses.h ]; then | ||
| 23 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' | 25 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' |
| 24 | elif [ -f /usr/include/ncurses/curses.h ]; then | 26 | elif [ -f /usr/include/ncurses/curses.h ]; then |
| 25 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' | 27 | echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' |
| 26 | elif [ -f /usr/include/ncursesw/curses.h ]; then | ||
| 27 | echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' | ||
| 28 | elif [ -f /usr/include/ncurses.h ]; then | 28 | elif [ -f /usr/include/ncurses.h ]; then |
| 29 | echo '-DCURSES_LOC="<ncurses.h>"' | 29 | echo '-DCURSES_LOC="<ncurses.h>"' |
| 30 | else | 30 | else |
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c index 154c2dd245b7..4e5de60a0c0d 100644 --- a/scripts/kconfig/lxdialog/textbox.c +++ b/scripts/kconfig/lxdialog/textbox.c | |||
| @@ -129,6 +129,7 @@ do_resize: | |||
| 129 | case 'e': | 129 | case 'e': |
| 130 | case 'X': | 130 | case 'X': |
| 131 | case 'x': | 131 | case 'x': |
| 132 | case 'q': | ||
| 132 | delwin(box); | 133 | delwin(box); |
| 133 | delwin(dialog); | 134 | delwin(dialog); |
| 134 | return 0; | 135 | return 0; |
| @@ -190,6 +191,7 @@ do_resize: | |||
| 190 | break; | 191 | break; |
| 191 | case 'B': /* Previous page */ | 192 | case 'B': /* Previous page */ |
| 192 | case 'b': | 193 | case 'b': |
| 194 | case 'u': | ||
| 193 | case KEY_PPAGE: | 195 | case KEY_PPAGE: |
| 194 | if (begin_reached) | 196 | if (begin_reached) |
| 195 | break; | 197 | break; |
| @@ -214,6 +216,7 @@ do_resize: | |||
| 214 | break; | 216 | break; |
| 215 | case KEY_NPAGE: /* Next page */ | 217 | case KEY_NPAGE: /* Next page */ |
| 216 | case ' ': | 218 | case ' ': |
| 219 | case 'd': | ||
| 217 | if (end_reached) | 220 | if (end_reached) |
| 218 | break; | 221 | break; |
| 219 | 222 | ||
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index f606738d421d..f584a281bb4c 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
| @@ -105,10 +105,10 @@ static const char mconf_readme[] = N_( | |||
| 105 | "Text Box (Help Window)\n" | 105 | "Text Box (Help Window)\n" |
| 106 | "--------\n" | 106 | "--------\n" |
| 107 | "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" | 107 | "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" |
| 108 | " keys h,j,k,l function here as do <SPACE BAR> and <B> for those\n" | 108 | " keys h,j,k,l function here as do <u>, <d>, <SPACE BAR> and <B> for \n" |
| 109 | " who are familiar with less and lynx.\n" | 109 | " those who are familiar with less and lynx.\n" |
| 110 | "\n" | 110 | "\n" |
| 111 | "o Press <E>, <X>, <Enter> or <Esc><Esc> to exit.\n" | 111 | "o Press <E>, <X>, <q>, <Enter> or <Esc><Esc> to exit.\n" |
| 112 | "\n" | 112 | "\n" |
| 113 | "\n" | 113 | "\n" |
| 114 | "Alternate Configuration Files\n" | 114 | "Alternate Configuration Files\n" |
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index 8c0eb65978c9..1704a8562a5d 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c | |||
| @@ -83,10 +83,10 @@ static const char nconf_readme[] = N_( | |||
| 83 | "Text Box (Help Window)\n" | 83 | "Text Box (Help Window)\n" |
| 84 | "--------\n" | 84 | "--------\n" |
| 85 | "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" | 85 | "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" |
| 86 | " keys h,j,k,l function here as do <SPACE BAR> for those\n" | 86 | " keys h,j,k,l function here as do <u>, <d> and <SPACE BAR> for\n" |
| 87 | " who are familiar with less and lynx.\n" | 87 | " those who are familiar with less and lynx.\n" |
| 88 | "\n" | 88 | "\n" |
| 89 | "o Press <Enter>, <F1>, <F5>, <F7> or <Esc> to exit.\n" | 89 | "o Press <Enter>, <F1>, <F5>, <F9>, <q> or <Esc> to exit.\n" |
| 90 | "\n" | 90 | "\n" |
| 91 | "\n" | 91 | "\n" |
| 92 | "Alternate Configuration Files\n" | 92 | "Alternate Configuration Files\n" |
| @@ -1503,7 +1503,11 @@ int main(int ac, char **av) | |||
| 1503 | } | 1503 | } |
| 1504 | 1504 | ||
| 1505 | notimeout(stdscr, FALSE); | 1505 | notimeout(stdscr, FALSE); |
| 1506 | #if NCURSES_REENTRANT | ||
| 1507 | set_escdelay(1); | ||
| 1508 | #else | ||
| 1506 | ESCDELAY = 1; | 1509 | ESCDELAY = 1; |
| 1510 | #endif | ||
| 1507 | 1511 | ||
| 1508 | /* set btns menu */ | 1512 | /* set btns menu */ |
| 1509 | curses_menu = new_menu(curses_menu_items); | 1513 | curses_menu = new_menu(curses_menu_items); |
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 3b18dd839668..379003c7a2b4 100644 --- a/scripts/kconfig/nconf.gui.c +++ b/scripts/kconfig/nconf.gui.c | |||
| @@ -604,9 +604,11 @@ void show_scroll_win(WINDOW *main_window, | |||
| 604 | switch (res) { | 604 | switch (res) { |
| 605 | case KEY_NPAGE: | 605 | case KEY_NPAGE: |
| 606 | case ' ': | 606 | case ' ': |
| 607 | case 'd': | ||
| 607 | start_y += text_lines-2; | 608 | start_y += text_lines-2; |
| 608 | break; | 609 | break; |
| 609 | case KEY_PPAGE: | 610 | case KEY_PPAGE: |
| 611 | case 'u': | ||
| 610 | start_y -= text_lines+2; | 612 | start_y -= text_lines+2; |
| 611 | break; | 613 | break; |
| 612 | case KEY_HOME: | 614 | case KEY_HOME: |
| @@ -632,10 +634,10 @@ void show_scroll_win(WINDOW *main_window, | |||
| 632 | start_x++; | 634 | start_x++; |
| 633 | break; | 635 | break; |
| 634 | } | 636 | } |
| 635 | if (res == 10 || res == 27 || res == 'q' | 637 | if (res == 10 || res == 27 || res == 'q' || |
| 636 | || res == KEY_F(F_BACK) || res == KEY_F(F_EXIT)) { | 638 | res == KEY_F(F_HELP) || res == KEY_F(F_BACK) || |
| 639 | res == KEY_F(F_EXIT)) | ||
| 637 | break; | 640 | break; |
| 638 | } | ||
| 639 | if (start_y < 0) | 641 | if (start_y < 0) |
| 640 | start_y = 0; | 642 | start_y = 0; |
| 641 | if (start_y >= total_lines-text_lines) | 643 | if (start_y >= total_lines-text_lines) |
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index bccf07ddd0b6..2fbbbc1ddea0 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl | |||
| @@ -45,6 +45,16 @@ | |||
| 45 | use strict; | 45 | use strict; |
| 46 | use Getopt::Long; | 46 | use Getopt::Long; |
| 47 | 47 | ||
| 48 | # set the environment variable LOCALMODCONFIG_DEBUG to get | ||
| 49 | # debug output. | ||
| 50 | my $debugprint = 0; | ||
| 51 | $debugprint = 1 if (defined($ENV{LOCALMODCONFIG_DEBUG})); | ||
| 52 | |||
| 53 | sub dprint { | ||
| 54 | return if (!$debugprint); | ||
| 55 | print STDERR @_; | ||
| 56 | } | ||
| 57 | |||
| 48 | my $config = ".config"; | 58 | my $config = ".config"; |
| 49 | 59 | ||
| 50 | my $uname = `uname -r`; | 60 | my $uname = `uname -r`; |
| @@ -113,6 +123,10 @@ sub find_config { | |||
| 113 | 123 | ||
| 114 | find_config; | 124 | find_config; |
| 115 | 125 | ||
| 126 | # Read in the entire config file into config_file | ||
| 127 | my @config_file = <CIN>; | ||
| 128 | close CIN; | ||
| 129 | |||
| 116 | # Parse options | 130 | # Parse options |
| 117 | my $localmodconfig = 0; | 131 | my $localmodconfig = 0; |
| 118 | my $localyesconfig = 0; | 132 | my $localyesconfig = 0; |
| @@ -186,6 +200,7 @@ sub read_kconfig { | |||
| 186 | $state = "NEW"; | 200 | $state = "NEW"; |
| 187 | $config = $2; | 201 | $config = $2; |
| 188 | 202 | ||
| 203 | # Add depends for 'if' nesting | ||
| 189 | for (my $i = 0; $i < $iflevel; $i++) { | 204 | for (my $i = 0; $i < $iflevel; $i++) { |
| 190 | if ($i) { | 205 | if ($i) { |
| 191 | $depends{$config} .= " " . $ifdeps[$i]; | 206 | $depends{$config} .= " " . $ifdeps[$i]; |
| @@ -204,10 +219,11 @@ sub read_kconfig { | |||
| 204 | 219 | ||
| 205 | # Get the configs that select this config | 220 | # Get the configs that select this config |
| 206 | } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) { | 221 | } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) { |
| 207 | if (defined($selects{$1})) { | 222 | my $conf = $1; |
| 208 | $selects{$1} .= " " . $config; | 223 | if (defined($selects{$conf})) { |
| 224 | $selects{$conf} .= " " . $config; | ||
| 209 | } else { | 225 | } else { |
| 210 | $selects{$1} = $config; | 226 | $selects{$conf} = $config; |
| 211 | } | 227 | } |
| 212 | 228 | ||
| 213 | # configs without prompts must be selected | 229 | # configs without prompts must be selected |
| @@ -250,6 +266,7 @@ if ($kconfig) { | |||
| 250 | read_kconfig($kconfig); | 266 | read_kconfig($kconfig); |
| 251 | } | 267 | } |
| 252 | 268 | ||
| 269 | # Makefiles can use variables to define their dependencies | ||
| 253 | sub convert_vars { | 270 | sub convert_vars { |
| 254 | my ($line, %vars) = @_; | 271 | my ($line, %vars) = @_; |
| 255 | 272 | ||
| @@ -293,6 +310,7 @@ foreach my $makefile (@makefiles) { | |||
| 293 | 310 | ||
| 294 | my $objs; | 311 | my $objs; |
| 295 | 312 | ||
| 313 | # Convert variables in a line (could define configs) | ||
| 296 | $_ = convert_vars($_, %make_vars); | 314 | $_ = convert_vars($_, %make_vars); |
| 297 | 315 | ||
| 298 | # collect objects after obj-$(CONFIG_FOO_BAR) | 316 | # collect objects after obj-$(CONFIG_FOO_BAR) |
| @@ -373,13 +391,15 @@ while (<LIN>) { | |||
| 373 | close (LIN); | 391 | close (LIN); |
| 374 | 392 | ||
| 375 | # add to the configs hash all configs that are needed to enable | 393 | # add to the configs hash all configs that are needed to enable |
| 376 | # a loaded module. | 394 | # a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o |
| 395 | # where we know we need bar.o so we add FOO to the list. | ||
| 377 | my %configs; | 396 | my %configs; |
| 378 | foreach my $module (keys(%modules)) { | 397 | foreach my $module (keys(%modules)) { |
| 379 | if (defined($objects{$module})) { | 398 | if (defined($objects{$module})) { |
| 380 | my @arr = @{$objects{$module}}; | 399 | my @arr = @{$objects{$module}}; |
| 381 | foreach my $conf (@arr) { | 400 | foreach my $conf (@arr) { |
| 382 | $configs{$conf} = $module; | 401 | $configs{$conf} = $module; |
| 402 | dprint "$conf added by direct ($module)\n"; | ||
| 383 | } | 403 | } |
| 384 | } else { | 404 | } else { |
| 385 | # Most likely, someone has a custom (binary?) module loaded. | 405 | # Most likely, someone has a custom (binary?) module loaded. |
| @@ -387,9 +407,24 @@ foreach my $module (keys(%modules)) { | |||
| 387 | } | 407 | } |
| 388 | } | 408 | } |
| 389 | 409 | ||
| 410 | # Read the current config, and see what is enabled. We want to | ||
| 411 | # ignore configs that we would not enable anyway. | ||
| 412 | |||
| 413 | my %orig_configs; | ||
| 390 | my $valid = "A-Za-z_0-9"; | 414 | my $valid = "A-Za-z_0-9"; |
| 415 | |||
| 416 | foreach my $line (@config_file) { | ||
| 417 | $_ = $line; | ||
| 418 | |||
| 419 | if (/(CONFIG_[$valid]*)=(m|y)/) { | ||
| 420 | $orig_configs{$1} = $2; | ||
| 421 | } | ||
| 422 | } | ||
| 423 | |||
| 391 | my $repeat = 1; | 424 | my $repeat = 1; |
| 392 | 425 | ||
| 426 | my $depconfig; | ||
| 427 | |||
| 393 | # | 428 | # |
| 394 | # Note, we do not care about operands (like: &&, ||, !) we want to add any | 429 | # Note, we do not care about operands (like: &&, ||, !) we want to add any |
| 395 | # config that is in the depend list of another config. This script does | 430 | # config that is in the depend list of another config. This script does |
| @@ -398,7 +433,7 @@ my $repeat = 1; | |||
| 398 | # to keep on. If A was on in the original config, B would not have been | 433 | # to keep on. If A was on in the original config, B would not have been |
| 399 | # and B would not be turned on by this script. | 434 | # and B would not be turned on by this script. |
| 400 | # | 435 | # |
| 401 | sub parse_config_dep_select | 436 | sub parse_config_depends |
| 402 | { | 437 | { |
| 403 | my ($p) = @_; | 438 | my ($p) = @_; |
| 404 | 439 | ||
| @@ -409,10 +444,16 @@ sub parse_config_dep_select | |||
| 409 | 444 | ||
| 410 | $p =~ s/^[^$valid]*[$valid]+//; | 445 | $p =~ s/^[^$valid]*[$valid]+//; |
| 411 | 446 | ||
| 447 | # We only need to process if the depend config is a module | ||
| 448 | if (!defined($orig_configs{$conf}) || !$orig_configs{conf} eq "m") { | ||
| 449 | next; | ||
| 450 | } | ||
| 451 | |||
| 412 | if (!defined($configs{$conf})) { | 452 | if (!defined($configs{$conf})) { |
| 413 | # We must make sure that this config has its | 453 | # We must make sure that this config has its |
| 414 | # dependencies met. | 454 | # dependencies met. |
| 415 | $repeat = 1; # do again | 455 | $repeat = 1; # do again |
| 456 | dprint "$conf selected by depend $depconfig\n"; | ||
| 416 | $configs{$conf} = 1; | 457 | $configs{$conf} = 1; |
| 417 | } | 458 | } |
| 418 | } else { | 459 | } else { |
| @@ -421,31 +462,132 @@ sub parse_config_dep_select | |||
| 421 | } | 462 | } |
| 422 | } | 463 | } |
| 423 | 464 | ||
| 424 | while ($repeat) { | 465 | # Select is treated a bit differently than depends. We call this |
| 425 | $repeat = 0; | 466 | # when a config has no prompt and requires another config to be |
| 467 | # selected. We use to just select all configs that selected this | ||
| 468 | # config, but found that that can balloon into enabling hundreds | ||
| 469 | # of configs that we do not care about. | ||
| 470 | # | ||
| 471 | # The idea is we look at all the configs that select it. If one | ||
| 472 | # is already in our list of configs to enable, then there's nothing | ||
| 473 | # else to do. If there isn't, we pick the first config that was | ||
| 474 | # enabled in the orignal config and use that. | ||
| 475 | sub parse_config_selects | ||
| 476 | { | ||
| 477 | my ($config, $p) = @_; | ||
| 426 | 478 | ||
| 427 | foreach my $config (keys %configs) { | 479 | my $next_config; |
| 428 | $config =~ s/^CONFIG_//; | 480 | |
| 481 | while ($p =~ /[$valid]/) { | ||
| 429 | 482 | ||
| 430 | if (defined($depends{$config})) { | 483 | if ($p =~ /^[^$valid]*([$valid]+)/) { |
| 431 | # This config has dependencies. Make sure they are also included | 484 | my $conf = "CONFIG_" . $1; |
| 432 | parse_config_dep_select $depends{$config}; | 485 | |
| 486 | $p =~ s/^[^$valid]*[$valid]+//; | ||
| 487 | |||
| 488 | # Make sure that this config exists in the current .config file | ||
| 489 | if (!defined($orig_configs{$conf})) { | ||
| 490 | dprint "$conf not set for $config select\n"; | ||
| 491 | next; | ||
| 492 | } | ||
| 493 | |||
| 494 | # Check if something other than a module selects this config | ||
| 495 | if (defined($orig_configs{$conf}) && $orig_configs{$conf} ne "m") { | ||
| 496 | dprint "$conf (non module) selects config, we are good\n"; | ||
| 497 | # we are good with this | ||
| 498 | return; | ||
| 499 | } | ||
| 500 | if (defined($configs{$conf})) { | ||
| 501 | dprint "$conf selects $config so we are good\n"; | ||
| 502 | # A set config selects this config, we are good | ||
| 503 | return; | ||
| 504 | } | ||
| 505 | # Set this config to be selected | ||
| 506 | if (!defined($next_config)) { | ||
| 507 | $next_config = $conf; | ||
| 508 | } | ||
| 509 | } else { | ||
| 510 | die "this should never happen"; | ||
| 433 | } | 511 | } |
| 512 | } | ||
| 434 | 513 | ||
| 435 | if (defined($prompts{$config}) || !defined($selects{$config})) { | 514 | # If no possible config selected this, then something happened. |
| 436 | next; | 515 | if (!defined($next_config)) { |
| 516 | print STDERR "WARNING: $config is required, but nothing in the\n"; | ||
| 517 | print STDERR " current config selects it.\n"; | ||
| 518 | return; | ||
| 519 | } | ||
| 520 | |||
| 521 | # If we are here, then we found no config that is set and | ||
| 522 | # selects this config. Repeat. | ||
| 523 | $repeat = 1; | ||
| 524 | # Make this config need to be selected | ||
| 525 | $configs{$next_config} = 1; | ||
| 526 | dprint "$next_config selected by select $config\n"; | ||
| 527 | } | ||
| 528 | |||
| 529 | my %process_selects; | ||
| 530 | |||
| 531 | # loop through all configs, select their dependencies. | ||
| 532 | sub loop_depend { | ||
| 533 | $repeat = 1; | ||
| 534 | |||
| 535 | while ($repeat) { | ||
| 536 | $repeat = 0; | ||
| 537 | |||
| 538 | forloop: | ||
| 539 | foreach my $config (keys %configs) { | ||
| 540 | |||
| 541 | # If this config is not a module, we do not need to process it | ||
| 542 | if (defined($orig_configs{$config}) && $orig_configs{$config} ne "m") { | ||
| 543 | next forloop; | ||
| 544 | } | ||
| 545 | |||
| 546 | $config =~ s/^CONFIG_//; | ||
| 547 | $depconfig = $config; | ||
| 548 | |||
| 549 | if (defined($depends{$config})) { | ||
| 550 | # This config has dependencies. Make sure they are also included | ||
| 551 | parse_config_depends $depends{$config}; | ||
| 552 | } | ||
| 553 | |||
| 554 | # If the config has no prompt, then we need to check if a config | ||
| 555 | # that is enabled selected it. Or if we need to enable one. | ||
| 556 | if (!defined($prompts{$config}) && defined($selects{$config})) { | ||
| 557 | $process_selects{$config} = 1; | ||
| 558 | } | ||
| 437 | } | 559 | } |
| 560 | } | ||
| 561 | } | ||
| 562 | |||
| 563 | sub loop_select { | ||
| 564 | |||
| 565 | foreach my $config (keys %process_selects) { | ||
| 566 | $config =~ s/^CONFIG_//; | ||
| 567 | |||
| 568 | dprint "Process select $config\n"; | ||
| 438 | 569 | ||
| 439 | # config has no prompt and must be selected. | 570 | # config has no prompt and must be selected. |
| 440 | parse_config_dep_select $selects{$config}; | 571 | parse_config_selects $config, $selects{$config}; |
| 441 | } | 572 | } |
| 442 | } | 573 | } |
| 443 | 574 | ||
| 575 | while ($repeat) { | ||
| 576 | # Get the first set of configs and their dependencies. | ||
| 577 | loop_depend; | ||
| 578 | |||
| 579 | $repeat = 0; | ||
| 580 | |||
| 581 | # Now we need to see if we have to check selects; | ||
| 582 | loop_select; | ||
| 583 | } | ||
| 584 | |||
| 444 | my %setconfigs; | 585 | my %setconfigs; |
| 445 | 586 | ||
| 446 | # Finally, read the .config file and turn off any module enabled that | 587 | # Finally, read the .config file and turn off any module enabled that |
| 447 | # we could not find a reason to keep enabled. | 588 | # we could not find a reason to keep enabled. |
| 448 | while(<CIN>) { | 589 | foreach my $line (@config_file) { |
| 590 | $_ = $line; | ||
| 449 | 591 | ||
| 450 | if (/CONFIG_IKCONFIG/) { | 592 | if (/CONFIG_IKCONFIG/) { |
| 451 | if (/# CONFIG_IKCONFIG is not set/) { | 593 | if (/# CONFIG_IKCONFIG is not set/) { |
| @@ -473,7 +615,6 @@ while(<CIN>) { | |||
| 473 | } | 615 | } |
| 474 | print; | 616 | print; |
| 475 | } | 617 | } |
| 476 | close(CIN); | ||
| 477 | 618 | ||
| 478 | # Integrity check, make sure all modules that we want enabled do | 619 | # Integrity check, make sure all modules that we want enabled do |
| 479 | # indeed have their configs set. | 620 | # indeed have their configs set. |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9b0c0b8b4ab4..8fd107a3fac4 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -1786,6 +1786,7 @@ sub dump_function($$) { | |||
| 1786 | $prototype =~ s/__init +//; | 1786 | $prototype =~ s/__init +//; |
| 1787 | $prototype =~ s/__init_or_module +//; | 1787 | $prototype =~ s/__init_or_module +//; |
| 1788 | $prototype =~ s/__must_check +//; | 1788 | $prototype =~ s/__must_check +//; |
| 1789 | $prototype =~ s/__weak +//; | ||
| 1789 | $prototype =~ s/^#\s*define\s+//; #ak added | 1790 | $prototype =~ s/^#\s*define\s+//; #ak added |
| 1790 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; | 1791 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; |
| 1791 | 1792 | ||
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index cd9c6c6bb4c9..4629038c9e5a 100644 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh | |||
| @@ -210,8 +210,8 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then | |||
| 210 | mksysmap ${kallsyms_vmlinux} .tmp_System.map | 210 | mksysmap ${kallsyms_vmlinux} .tmp_System.map |
| 211 | 211 | ||
| 212 | if ! cmp -s System.map .tmp_System.map; then | 212 | if ! cmp -s System.map .tmp_System.map; then |
| 213 | echo Inconsistent kallsyms data | 213 | echo >&2 Inconsistent kallsyms data |
| 214 | echo echo Try "make KALLSYMS_EXTRA_PASS=1" as a workaround | 214 | echo >&2 echo Try "make KALLSYMS_EXTRA_PASS=1" as a workaround |
| 215 | cleanup | 215 | cleanup |
| 216 | exit 1 | 216 | exit 1 |
| 217 | fi | 217 | fi |
diff --git a/scripts/mksysmap b/scripts/mksysmap index 6e133a0bae7a..c1b6191ef879 100644 --- a/scripts/mksysmap +++ b/scripts/mksysmap | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | # The second row specify the type of the symbol: | 16 | # The second row specify the type of the symbol: |
| 17 | # A = Absolute | 17 | # A = Absolute |
| 18 | # B = Uninitialised data (.bss) | 18 | # B = Uninitialised data (.bss) |
| 19 | # C = Comon symbol | 19 | # C = Common symbol |
| 20 | # D = Initialised data | 20 | # D = Initialised data |
| 21 | # G = Initialised data for small objects | 21 | # G = Initialised data for small objects |
| 22 | # I = Indirect reference to another symbol | 22 | # I = Indirect reference to another symbol |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 5759751a1f61..7ed6864ef65b 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
| @@ -156,7 +156,7 @@ static void device_id_check(const char *modname, const char *device_id, | |||
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | /* USB is special because the bcdDevice can be matched against a numeric range */ | 158 | /* USB is special because the bcdDevice can be matched against a numeric range */ |
| 159 | /* Looks like "usb:vNpNdNdcNdscNdpNicNiscNipN" */ | 159 | /* Looks like "usb:vNpNdNdcNdscNdpNicNiscNipNinN" */ |
| 160 | static void do_usb_entry(struct usb_device_id *id, | 160 | static void do_usb_entry(struct usb_device_id *id, |
| 161 | unsigned int bcdDevice_initial, int bcdDevice_initial_digits, | 161 | unsigned int bcdDevice_initial, int bcdDevice_initial_digits, |
| 162 | unsigned char range_lo, unsigned char range_hi, | 162 | unsigned char range_lo, unsigned char range_hi, |
| @@ -210,6 +210,9 @@ static void do_usb_entry(struct usb_device_id *id, | |||
| 210 | ADD(alias, "ip", | 210 | ADD(alias, "ip", |
| 211 | id->match_flags&USB_DEVICE_ID_MATCH_INT_PROTOCOL, | 211 | id->match_flags&USB_DEVICE_ID_MATCH_INT_PROTOCOL, |
| 212 | id->bInterfaceProtocol); | 212 | id->bInterfaceProtocol); |
| 213 | ADD(alias, "in", | ||
| 214 | id->match_flags&USB_DEVICE_ID_MATCH_INT_NUMBER, | ||
| 215 | id->bInterfaceNumber); | ||
| 213 | 216 | ||
| 214 | add_wildcard(alias); | 217 | add_wildcard(alias); |
| 215 | buf_printf(&mod->dev_table_buf, | 218 | buf_printf(&mod->dev_table_buf, |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0f84bb38eb0d..68e9f5ed0a6f 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -865,6 +865,11 @@ static void check_section(const char *modname, struct elf_info *elf, | |||
| 865 | #define ALL_EXIT_TEXT_SECTIONS \ | 865 | #define ALL_EXIT_TEXT_SECTIONS \ |
| 866 | ".exit.text$", ".devexit.text$", ".cpuexit.text$", ".memexit.text$" | 866 | ".exit.text$", ".devexit.text$", ".cpuexit.text$", ".memexit.text$" |
| 867 | 867 | ||
| 868 | #define ALL_PCI_INIT_SECTIONS \ | ||
| 869 | ".pci_fixup_early$", ".pci_fixup_header$", ".pci_fixup_final$", \ | ||
| 870 | ".pci_fixup_enable$", ".pci_fixup_resume$", \ | ||
| 871 | ".pci_fixup_resume_early$", ".pci_fixup_suspend$" | ||
| 872 | |||
| 868 | #define ALL_XXXINIT_SECTIONS DEV_INIT_SECTIONS, CPU_INIT_SECTIONS, \ | 873 | #define ALL_XXXINIT_SECTIONS DEV_INIT_SECTIONS, CPU_INIT_SECTIONS, \ |
| 869 | MEM_INIT_SECTIONS | 874 | MEM_INIT_SECTIONS |
| 870 | #define ALL_XXXEXIT_SECTIONS DEV_EXIT_SECTIONS, CPU_EXIT_SECTIONS, \ | 875 | #define ALL_XXXEXIT_SECTIONS DEV_EXIT_SECTIONS, CPU_EXIT_SECTIONS, \ |
| @@ -1027,6 +1032,12 @@ const struct sectioncheck sectioncheck[] = { | |||
| 1027 | .mismatch = ANY_EXIT_TO_ANY_INIT, | 1032 | .mismatch = ANY_EXIT_TO_ANY_INIT, |
| 1028 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | 1033 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, |
| 1029 | }, | 1034 | }, |
| 1035 | { | ||
| 1036 | .fromsec = { ALL_PCI_INIT_SECTIONS, NULL }, | ||
| 1037 | .tosec = { INIT_SECTIONS, NULL }, | ||
| 1038 | .mismatch = ANY_INIT_TO_ANY_EXIT, | ||
| 1039 | .symbol_white_list = { NULL }, | ||
| 1040 | }, | ||
| 1030 | /* Do not export init/exit functions or data */ | 1041 | /* Do not export init/exit functions or data */ |
| 1031 | { | 1042 | { |
| 1032 | .fromsec = { "__ksymtab*", NULL }, | 1043 | .fromsec = { "__ksymtab*", NULL }, |
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index c95fdda58414..acb86507828a 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
| @@ -92,7 +92,7 @@ rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" | |||
| 92 | mkdir -m 755 -p "$tmpdir/DEBIAN" | 92 | mkdir -m 755 -p "$tmpdir/DEBIAN" |
| 93 | mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" | 93 | mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" |
| 94 | mkdir -m 755 -p "$fwdir/DEBIAN" | 94 | mkdir -m 755 -p "$fwdir/DEBIAN" |
| 95 | mkdir -p "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename" | 95 | mkdir -p "$fwdir/lib/firmware/$version/" "$fwdir/usr/share/doc/$fwpackagename" |
| 96 | mkdir -m 755 -p "$libc_headers_dir/DEBIAN" | 96 | mkdir -m 755 -p "$libc_headers_dir/DEBIAN" |
| 97 | mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename" | 97 | mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename" |
| 98 | mkdir -m 755 -p "$kernel_headers_dir/DEBIAN" | 98 | mkdir -m 755 -p "$kernel_headers_dir/DEBIAN" |
| @@ -243,7 +243,7 @@ EOF | |||
| 243 | fi | 243 | fi |
| 244 | 244 | ||
| 245 | # Build header package | 245 | # Build header package |
| 246 | (cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") | 246 | (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") |
| 247 | (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") | 247 | (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") |
| 248 | (cd $objtree; find arch/$SRCARCH/include .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") | 248 | (cd $objtree; find arch/$SRCARCH/include .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") |
| 249 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version | 249 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version |
| @@ -267,7 +267,8 @@ EOF | |||
| 267 | 267 | ||
| 268 | # Do we have firmware? Move it out of the way and build it into a package. | 268 | # Do we have firmware? Move it out of the way and build it into a package. |
| 269 | if [ -e "$tmpdir/lib/firmware" ]; then | 269 | if [ -e "$tmpdir/lib/firmware" ]; then |
| 270 | mv "$tmpdir/lib/firmware" "$fwdir/lib/" | 270 | mv "$tmpdir/lib/firmware"/* "$fwdir/lib/firmware/$version/" |
| 271 | rmdir "$tmpdir/lib/firmware" | ||
| 271 | 272 | ||
| 272 | cat <<EOF >> debian/control | 273 | cat <<EOF >> debian/control |
| 273 | 274 | ||
diff --git a/scripts/sortextable.c b/scripts/sortextable.c index 1ca9ceb95eb6..6acf83449105 100644 --- a/scripts/sortextable.c +++ b/scripts/sortextable.c | |||
| @@ -247,6 +247,7 @@ do_file(char const *const fname) | |||
| 247 | case EM_X86_64: | 247 | case EM_X86_64: |
| 248 | custom_sort = sort_x86_table; | 248 | custom_sort = sort_x86_table; |
| 249 | break; | 249 | break; |
| 250 | case EM_S390: | ||
| 250 | case EM_MIPS: | 251 | case EM_MIPS: |
| 251 | break; | 252 | break; |
| 252 | } /* end switch */ | 253 | } /* end switch */ |
diff --git a/scripts/tags.sh b/scripts/tags.sh index cf7b12fee573..cff8faad73d1 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
| @@ -153,7 +153,8 @@ exuberant() | |||
| 153 | --regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ | 153 | --regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ |
| 154 | --regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ | 154 | --regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ |
| 155 | --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ | 155 | --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ |
| 156 | --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' | 156 | --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ |
| 157 | --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' | ||
| 157 | 158 | ||
| 158 | all_kconfigs | xargs $1 -a \ | 159 | all_kconfigs | xargs $1 -a \ |
| 159 | --langdef=kconfig --language-force=kconfig \ | 160 | --langdef=kconfig --language-force=kconfig \ |
| @@ -195,7 +196,8 @@ emacs() | |||
| 195 | --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ | 196 | --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ |
| 196 | --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ | 197 | --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ |
| 197 | --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ | 198 | --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ |
| 198 | --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' | 199 | --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ |
| 200 | --regex='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' | ||
| 199 | 201 | ||
| 200 | all_kconfigs | xargs $1 -a \ | 202 | all_kconfigs | xargs $1 -a \ |
| 201 | --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' | 203 | --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' |
