Skip to content

Commit

Permalink
Merge tag 'cocci-for-6.3' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/jlawall/linux

Pull coccinelle updates from Julia Lawall:
 "Changes in make coccicheck and improve a semantic patch

  This makes a couple of changes in make coccicheck related to shell
  commands.

  It also updates the api/atomic_as_refcounter semantic patch to include
  WARNING in the output message, as done in other cases"

* tag 'cocci-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
  scripts: coccicheck: Use /usr/bin/env
  scripts: coccicheck: Avoid warning about spurious escape
  coccinelle: api/atomic_as_refcounter: include message type in output
  • Loading branch information
torvalds committed Mar 3, 2023
2 parents 34c108a + 2b2d50b commit fb35342
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions scripts/coccicheck
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0
# Linux kernel coccicheck
#
Expand All @@ -18,7 +18,7 @@ fi
SPATCH_VERSION=$($SPATCH --version | head -1 | awk '{print $3}')

USE_JOBS="no"
$SPATCH --help | grep "\-\-jobs" > /dev/null && USE_JOBS="yes"
$SPATCH --help | grep -e "--jobs" > /dev/null && USE_JOBS="yes"

# The verbosity may be set by the environmental parameter V=
# as for example with 'make V=1 coccicheck'
Expand Down
8 changes: 4 additions & 4 deletions scripts/coccinelle/api/atomic_as_refcounter.cocci
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ identifier fname6 =~ ".*call_rcu.*";
p1 << r1.p1;
p2 << r1.p2;
@@
msg = "atomic_dec_and_test variation before object free at line %s."
msg = "WARNING: atomic_dec_and_test variation before object free at line %s."
coccilib.report.print_report(p1[0], msg % (p2[0].line))
@r4 exists@
Expand Down Expand Up @@ -88,7 +88,7 @@ fname@p2(y, ...);
p1 << r4.p1;
p2 << r4.p2;
@@
msg = "atomic_dec_and_test variation before object free at line %s."
msg = "WARNING: atomic_dec_and_test variation before object free at line %s."
coccilib.report.print_report(p1[0], msg % (p2[0].line))
@r2 exists@
Expand All @@ -107,7 +107,7 @@ atomic64_add_unless(&(a)->x,-1,1)@p1
@script:python depends on report@
p1 << r2.p1;
@@
msg = "atomic_add_unless"
msg = "WARNING: atomic_add_unless"
coccilib.report.print_report(p1[0], msg)
@r3 exists@
Expand All @@ -126,5 +126,5 @@ x = atomic64_add_return@p1(-1, ...);
@script:python depends on report@
p1 << r3.p1;
@@
msg = "x = atomic_add_return(-1, ...)"
msg = "WARNING: x = atomic_add_return(-1, ...)"
coccilib.report.print_report(p1[0], msg)

0 comments on commit fb35342

Please sign in to comment.