Commit Graph

4 Commits

Author SHA1 Message Date
Deepak R Varma bab550371c coccinelle: api/atomic_as_refcounter: include message type in output
A common practice is to grep for "WARNING" or "ERROR" text in the report
output from a Coccinelle semantic patch script. So, include the text
"WARNING: " in the report output generated by the semantic patch for
desired filtering of the output. Also improves the readability of the
output. Here is an example of the old and new outputs reported:

    xyz_file.c:131:39-40: atomic_add_unless
    xyz_file.c:131:39-40: WARNING: atomic_add_unless

    xyz_file.c:196:6-25: atomic_dec_and_test variation before object free at line 208.
    xyz_file.c:196:6-25: WARNING: atomic_dec_and_test variation before object free at line 208.

Signed-off-by: Deepak R Varma <drv@mailo.com>
Acked-by: Julia Lawall <Julia.Lawall@inria.fr>
2022-12-26 21:47:12 +01:00
Julia Lawall f01701cec8 update Coccinelle URL
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
2022-08-07 21:30:36 +02:00
Matthias Maennich ef349abd91 coccinelle: api/atomic_as_refcounter: add SPDX License Identifier
Add the missing GPLv2 SPDX license identifier.

It appears this single file was missing from 7f904d7e1f ("treewide:
Replace GPLv2 boilerplate/reference with SPDX - rule 505"), which
addressed all other files in scripts/coccinelle. Hence I added
GPL-2.0-only consitently with the mentioned patch.

Cc: linux-spdx@vger.kernel.org
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30 18:34:15 +02:00
Elena Reshetova b56e535509 Coccinelle: add atomic_as_refcounter script
atomic_as_refcounter.cocci script allows detecting
cases when refcount_t type and API should be used
instead of atomic_t.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-18 01:18:05 +09:00