Commit e4528d696f0fbb8eda231e2696b9ce0660f1e814
Exists in
master
and in
16 other branches
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
Showing 4 changed files Side-by-side Diff
scripts/coccinelle/api/devm_request_and_ioremap.cocci
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) |
scripts/kernel-doc
... | ... | @@ -2128,8 +2128,7 @@ |
2128 | 2128 | |
2129 | 2129 | create_parameterlist($args, ',', $file); |
2130 | 2130 | } else { |
2131 | - print STDERR "Error(${file}:$.): cannot understand prototype: '$prototype'\n"; | |
2132 | - ++$errors; | |
2131 | + print STDERR "Warning(${file}:$.): cannot understand function prototype: '$prototype'\n"; | |
2133 | 2132 | return; |
2134 | 2133 | } |
2135 | 2134 |
scripts/show_delta
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | import string |
14 | 14 | |
15 | 15 | def usage(): |
16 | - print """usage: show_delta [<options>] <filename> | |
16 | + print ("""usage: show_delta [<options>] <filename> | |
17 | 17 | |
18 | 18 | This program parses the output from a set of printk message lines which |
19 | 19 | have time data prefixed because the CONFIG_PRINTK_TIME option is set, or |
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | |
36 | 36 | will show times relative to the line in the kernel output |
37 | 37 | starting with "NET4". |
38 | -""" | |
38 | +""") | |
39 | 39 | sys.exit(1) |
40 | 40 | |
41 | 41 | # returns a tuple containing the seconds and text for each message line |
42 | 42 | |
... | ... | @@ -94,11 +94,11 @@ |
94 | 94 | try: |
95 | 95 | lines = open(filein,"r").readlines() |
96 | 96 | except: |
97 | - print "Problem opening file: %s" % filein | |
97 | + print ("Problem opening file: %s" % filein) | |
98 | 98 | sys.exit(1) |
99 | 99 | |
100 | 100 | if base_str: |
101 | - print 'base= "%s"' % base_str | |
101 | + print ('base= "%s"' % base_str) | |
102 | 102 | # assume a numeric base. If that fails, try searching |
103 | 103 | # for a matching line. |
104 | 104 | try: |
105 | 105 | |
... | ... | @@ -117,13 +117,13 @@ |
117 | 117 | # stop at first match |
118 | 118 | break |
119 | 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 | 121 | sys.exit(1) |
122 | 122 | else: |
123 | 123 | base_time = 0.0 |
124 | 124 | |
125 | 125 | for line in lines: |
126 | - print convert_line(line, base_time), | |
126 | + print (convert_line(line, base_time),) | |
127 | 127 | |
128 | 128 | main() |
scripts/tags.sh
... | ... | @@ -149,15 +149,16 @@ |
149 | 149 | exuberant() |
150 | 150 | { |
151 | 151 | all_target_sources | xargs $1 -a \ |
152 | - -I __initdata,__exitdata,__initconst,__devinitdata \ | |
153 | - -I __devinitconst,__cpuinitdata,__initdata_memblock \ | |
154 | - -I __refdata,__attribute \ | |
152 | + -I __initdata,__exitdata,__initconst, \ | |
153 | + -I __cpuinitdata,__initdata_memblock \ | |
154 | + -I __refdata,__attribute,__maybe_unused,__always_unused \ | |
155 | 155 | -I __acquires,__releases,__deprecated \ |
156 | 156 | -I __read_mostly,__aligned,____cacheline_aligned \ |
157 | 157 | -I ____cacheline_aligned_in_smp \ |
158 | + -I __cacheline_aligned,__cacheline_aligned_in_smp \ | |
158 | 159 | -I ____cacheline_internodealigned_in_smp \ |
159 | 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 | 162 | -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ |
162 | 163 | -I static,const \ |
163 | 164 | --extra=+f --c-kinds=+px \ |