[PATCHv3 1/6] atomics: add common header generation files

From
Andrew Morton <akpm@linux-foundation.org>
Date
2018-11-15 23:04:03
Also in
lkml
Reply to
Mark Rutland, 2018-09-04
On Tue,  4 Sep 2018 11:48:25 +0100 Mark Rutland [off-list ref] wrote:
To minimize repetition, to allow for future rework, and to ensure
regularity of the various atomic APIs, we'd like to automatically
generate (the bulk of) a number of headers related to atomics.

This patch adds the infrastructure to do so, leaving actual conversion
of headers to subsequent patches. This infrastructure consists of:
My build broke.

scripts/atomic/check-atomics.sh: line 16: scripts/atomic/gen-atomic-instrumented.sh: Permission denied
scripts/atomic/check-atomics.sh: line 16: scripts/atomic/gen-atomic-long.sh: Permission denied
scripts/atomic/check-atomics.sh: line 16: scripts/atomic/gen-atomic-fallback.sh: Permission denied



From: Andrew Morton <akpm@linux-foundation.org>
Subject: scripts/atomic/check-atomics.sh: don't assume that scripts are executable

patch(1) doesn't set the x bit on files.  So if someone downloads and
applies patch-4.21.xz, their kernel won't build.  Fix that by executing
/bin/sh.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/atomic/check-atomics.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/scripts/atomic/check-atomics.sh~scripts-atomic-check-atomicssh-dont-assume-that-scripts-are-executable
+++ a/scripts/atomic/check-atomics.sh
@@ -13,7 +13,7 @@ gen-atomic-long.sh              asm-gene
 gen-atomic-fallback.sh          linux/atomic-fallback.h
 EOF
 while read script header; do
-	if ! (${ATOMICDIR}/${script} ${ATOMICTBL} | diff - ${LINUXDIR}/include/${header} > /dev/null); then
+	if ! (/bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} | diff - ${LINUXDIR}/include/${header} > /dev/null); then
 		printf "warning: include/${header} is out-of-date.\n"
 	fi
 done
_
Thread (13 messages) 13 messages, 3 authors, last reply 2018-11-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help