mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
d89d5f855f
The sha1sum of include/linux/atomic-arch-fallback.h isn't checked by check-atomics.sh. It's not clear why it's skipped so let's check it too. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Link: https://lkml.kernel.org/r/20201001202028.1048418-1-pebolle@tiscali.nl
35 lines
757 B
Bash
Executable File
35 lines
757 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Check if atomic headers are up-to-date
|
|
|
|
ATOMICDIR=$(dirname $0)
|
|
ATOMICTBL=${ATOMICDIR}/atomics.tbl
|
|
LINUXDIR=${ATOMICDIR}/../..
|
|
|
|
echo '' | sha1sum - > /dev/null 2>&1
|
|
if [ $? -ne 0 ]; then
|
|
printf "sha1sum not available, skipping atomic header checks.\n"
|
|
exit 0
|
|
fi
|
|
|
|
cat <<EOF |
|
|
asm-generic/atomic-instrumented.h
|
|
asm-generic/atomic-long.h
|
|
linux/atomic-arch-fallback.h
|
|
linux/atomic-fallback.h
|
|
EOF
|
|
while read header; do
|
|
OLDSUM="$(tail -n 1 ${LINUXDIR}/include/${header})"
|
|
OLDSUM="${OLDSUM#// }"
|
|
|
|
NEWSUM="$(sed '$d' ${LINUXDIR}/include/${header} | sha1sum)"
|
|
NEWSUM="${NEWSUM%% *}"
|
|
|
|
if [ "${OLDSUM}" != "${NEWSUM}" ]; then
|
|
printf "warning: generated include/${header} has been modified.\n"
|
|
fi
|
|
done
|
|
|
|
exit 0
|