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

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

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
Documentation/kbuild: add info that 'choice' can have a symbol name
kbuild: add numeric --set-val option to scripts/config
headers_check: Fix warning text
headers_check: better search for functions in headers
scripts/coccinelle: update for compatability with Coccinelle 0.2.4
tags: put function prototypes back!
Kconfig: fix single letter command in scripts/config
gitignore: add scripts/recordmcount

+41 -36
+4
Documentation/coccinelle.txt
··· 36 36 37 37 sudo make install 38 38 39 + The semantic patches in the kernel will work best with Coccinelle version 40 + 0.2.4 or later. Using earlier versions may incur some parse errors in the 41 + semantic patch code, but any results that are obtained should still be 42 + correct. 39 43 40 44 Using Coccinelle on the Linux kernel 41 45 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+5 -1
Documentation/kbuild/kconfig-language.txt
··· 267 267 268 268 choices: 269 269 270 - "choice" 270 + "choice" [symbol] 271 271 <choice options> 272 272 <choice block> 273 273 "endchoice" ··· 281 281 can be compiled as modules. 282 282 A choice accepts another option "optional", which allows to set the 283 283 choice to 'n' and no entry needs to be selected. 284 + If no [symbol] is associated with a choice, then you can not have multiple 285 + definitions of that choice. If a [symbol] is associated to the choice, 286 + then you may define the same choice (ie. with the same entries) in another 287 + place. 284 288 285 289 comment: 286 290
+1
scripts/.gitignore
··· 7 7 bin2c 8 8 unifdef 9 9 ihex2fw 10 + recordmcount
+3 -3
scripts/coccinelle/misc/doubleinit.cocci
··· 7 7 // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 8 8 // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 9 9 // URL: http://coccinelle.lip6.fr/ 10 - // Comments: 10 + // Comments: requires at least Coccinelle 0.2.4, lex or parse error otherwise 11 11 // Options: -no_includes -include_headers 12 12 13 13 virtual org ··· 19 19 expression E; 20 20 @@ 21 21 22 - struct I s =@p0 { ... .fld@p = E, ...}; 22 + struct I s =@p0 { ..., .fld@p = E, ...}; 23 23 24 24 @s@ 25 25 identifier I, s, r.fld; ··· 27 27 expression E; 28 28 @@ 29 29 30 - struct I s =@p0 { ... .fld@p = E, ...}; 30 + struct I s =@p0 { ..., .fld@p = E, ...}; 31 31 32 32 @script:python depends on org@ 33 33 p0 << r.p0;
+14 -25
scripts/coccinelle/null/deref_null.cocci
··· 11 11 // Options: 12 12 13 13 virtual context 14 - virtual patch 15 14 virtual org 16 15 virtual report 17 16 18 - @initialize:python depends on !context && patch && !org && !report@ 19 - 20 - import sys 21 - print >> sys.stderr, "This semantic patch does not support the 'patch' mode." 22 - 23 - @depends on patch@ 24 - @@ 25 - 26 - this_rule_should_never_matches(); 27 - 28 - @ifm depends on !patch@ 17 + @ifm@ 29 18 expression *E; 30 19 statement S1,S2; 31 20 position p1; ··· 24 35 25 36 // The following two rules are separate, because both can match a single 26 37 // expression in different ways 27 - @pr1 depends on !patch expression@ 38 + @pr1 expression@ 28 39 expression *ifm.E; 29 40 identifier f; 30 41 position p1; ··· 32 43 33 44 (E != NULL && ...) ? <+...E->f@p1...+> : ... 34 45 35 - @pr2 depends on !patch expression@ 46 + @pr2 expression@ 36 47 expression *ifm.E; 37 48 identifier f; 38 49 position p2; ··· 48 59 49 60 // For org and report modes 50 61 51 - @r depends on !context && !patch && (org || report) exists@ 62 + @r depends on !context && (org || report) exists@ 52 63 expression subE <= ifm.E; 53 64 expression *ifm.E; 54 65 expression E1,E2; ··· 88 99 } 89 100 else S3 90 101 91 - @script:python depends on !context && !patch && !org && report@ 102 + @script:python depends on !context && !org && report@ 92 103 p << r.p; 93 104 p1 << ifm.p1; 94 105 x << ifm.E; ··· 98 109 coccilib.report.print_report(p[0], msg) 99 110 cocci.include_match(False) 100 111 101 - @script:python depends on !context && !patch && org && !report@ 112 + @script:python depends on !context && org && !report@ 102 113 p << r.p; 103 114 p1 << ifm.p1; 104 115 x << ifm.E; ··· 109 120 cocci.print_main(msg_safe,p) 110 121 cocci.include_match(False) 111 122 112 - @s depends on !context && !patch && (org || report) exists@ 123 + @s depends on !context && (org || report) exists@ 113 124 expression subE <= ifm.E; 114 125 expression *ifm.E; 115 126 expression E1,E2; ··· 148 159 } 149 160 else S3 150 161 151 - @script:python depends on !context && !patch && !org && report@ 162 + @script:python depends on !context && !org && report@ 152 163 p << s.p; 153 164 p1 << ifm.p1; 154 165 x << ifm.E; ··· 157 168 msg="ERROR: %s is NULL but dereferenced." % (x) 158 169 coccilib.report.print_report(p[0], msg) 159 170 160 - @script:python depends on !context && !patch && org && !report@ 171 + @script:python depends on !context && org && !report@ 161 172 p << s.p; 162 173 p1 << ifm.p1; 163 174 x << ifm.E; ··· 169 180 170 181 // For context mode 171 182 172 - @depends on context && !patch && !org && !report exists@ 183 + @depends on context && !org && !report exists@ 173 184 expression subE <= ifm.E; 174 185 expression *ifm.E; 175 186 expression E1,E2; ··· 212 223 // The following three rules are duplicates of ifm, pr1 and pr2 respectively. 213 224 // It is need because the previous rule as already made a "change". 214 225 215 - @ifm1 depends on !patch@ 226 + @ifm1@ 216 227 expression *E; 217 228 statement S1,S2; 218 229 position p1; ··· 220 231 221 232 if@p1 ((E == NULL && ...) || ...) S1 else S2 222 233 223 - @pr11 depends on !patch expression@ 234 + @pr11 expression@ 224 235 expression *ifm1.E; 225 236 identifier f; 226 237 position p1; ··· 228 239 229 240 (E != NULL && ...) ? <+...E->f@p1...+> : ... 230 241 231 - @pr12 depends on !patch expression@ 242 + @pr12 expression@ 232 243 expression *ifm1.E; 233 244 identifier f; 234 245 position p2; ··· 242 253 sizeof(<+...E->f@p2...+>) 243 254 ) 244 255 245 - @depends on context && !patch && !org && !report exists@ 256 + @depends on context && !org && !report exists@ 246 257 expression subE <= ifm1.E; 247 258 expression *ifm1.E; 248 259 expression E1,E2;
+10 -3
scripts/config
··· 10 10 --enable|-e option Enable option 11 11 --disable|-d option Disable option 12 12 --module|-m option Turn option into a module 13 - --set-str option value 14 - Set option to "value" 13 + --set-str option string 14 + Set option to "string" 15 + --set-val option value 16 + Set option to value 15 17 --state|-s option Print state of option (n,y,m,undef) 16 18 17 19 --enable-after|-E beforeopt option ··· 88 86 B=$ARG 89 87 shift 2 90 88 ;; 91 - --*) 89 + -*) 92 90 checkarg "$1" 93 91 shift 94 92 ;; ··· 108 106 109 107 --set-str) 110 108 set_var "CONFIG_$ARG" "CONFIG_$ARG=\"$1\"" 109 + shift 110 + ;; 111 + 112 + --set-val) 113 + set_var "CONFIG_$ARG" "CONFIG_$ARG=$1" 111 114 shift 112 115 ;; 113 116
+3 -3
scripts/headers_check.pl
··· 64 64 65 65 sub check_declarations 66 66 { 67 - if ($line =~m/^\s*extern\b/) { 67 + if ($line =~m/^(\s*extern|unsigned|char|short|int|long|void)\b/) { 68 68 printf STDERR "$filename:$lineno: " . 69 - "userspace cannot call function or variable " . 70 - "defined in the kernel\n"; 69 + "userspace cannot reference function or " . 70 + "variable defined in the kernel\n"; 71 71 } 72 72 } 73 73
+1 -1
scripts/tags.sh
··· 123 123 -I ____cacheline_internodealigned_in_smp \ 124 124 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ 125 125 -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ 126 - --extra=+f --c-kinds=-px \ 126 + --extra=+f --c-kinds=+px \ 127 127 --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' \ 128 128 --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \ 129 129 --regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \