doc: Coccinelle: move to HTML doc

Move doc/README.coccinelle to doc/develop/coccinelle.rst using the current
linux-next version of the text.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt 2020-06-05 05:13:44 +02:00 committed by Tom Rini
parent 7c3cc6f106
commit aac9f284db
2 changed files with 26 additions and 11 deletions

View File

@ -4,6 +4,8 @@
.. highlight:: none .. highlight:: none
.. _devtools_coccinelle:
Coccinelle Coccinelle
========== ==========
@ -12,7 +14,7 @@ many uses in kernel development, including the application of complex,
tree-wide patches and detection of problematic programming patterns. tree-wide patches and detection of problematic programming patterns.
Getting Coccinelle Getting Coccinelle
------------------- ------------------
The semantic patches included in the kernel use features and options The semantic patches included in the kernel use features and options
which are provided by Coccinelle version 1.0.0-rc11 and above. which are provided by Coccinelle version 1.0.0-rc11 and above.
@ -30,23 +32,31 @@ of many distributions, e.g. :
- NetBSD - NetBSD
- FreeBSD - FreeBSD
You can get the latest version released from the Coccinelle homepage at Some distribution packages are obsolete and it is recommended
to use the latest version released from the Coccinelle homepage at
http://coccinelle.lip6.fr/ http://coccinelle.lip6.fr/
Information and tips about Coccinelle are also provided on the wiki Or from Github at:
pages at http://cocci.ekstranet.diku.dk/wiki/doku.php
Once you have it, run the following command:: https://github.com/coccinelle/coccinelle
./configure Once you have it, run the following commands::
./autogen
./configure
make make
as a regular user, and install it with:: as a regular user, and install it with::
sudo make install sudo make install
More detailed installation instructions to build from source can be
found at:
https://github.com/coccinelle/coccinelle/blob/master/install.txt
Supplemental documentation Supplemental documentation
--------------------------- --------------------------
For supplemental documentation refer to the wiki: For supplemental documentation refer to the wiki:
@ -54,6 +64,10 @@ https://bottest.wiki.kernel.org/coccicheck
The wiki documentation always refers to the linux-next version of the script. The wiki documentation always refers to the linux-next version of the script.
For Semantic Patch Language(SmPL) grammar documentation refer to:
http://coccinelle.lip6.fr/documentation.php
Using Coccinelle on the Linux kernel Using Coccinelle on the Linux kernel
------------------------------------ ------------------------------------
@ -114,7 +128,7 @@ To enable verbose messages set the V= variable, for example::
make coccicheck MODE=report V=1 make coccicheck MODE=report V=1
Coccinelle parallelization Coccinelle parallelization
--------------------------- --------------------------
By default, coccicheck tries to run as parallel as possible. To change By default, coccicheck tries to run as parallel as possible. To change
the parallelism, set the J= variable. For example, to run across 4 CPUs:: the parallelism, set the J= variable. For example, to run across 4 CPUs::
@ -209,7 +223,7 @@ err.log will now have the profiling information, while stdout will
provide some progress information as Coccinelle moves forward with provide some progress information as Coccinelle moves forward with
work. work.
DEBUG_FILE support is only supported when using coccinelle >= 1.2. DEBUG_FILE support is only supported when using coccinelle >= 1.0.2.
.cocciconfig support .cocciconfig support
-------------------- --------------------
@ -226,7 +240,7 @@ Since coccicheck runs through make, it naturally runs from the kernel
proper dir, as such the second rule above would be implied for picking up a proper dir, as such the second rule above would be implied for picking up a
.cocciconfig when using ``make coccicheck``. .cocciconfig when using ``make coccicheck``.
``make coccicheck`` also supports using M= targets.If you do not supply ``make coccicheck`` also supports using M= targets. If you do not supply
any M= target, it is assumed you want to target the entire kernel. any M= target, it is assumed you want to target the entire kernel.
The kernel coccicheck script has:: The kernel coccicheck script has::
@ -319,7 +333,7 @@ as an example if requiring at least Coccinelle >= 1.0.5::
// Requires: 1.0.5 // Requires: 1.0.5
Proposing new semantic patches Proposing new semantic patches
------------------------------- ------------------------------
New semantic patches can be proposed and submitted by kernel New semantic patches can be proposed and submitted by kernel
developers. For sake of clarity, they should be organized in the developers. For sake of clarity, they should be organized in the

View File

@ -7,5 +7,6 @@ Develop U-Boot
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
coccinelle
crash_dumps crash_dumps
logging logging