Skip to content

Commit

Permalink
Merge branch 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/jlawall/linux

Pull coccinelle updates from Julia Lawall.

* 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
  scripts: coccicheck: Correct usage of make coccicheck
  coccinelle: update expiring email addresses
  coccinnelle: Remove ptr_ret script
  kbuild: do not use scripts/ld-version.sh for checking spatch version
  remove boolinit.cocci
  • Loading branch information
torvalds committed Dec 25, 2020
2 parents 11cc92e + d8f6e5c commit 42dc45e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 306 deletions.
4 changes: 2 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4355,8 +4355,8 @@ T: git git://linuxtv.org/media_tree.git
F: drivers/media/pci/cobalt/

COCCINELLE/Semantic Patches (SmPL)
M: Julia Lawall <Julia.Lawall@lip6.fr>
M: Gilles Muller <Gilles.Muller@lip6.fr>
M: Julia Lawall <Julia.Lawall@inria.fr>
M: Gilles Muller <Gilles.Muller@inria.fr>
M: Nicolas Palix <[email protected]>
M: Michal Marek <[email protected]>
L: [email protected] (moderated for non-subscribers)
Expand Down
26 changes: 17 additions & 9 deletions scripts/coccicheck
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ if [ ! -x "$SPATCH" ]; then
fi

SPATCH_VERSION=$($SPATCH --version | head -1 | awk '{print $3}')
SPATCH_VERSION_NUM=$(echo $SPATCH_VERSION | ${DIR}/scripts/ld-version.sh)

USE_JOBS="no"
$SPATCH --help | grep "\-\-jobs" > /dev/null && USE_JOBS="yes"
Expand Down Expand Up @@ -61,6 +60,18 @@ COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
if [ "$C" = "1" -o "$C" = "2" ]; then
ONLINE=1

if [[ $# -le 0 ]]; then
echo ''
echo 'Specifying both the variable "C" and rule "coccicheck" in the make
command results in a shift count error.'
echo ''
echo 'Try specifying "scripts/coccicheck" as a value for the CHECK variable instead.'
echo ''
echo 'Example: make C=2 CHECK=scripts/coccicheck drivers/net/ethernet/ethoc.o'
echo ''
exit 1
fi

# Take only the last argument, which is the C file to test
shift $(( $# - 1 ))
OPTIONS="$COCCIINCLUDE $1"
Expand Down Expand Up @@ -186,14 +197,11 @@ coccinelle () {

OPT=`grep "Options:" $COCCI | cut -d':' -f2`
REQ=`grep "Requires:" $COCCI | cut -d':' -f2 | sed "s| ||"`
REQ_NUM=$(echo $REQ | ${DIR}/scripts/ld-version.sh)
if [ "$REQ_NUM" != "0" ] ; then
if [ "$SPATCH_VERSION_NUM" -lt "$REQ_NUM" ] ; then
echo "Skipping coccinelle SmPL patch: $COCCI"
echo "You have coccinelle: $SPATCH_VERSION"
echo "This SmPL patch requires: $REQ"
return
fi
if [ -n "$REQ" ] && ! { echo "$REQ"; echo "$SPATCH_VERSION"; } | sort -CV ; then
echo "Skipping coccinelle SmPL patch: $COCCI"
echo "You have coccinelle: $SPATCH_VERSION"
echo "This SmPL patch requires: $REQ"
return
fi

# The option '--parse-cocci' can be used to syntactically check the SmPL files.
Expand Down
97 changes: 0 additions & 97 deletions scripts/coccinelle/api/ptr_ret.cocci

This file was deleted.

195 changes: 0 additions & 195 deletions scripts/coccinelle/misc/boolinit.cocci

This file was deleted.

4 changes: 1 addition & 3 deletions scripts/nsdeps
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ if [ ! -x "$SPATCH" ]; then
exit 1
fi

SPATCH_REQ_VERSION_NUM=$(echo $SPATCH_REQ_VERSION | ${DIR}/scripts/ld-version.sh)
SPATCH_VERSION=$($SPATCH --version | head -1 | awk '{print $3}')
SPATCH_VERSION_NUM=$(echo $SPATCH_VERSION | ${DIR}/scripts/ld-version.sh)

if [ "$SPATCH_VERSION_NUM" -lt "$SPATCH_REQ_VERSION_NUM" ] ; then
if ! { echo "$SPATCH_REQ_VERSION"; echo "$SPATCH_VERSION"; } | sort -CV ; then
echo "spatch needs to be version $SPATCH_REQ_VERSION or higher"
exit 1
fi
Expand Down

0 comments on commit 42dc45e

Please sign in to comment.