From aac9f284dbc3ae6a14d6fc8cf06c89aa9431b75b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 5 Jun 2020 05:13:44 +0200 Subject: [PATCH] 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 --- .../coccinelle.rst} | 36 +++++++++++++------ doc/develop/index.rst | 1 + 2 files changed, 26 insertions(+), 11 deletions(-) rename doc/{README.coccinelle => develop/coccinelle.rst} (95%) diff --git a/doc/README.coccinelle b/doc/develop/coccinelle.rst similarity index 95% rename from doc/README.coccinelle rename to doc/develop/coccinelle.rst index 4a64b4c69d..70274c3f5f 100644 --- a/doc/README.coccinelle +++ b/doc/develop/coccinelle.rst @@ -4,6 +4,8 @@ .. highlight:: none +.. _devtools_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. Getting Coccinelle -------------------- +------------------ The semantic patches included in the kernel use features and options which are provided by Coccinelle version 1.0.0-rc11 and above. @@ -30,23 +32,31 @@ of many distributions, e.g. : - NetBSD - 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/ -Information and tips about Coccinelle are also provided on the wiki -pages at http://cocci.ekstranet.diku.dk/wiki/doku.php +Or from Github at: -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 as a regular user, and install it with:: 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 ---------------------------- +-------------------------- 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. +For Semantic Patch Language(SmPL) grammar documentation refer to: + +http://coccinelle.lip6.fr/documentation.php + 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 Coccinelle parallelization ---------------------------- +-------------------------- 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:: @@ -209,7 +223,7 @@ err.log will now have the profiling information, while stdout will provide some progress information as Coccinelle moves forward with 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 -------------------- @@ -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 .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. The kernel coccicheck script has:: @@ -319,7 +333,7 @@ as an example if requiring at least Coccinelle >= 1.0.5:: // Requires: 1.0.5 Proposing new semantic patches -------------------------------- +------------------------------ New semantic patches can be proposed and submitted by kernel developers. For sake of clarity, they should be organized in the diff --git a/doc/develop/index.rst b/doc/develop/index.rst index eb5095a9eb..98a95ad434 100644 --- a/doc/develop/index.rst +++ b/doc/develop/index.rst @@ -7,5 +7,6 @@ Develop U-Boot .. toctree:: :maxdepth: 2 + coccinelle crash_dumps logging