Skip to content

Commit fb35342

Browse files
committed
Merge tag 'cocci-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents 34c108a + 2b2d50b commit fb35342

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scripts/coccicheck

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# SPDX-License-Identifier: GPL-2.0
33
# Linux kernel coccicheck
44
#
@@ -18,7 +18,7 @@ fi
1818
SPATCH_VERSION=$($SPATCH --version | head -1 | awk '{print $3}')
1919

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

2323
# The verbosity may be set by the environmental parameter V=
2424
# as for example with 'make V=1 coccicheck'

scripts/coccinelle/api/atomic_as_refcounter.cocci

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ identifier fname6 =~ ".*call_rcu.*";
5555
p1 << r1.p1;
5656
p2 << r1.p2;
5757
@@
58-
msg = "atomic_dec_and_test variation before object free at line %s."
58+
msg = "WARNING: atomic_dec_and_test variation before object free at line %s."
5959
coccilib.report.print_report(p1[0], msg % (p2[0].line))
6060
6161
@r4 exists@
@@ -88,7 +88,7 @@ fname@p2(y, ...);
8888
p1 << r4.p1;
8989
p2 << r4.p2;
9090
@@
91-
msg = "atomic_dec_and_test variation before object free at line %s."
91+
msg = "WARNING: atomic_dec_and_test variation before object free at line %s."
9292
coccilib.report.print_report(p1[0], msg % (p2[0].line))
9393
9494
@r2 exists@
@@ -107,7 +107,7 @@ atomic64_add_unless(&(a)->x,-1,1)@p1
107107
@script:python depends on report@
108108
p1 << r2.p1;
109109
@@
110-
msg = "atomic_add_unless"
110+
msg = "WARNING: atomic_add_unless"
111111
coccilib.report.print_report(p1[0], msg)
112112
113113
@r3 exists@
@@ -126,5 +126,5 @@ x = atomic64_add_return@p1(-1, ...);
126126
@script:python depends on report@
127127
p1 << r3.p1;
128128
@@
129-
msg = "x = atomic_add_return(-1, ...)"
129+
msg = "WARNING: x = atomic_add_return(-1, ...)"
130130
coccilib.report.print_report(p1[0], msg)

0 commit comments

Comments
 (0)