diff --git a/scripts/coccicheck b/scripts/coccicheck index 2956fce8fa4fc82fd941e7785e742d526ad142c2..e52cb43fede60fe1be7eea170b63a6c0d54b6e0b 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: GPL-2.0 # Linux kernel coccicheck # @@ -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' diff --git a/scripts/coccinelle/api/atomic_as_refcounter.cocci b/scripts/coccinelle/api/atomic_as_refcounter.cocci index e63d52408b86fe38d24c07e0402776c0086b0b7e..bbe5b293293352fc0e47c159a4a34fa05b6edc61 100644 --- a/scripts/coccinelle/api/atomic_as_refcounter.cocci +++ b/scripts/coccinelle/api/atomic_as_refcounter.cocci @@ -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@ @@ -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@ @@ -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@ @@ -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)