diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-27 01:32:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-27 01:32:05 -0400 |
commit | dc03c0f9d12d85286d5e3623aa96d5c2a271b8e6 (patch) | |
tree | c10e3a583735d790e7cec24f7d12fbf44d2136dd | |
parent | f429d35588847fa1048f9dbdcc3cc1ee1b530041 (diff) | |
parent | 2552a39facb6609007a02eeda5d5edee4fcaca30 (diff) |
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc kbuild updates from Michal Marek:
"This is the non-critical part of kbuild:
- Coccinelle fixes, one semantic patch less in this round [Vaishali
Thakkar, Wolfram Sang, Kees Cook]
- rpm-pkg support for (open)SUSE's update-bootloader [Jiří Kosian]
- rpm-pkg restored support for $RPMOPTS [Srinivas Pandruvada]
- deb-pkg fixes for the linux-headers package [Bjørn Mork, Azriel
Samson]"
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
coccicheck: Fix missing 0 index in kill loop
scripts/package/Makefile: rpmbuild add support of RPMOPTS
builddeb: fix missing headers in linux-headers package
builddeb: include objtool binary in headers package
kbuild/mkspec: support 'update-bootloader'-based systems
scripts: coccinelle: remove check to move constants to right
Coccinelle: setup_timer: Add space in front of parentheses
-rwxr-xr-x | scripts/coccicheck | 2 | ||||
-rw-r--r-- | scripts/coccinelle/api/setup_timer.cocci | 4 | ||||
-rw-r--r-- | scripts/coccinelle/misc/compare_const_fl.cocci | 171 | ||||
-rw-r--r-- | scripts/package/Makefile | 4 | ||||
-rwxr-xr-x | scripts/package/builddeb | 5 | ||||
-rwxr-xr-x | scripts/package/mkspec | 5 |
6 files changed, 14 insertions, 177 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck index b2d758188f2f..dd85a455b2ba 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck | |||
@@ -98,7 +98,7 @@ run_cmd() { | |||
98 | } | 98 | } |
99 | 99 | ||
100 | kill_running() { | 100 | kill_running() { |
101 | for i in $(seq $(( NPROC - 1 )) ); do | 101 | for i in $(seq 0 $(( NPROC - 1 )) ); do |
102 | if [ $VERBOSE -eq 2 ] ; then | 102 | if [ $VERBOSE -eq 2 ] ; then |
103 | echo "Killing ${SPATCH_PID[$i]}" | 103 | echo "Killing ${SPATCH_PID[$i]}" |
104 | fi | 104 | fi |
diff --git a/scripts/coccinelle/api/setup_timer.cocci b/scripts/coccinelle/api/setup_timer.cocci index 8ee0ac30e547..eb6bd9e4ab1a 100644 --- a/scripts/coccinelle/api/setup_timer.cocci +++ b/scripts/coccinelle/api/setup_timer.cocci | |||
@@ -106,7 +106,7 @@ position j0, j1, j2; | |||
106 | @match_function_and_data_after_init_timer_context | 106 | @match_function_and_data_after_init_timer_context |
107 | depends on !patch && | 107 | depends on !patch && |
108 | !match_immediate_function_data_after_init_timer_context && | 108 | !match_immediate_function_data_after_init_timer_context && |
109 | (context || org || report)@ | 109 | (context || org || report)@ |
110 | expression a, b, e1, e2, e3, e4, e5; | 110 | expression a, b, e1, e2, e3, e4, e5; |
111 | position j0, j1, j2; | 111 | position j0, j1, j2; |
112 | @@ | 112 | @@ |
@@ -127,7 +127,7 @@ position j0, j1, j2; | |||
127 | @r3_context depends on !patch && | 127 | @r3_context depends on !patch && |
128 | !match_immediate_function_data_after_init_timer_context && | 128 | !match_immediate_function_data_after_init_timer_context && |
129 | !match_function_and_data_after_init_timer_context && | 129 | !match_function_and_data_after_init_timer_context && |
130 | (context || org || report)@ | 130 | (context || org || report)@ |
131 | expression c, e6, e7; | 131 | expression c, e6, e7; |
132 | position r1.p; | 132 | position r1.p; |
133 | position j0, j1; | 133 | position j0, j1; |
diff --git a/scripts/coccinelle/misc/compare_const_fl.cocci b/scripts/coccinelle/misc/compare_const_fl.cocci deleted file mode 100644 index b5d4bab60263..000000000000 --- a/scripts/coccinelle/misc/compare_const_fl.cocci +++ /dev/null | |||
@@ -1,171 +0,0 @@ | |||
1 | /// Move constants to the right of binary operators. | ||
2 | //# Depends on personal taste in some cases. | ||
3 | /// | ||
4 | // Confidence: Moderate | ||
5 | // Copyright: (C) 2015 Copyright: (C) 2015 Julia Lawall, Inria. GPLv2. | ||
6 | // URL: http://coccinelle.lip6.fr/ | ||
7 | // Options: --no-includes --include-headers | ||
8 | |||
9 | virtual patch | ||
10 | virtual context | ||
11 | virtual org | ||
12 | virtual report | ||
13 | |||
14 | @r1 depends on patch && !context && !org && !report | ||
15 | disable bitor_comm, neg_if_exp@ | ||
16 | constant c,c1; | ||
17 | local idexpression i; | ||
18 | expression e,e1,e2; | ||
19 | binary operator b = {==,!=,&,|}; | ||
20 | type t; | ||
21 | @@ | ||
22 | |||
23 | ( | ||
24 | c b (c1) | ||
25 | | | ||
26 | sizeof(t) b e1 | ||
27 | | | ||
28 | sizeof e b e1 | ||
29 | | | ||
30 | i b e1 | ||
31 | | | ||
32 | c | e1 | e2 | ... | ||
33 | | | ||
34 | c | (e ? e1 : e2) | ||
35 | | | ||
36 | - c | ||
37 | + e | ||
38 | b | ||
39 | - e | ||
40 | + c | ||
41 | ) | ||
42 | |||
43 | @r2 depends on patch && !context && !org && !report | ||
44 | disable gtr_lss, gtr_lss_eq, not_int2@ | ||
45 | constant c,c1; | ||
46 | expression e,e1,e2; | ||
47 | binary operator b; | ||
48 | binary operator b1 = {<,<=},b2 = {<,<=}; | ||
49 | binary operator b3 = {>,>=},b4 = {>,>=}; | ||
50 | local idexpression i; | ||
51 | type t; | ||
52 | @@ | ||
53 | |||
54 | ( | ||
55 | c b c1 | ||
56 | | | ||
57 | sizeof(t) b e1 | ||
58 | | | ||
59 | sizeof e b e1 | ||
60 | | | ||
61 | (e1 b1 e) && (e b2 e2) | ||
62 | | | ||
63 | (e1 b3 e) && (e b4 e2) | ||
64 | | | ||
65 | i b e | ||
66 | | | ||
67 | - c < e | ||
68 | + e > c | ||
69 | | | ||
70 | - c <= e | ||
71 | + e >= c | ||
72 | | | ||
73 | - c > e | ||
74 | + e < c | ||
75 | | | ||
76 | - c >= e | ||
77 | + e <= c | ||
78 | ) | ||
79 | |||
80 | // ---------------------------------------------------------------------------- | ||
81 | |||
82 | @r1_context depends on !patch && (context || org || report) | ||
83 | disable bitor_comm, neg_if_exp exists@ | ||
84 | type t; | ||
85 | binary operator b = {==,!=,&,|}; | ||
86 | constant c, c1; | ||
87 | expression e, e1, e2; | ||
88 | local idexpression i; | ||
89 | position j0; | ||
90 | @@ | ||
91 | |||
92 | ( | ||
93 | c b (c1) | ||
94 | | | ||
95 | sizeof(t) b e1 | ||
96 | | | ||
97 | sizeof e b e1 | ||
98 | | | ||
99 | i b e1 | ||
100 | | | ||
101 | c | e1 | e2 | ... | ||
102 | | | ||
103 | c | (e ? e1 : e2) | ||
104 | | | ||
105 | * c@j0 b e | ||
106 | ) | ||
107 | |||
108 | @r2_context depends on !patch && (context || org || report) | ||
109 | disable gtr_lss, gtr_lss_eq, not_int2 exists@ | ||
110 | type t; | ||
111 | binary operator b, b1 = {<,<=}, b2 = {<,<=}, b3 = {>,>=}, b4 = {>,>=}; | ||
112 | constant c, c1; | ||
113 | expression e, e1, e2; | ||
114 | local idexpression i; | ||
115 | position j0; | ||
116 | @@ | ||
117 | |||
118 | ( | ||
119 | c b c1 | ||
120 | | | ||
121 | sizeof(t) b e1 | ||
122 | | | ||
123 | sizeof e b e1 | ||
124 | | | ||
125 | (e1 b1 e) && (e b2 e2) | ||
126 | | | ||
127 | (e1 b3 e) && (e b4 e2) | ||
128 | | | ||
129 | i b e | ||
130 | | | ||
131 | * c@j0 < e | ||
132 | | | ||
133 | * c@j0 <= e | ||
134 | | | ||
135 | * c@j0 > e | ||
136 | | | ||
137 | * c@j0 >= e | ||
138 | ) | ||
139 | |||
140 | // ---------------------------------------------------------------------------- | ||
141 | |||
142 | @script:python r1_org depends on org@ | ||
143 | j0 << r1_context.j0; | ||
144 | @@ | ||
145 | |||
146 | msg = "Move constant to right." | ||
147 | coccilib.org.print_todo(j0[0], msg) | ||
148 | |||
149 | @script:python r2_org depends on org@ | ||
150 | j0 << r2_context.j0; | ||
151 | @@ | ||
152 | |||
153 | msg = "Move constant to right." | ||
154 | coccilib.org.print_todo(j0[0], msg) | ||
155 | |||
156 | // ---------------------------------------------------------------------------- | ||
157 | |||
158 | @script:python r1_report depends on report@ | ||
159 | j0 << r1_context.j0; | ||
160 | @@ | ||
161 | |||
162 | msg = "Move constant to right." | ||
163 | coccilib.report.print_report(j0[0], msg) | ||
164 | |||
165 | @script:python r2_report depends on report@ | ||
166 | j0 << r2_context.j0; | ||
167 | @@ | ||
168 | |||
169 | msg = "Move constant to right." | ||
170 | coccilib.report.print_report(j0[0], msg) | ||
171 | |||
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index c2c7389bfbab..71b4a8af9d4d 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
@@ -52,7 +52,7 @@ rpm-pkg rpm: FORCE | |||
52 | $(call cmd,src_tar,$(KERNELPATH),kernel.spec) | 52 | $(call cmd,src_tar,$(KERNELPATH),kernel.spec) |
53 | $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version | 53 | $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version |
54 | mv -f $(objtree)/.tmp_version $(objtree)/.version | 54 | mv -f $(objtree)/.tmp_version $(objtree)/.version |
55 | rpmbuild --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz | 55 | rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz |
56 | rm $(KERNELPATH).tar.gz kernel.spec | 56 | rm $(KERNELPATH).tar.gz kernel.spec |
57 | 57 | ||
58 | # binrpm-pkg | 58 | # binrpm-pkg |
@@ -63,7 +63,7 @@ binrpm-pkg: FORCE | |||
63 | $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version | 63 | $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version |
64 | mv -f $(objtree)/.tmp_version $(objtree)/.version | 64 | mv -f $(objtree)/.tmp_version $(objtree)/.version |
65 | 65 | ||
66 | rpmbuild --define "_builddir $(objtree)" --target \ | 66 | rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ |
67 | $(UTS_MACHINE) -bb $(objtree)/binkernel.spec | 67 | $(UTS_MACHINE) -bb $(objtree)/binkernel.spec |
68 | rm binkernel.spec | 68 | rm binkernel.spec |
69 | 69 | ||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6c3b038ef40d..86e56fef7473 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
@@ -322,7 +322,10 @@ fi | |||
322 | 322 | ||
323 | # Build kernel header package | 323 | # Build kernel header package |
324 | (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles" | 324 | (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles" |
325 | (cd $srctree; find arch/$SRCARCH/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles" | 325 | if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then |
326 | (cd $srctree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrsrcfiles" | ||
327 | fi | ||
328 | (cd $srctree; find arch/*/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles" | ||
326 | (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles" | 329 | (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles" |
327 | (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles" | 330 | (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles" |
328 | (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles" | 331 | (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles" |
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index b6de63cb3f23..57673bae5597 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec | |||
@@ -143,6 +143,11 @@ echo "if [ -x /sbin/new-kernel-pkg ]; then" | |||
143 | echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img" | 143 | echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img" |
144 | echo "fi" | 144 | echo "fi" |
145 | echo "" | 145 | echo "" |
146 | echo "%postun" | ||
147 | echo "if [ -x /sbin/update-bootloader ]; then" | ||
148 | echo "/sbin/update-bootloader --remove $KERNELRELEASE" | ||
149 | echo "fi" | ||
150 | echo "" | ||
146 | echo "%files" | 151 | echo "%files" |
147 | echo '%defattr (-, root, root)' | 152 | echo '%defattr (-, root, root)' |
148 | echo "/lib/modules/$KERNELRELEASE" | 153 | echo "/lib/modules/$KERNELRELEASE" |