aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 01:32:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 01:32:05 -0400
commitdc03c0f9d12d85286d5e3623aa96d5c2a271b8e6 (patch)
treec10e3a583735d790e7cec24f7d12fbf44d2136dd
parentf429d35588847fa1048f9dbdcc3cc1ee1b530041 (diff)
parent2552a39facb6609007a02eeda5d5edee4fcaca30 (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-xscripts/coccicheck2
-rw-r--r--scripts/coccinelle/api/setup_timer.cocci4
-rw-r--r--scripts/coccinelle/misc/compare_const_fl.cocci171
-rw-r--r--scripts/package/Makefile4
-rwxr-xr-xscripts/package/builddeb5
-rwxr-xr-xscripts/package/mkspec5
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
100kill_running() { 100kill_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
107depends on !patch && 107depends 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)@
110expression a, b, e1, e2, e3, e4, e5; 110expression a, b, e1, e2, e3, e4, e5;
111position j0, j1, j2; 111position 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)@
131expression c, e6, e7; 131expression c, e6, e7;
132position r1.p; 132position r1.p;
133position j0, j1; 133position 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
9virtual patch
10virtual context
11virtual org
12virtual report
13
14@r1 depends on patch && !context && !org && !report
15 disable bitor_comm, neg_if_exp@
16constant c,c1;
17local idexpression i;
18expression e,e1,e2;
19binary operator b = {==,!=,&,|};
20type t;
21@@
22
23(
24c b (c1)
25|
26sizeof(t) b e1
27|
28sizeof e b e1
29|
30i b e1
31|
32c | e1 | e2 | ...
33|
34c | (e ? e1 : e2)
35|
36- c
37+ e
38b
39- e
40+ c
41)
42
43@r2 depends on patch && !context && !org && !report
44 disable gtr_lss, gtr_lss_eq, not_int2@
45constant c,c1;
46expression e,e1,e2;
47binary operator b;
48binary operator b1 = {<,<=},b2 = {<,<=};
49binary operator b3 = {>,>=},b4 = {>,>=};
50local idexpression i;
51type t;
52@@
53
54(
55c b c1
56|
57sizeof(t) b e1
58|
59sizeof e b e1
60|
61 (e1 b1 e) && (e b2 e2)
62|
63 (e1 b3 e) && (e b4 e2)
64|
65i 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@
84type t;
85binary operator b = {==,!=,&,|};
86constant c, c1;
87expression e, e1, e2;
88local idexpression i;
89position j0;
90@@
91
92(
93c b (c1)
94|
95sizeof(t) b e1
96|
97sizeof e b e1
98|
99i b e1
100|
101c | e1 | e2 | ...
102|
103c | (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@
110type t;
111binary operator b, b1 = {<,<=}, b2 = {<,<=}, b3 = {>,>=}, b4 = {>,>=};
112constant c, c1;
113expression e, e1, e2;
114local idexpression i;
115position j0;
116@@
117
118(
119c b c1
120|
121sizeof(t) b e1
122|
123sizeof e b e1
124|
125 (e1 b1 e) && (e b2 e2)
126|
127 (e1 b3 e) && (e b4 e2)
128|
129i 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@
143j0 << r1_context.j0;
144@@
145
146msg = "Move constant to right."
147coccilib.org.print_todo(j0[0], msg)
148
149@script:python r2_org depends on org@
150j0 << r2_context.j0;
151@@
152
153msg = "Move constant to right."
154coccilib.org.print_todo(j0[0], msg)
155
156// ----------------------------------------------------------------------------
157
158@script:python r1_report depends on report@
159j0 << r1_context.j0;
160@@
161
162msg = "Move constant to right."
163coccilib.report.print_report(j0[0], msg)
164
165@script:python r2_report depends on report@
166j0 << r2_context.j0;
167@@
168
169msg = "Move constant to right."
170coccilib.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" 325if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then
326 (cd $srctree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrsrcfiles"
327fi
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"
143echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img" 143echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img"
144echo "fi" 144echo "fi"
145echo "" 145echo ""
146echo "%postun"
147echo "if [ -x /sbin/update-bootloader ]; then"
148echo "/sbin/update-bootloader --remove $KERNELRELEASE"
149echo "fi"
150echo ""
146echo "%files" 151echo "%files"
147echo '%defattr (-, root, root)' 152echo '%defattr (-, root, root)'
148echo "/lib/modules/$KERNELRELEASE" 153echo "/lib/modules/$KERNELRELEASE"