diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-15 17:09:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-15 17:09:15 -0500 |
commit | e4528d696f0fbb8eda231e2696b9ce0660f1e814 (patch) | |
tree | 84d88ee57b17b1830e1f1f7adb14773fe15d58c4 /scripts | |
parent | d72681d7c61f32a89147b8867cfb80e4ea119972 (diff) | |
parent | 6cf3a6eff77273a55b996a5a43f342b150cfba09 (diff) |
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc kbuild changes from Michal Marek:
- make tags fixes again
- scripts/show_delta fix for newer python
- scripts/kernel-doc does not fail on unknown function prototype
- one less coccinelle check this time
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts/tags.sh: remove obsolete __devinit[const|data]
scripts/kernel-doc: make unknown function prototype a Warning instead of an Error
show_delta: Update script to support python versions 2.5 through 3.3
scripts/coccinelle/api: remove devm_request_and_ioremap.cocci
scripts/tags.sh: Increase identifier list
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/coccinelle/api/devm_request_and_ioremap.cocci | 105 | ||||
-rwxr-xr-x | scripts/kernel-doc | 3 | ||||
-rwxr-xr-x | scripts/show_delta | 12 | ||||
-rwxr-xr-x | scripts/tags.sh | 9 |
4 files changed, 12 insertions, 117 deletions
diff --git a/scripts/coccinelle/api/devm_request_and_ioremap.cocci b/scripts/coccinelle/api/devm_request_and_ioremap.cocci deleted file mode 100644 index 562ec88b6352..000000000000 --- a/scripts/coccinelle/api/devm_request_and_ioremap.cocci +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | /// Reimplement a call to devm_request_mem_region followed by a call to ioremap | ||
2 | /// or ioremap_nocache by a call to devm_request_and_ioremap. | ||
3 | /// Devm_request_and_ioremap was introduced in | ||
4 | /// 72f8c0bfa0de64c68ee59f40eb9b2683bffffbb0. It makes the code much more | ||
5 | /// concise. | ||
6 | /// | ||
7 | /// | ||
8 | // Confidence: High | ||
9 | // Copyright: (C) 2011 Julia Lawall, INRIA/LIP6. GPLv2. | ||
10 | // Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2. | ||
11 | // URL: http://coccinelle.lip6.fr/ | ||
12 | // Comments: | ||
13 | // Options: --no-includes --include-headers | ||
14 | |||
15 | virtual patch | ||
16 | virtual org | ||
17 | virtual report | ||
18 | virtual context | ||
19 | |||
20 | @nm@ | ||
21 | expression myname; | ||
22 | identifier i; | ||
23 | @@ | ||
24 | |||
25 | struct platform_driver i = { .driver = { .name = myname } }; | ||
26 | |||
27 | @depends on patch@ | ||
28 | expression dev,res,size; | ||
29 | @@ | ||
30 | |||
31 | -if (!devm_request_mem_region(dev, res->start, size, | ||
32 | - \(res->name\|dev_name(dev)\))) { | ||
33 | - ... | ||
34 | - return ...; | ||
35 | -} | ||
36 | ... when != res->start | ||
37 | ( | ||
38 | -devm_ioremap(dev,res->start,size) | ||
39 | +devm_request_and_ioremap(dev,res) | ||
40 | | | ||
41 | -devm_ioremap_nocache(dev,res->start,size) | ||
42 | +devm_request_and_ioremap(dev,res) | ||
43 | ) | ||
44 | ... when any | ||
45 | when != res->start | ||
46 | |||
47 | // this rule is separate from the previous one, because a single file can | ||
48 | // have multiple values of myname | ||
49 | @depends on patch@ | ||
50 | expression dev,res,size; | ||
51 | expression nm.myname; | ||
52 | @@ | ||
53 | |||
54 | -if (!devm_request_mem_region(dev, res->start, size,myname)) { | ||
55 | - ... | ||
56 | - return ...; | ||
57 | -} | ||
58 | ... when != res->start | ||
59 | ( | ||
60 | -devm_ioremap(dev,res->start,size) | ||
61 | +devm_request_and_ioremap(dev,res) | ||
62 | | | ||
63 | -devm_ioremap_nocache(dev,res->start,size) | ||
64 | +devm_request_and_ioremap(dev,res) | ||
65 | ) | ||
66 | ... when any | ||
67 | when != res->start | ||
68 | |||
69 | |||
70 | @pb depends on org || report || context@ | ||
71 | expression dev,res,size; | ||
72 | expression nm.myname; | ||
73 | position p1,p2; | ||
74 | @@ | ||
75 | |||
76 | *if | ||
77 | (!devm_request_mem_region@p1(dev, res->start, size, | ||
78 | \(res->name\|dev_name(dev)\|myname\))) { | ||
79 | ... | ||
80 | return ...; | ||
81 | } | ||
82 | ... when != res->start | ||
83 | ( | ||
84 | *devm_ioremap@p2(dev,res->start,size) | ||
85 | | | ||
86 | *devm_ioremap_nocache@p2(dev,res->start,size) | ||
87 | ) | ||
88 | ... when any | ||
89 | when != res->start | ||
90 | |||
91 | @script:python depends on org@ | ||
92 | p1 << pb.p1; | ||
93 | p2 << pb.p2; | ||
94 | @@ | ||
95 | |||
96 | cocci.print_main("INFO: replace by devm_request_and_ioremap",p1) | ||
97 | cocci.print_secs("",p2) | ||
98 | |||
99 | @script:python depends on report@ | ||
100 | p1 << pb.p1; | ||
101 | p2 << pb.p2; | ||
102 | @@ | ||
103 | |||
104 | msg = "INFO: devm_request_mem_region followed by ioremap on line %s can be replaced by devm_request_and_ioremap" % (p2[0].line) | ||
105 | coccilib.report.print_report(p1[0],msg) | ||
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index dbd3e1ebbdad..da058da413e7 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -2128,8 +2128,7 @@ sub dump_function($$) { | |||
2128 | 2128 | ||
2129 | create_parameterlist($args, ',', $file); | 2129 | create_parameterlist($args, ',', $file); |
2130 | } else { | 2130 | } else { |
2131 | print STDERR "Error(${file}:$.): cannot understand prototype: '$prototype'\n"; | 2131 | print STDERR "Warning(${file}:$.): cannot understand function prototype: '$prototype'\n"; |
2132 | ++$errors; | ||
2133 | return; | 2132 | return; |
2134 | } | 2133 | } |
2135 | 2134 | ||
diff --git a/scripts/show_delta b/scripts/show_delta index 17df3051747a..e25732b5d701 100755 --- a/scripts/show_delta +++ b/scripts/show_delta | |||
@@ -13,7 +13,7 @@ import sys | |||
13 | import string | 13 | import string |
14 | 14 | ||
15 | def usage(): | 15 | def usage(): |
16 | print """usage: show_delta [<options>] <filename> | 16 | print ("""usage: show_delta [<options>] <filename> |
17 | 17 | ||
18 | This program parses the output from a set of printk message lines which | 18 | This program parses the output from a set of printk message lines which |
19 | have time data prefixed because the CONFIG_PRINTK_TIME option is set, or | 19 | have time data prefixed because the CONFIG_PRINTK_TIME option is set, or |
@@ -35,7 +35,7 @@ ex: $ dmesg >timefile | |||
35 | 35 | ||
36 | will show times relative to the line in the kernel output | 36 | will show times relative to the line in the kernel output |
37 | starting with "NET4". | 37 | starting with "NET4". |
38 | """ | 38 | """) |
39 | sys.exit(1) | 39 | sys.exit(1) |
40 | 40 | ||
41 | # returns a tuple containing the seconds and text for each message line | 41 | # returns a tuple containing the seconds and text for each message line |
@@ -94,11 +94,11 @@ def main(): | |||
94 | try: | 94 | try: |
95 | lines = open(filein,"r").readlines() | 95 | lines = open(filein,"r").readlines() |
96 | except: | 96 | except: |
97 | print "Problem opening file: %s" % filein | 97 | print ("Problem opening file: %s" % filein) |
98 | sys.exit(1) | 98 | sys.exit(1) |
99 | 99 | ||
100 | if base_str: | 100 | if base_str: |
101 | print 'base= "%s"' % base_str | 101 | print ('base= "%s"' % base_str) |
102 | # assume a numeric base. If that fails, try searching | 102 | # assume a numeric base. If that fails, try searching |
103 | # for a matching line. | 103 | # for a matching line. |
104 | try: | 104 | try: |
@@ -117,13 +117,13 @@ def main(): | |||
117 | # stop at first match | 117 | # stop at first match |
118 | break | 118 | break |
119 | if not found: | 119 | if not found: |
120 | print 'Couldn\'t find line matching base pattern "%s"' % base_str | 120 | print ('Couldn\'t find line matching base pattern "%s"' % base_str) |
121 | sys.exit(1) | 121 | sys.exit(1) |
122 | else: | 122 | else: |
123 | base_time = 0.0 | 123 | base_time = 0.0 |
124 | 124 | ||
125 | for line in lines: | 125 | for line in lines: |
126 | print convert_line(line, base_time), | 126 | print (convert_line(line, base_time),) |
127 | 127 | ||
128 | main() | 128 | main() |
129 | 129 | ||
diff --git a/scripts/tags.sh b/scripts/tags.sh index 74f02e4dddd2..58c455929091 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -149,15 +149,16 @@ dogtags() | |||
149 | exuberant() | 149 | exuberant() |
150 | { | 150 | { |
151 | all_target_sources | xargs $1 -a \ | 151 | all_target_sources | xargs $1 -a \ |
152 | -I __initdata,__exitdata,__initconst,__devinitdata \ | 152 | -I __initdata,__exitdata,__initconst, \ |
153 | -I __devinitconst,__cpuinitdata,__initdata_memblock \ | 153 | -I __cpuinitdata,__initdata_memblock \ |
154 | -I __refdata,__attribute \ | 154 | -I __refdata,__attribute,__maybe_unused,__always_unused \ |
155 | -I __acquires,__releases,__deprecated \ | 155 | -I __acquires,__releases,__deprecated \ |
156 | -I __read_mostly,__aligned,____cacheline_aligned \ | 156 | -I __read_mostly,__aligned,____cacheline_aligned \ |
157 | -I ____cacheline_aligned_in_smp \ | 157 | -I ____cacheline_aligned_in_smp \ |
158 | -I __cacheline_aligned,__cacheline_aligned_in_smp \ | ||
158 | -I ____cacheline_internodealigned_in_smp \ | 159 | -I ____cacheline_internodealigned_in_smp \ |
159 | -I __used,__packed,__packed2__,__must_check,__must_hold \ | 160 | -I __used,__packed,__packed2__,__must_check,__must_hold \ |
160 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ | 161 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL,ACPI_EXPORT_SYMBOL \ |
161 | -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ | 162 | -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ |
162 | -I static,const \ | 163 | -I static,const \ |
163 | --extra=+f --c-kinds=+px \ | 164 | --extra=+f --c-kinds=+px \ |