From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932771AbcHINqh (ORCPT ); Tue, 9 Aug 2016 09:46:37 -0400 Received: from mx1.imag.fr ([129.88.30.5]:43591 "EHLO mx1.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932695AbcHINq2 (ORCPT ); Tue, 9 Aug 2016 09:46:28 -0400 X-Greylist: delayed 2239 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Aug 2016 09:46:27 EDT Subject: Re: [PATCH 02/10] docs: sphinxify coccinelle.txt and add it to dev-tools To: Jonathan Corbet , linux-doc@vger.kernel.org References: <20160808233502.16950-1-corbet@lwn.net> <20160808233502.16950-3-corbet@lwn.net> Cc: linux-kernel@vger.kernel.org, Jani Nikula , Michal Marek , Gilles Muller , Julia Lawall From: "Nicolas Palix (LIG)" Organization: UJF Polytech / LIG Erods Message-ID: Date: Tue, 9 Aug 2016 15:08:40 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160808233502.16950-3-corbet@lwn.net> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms040709060101020009060107" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (mx1.imag.fr [129.88.30.5]); Tue, 09 Aug 2016 15:08:41 +0200 (CEST) X-IMAG-MailScanner-Information: Please contact MI2S MIM for more information X-MailScanner-ID: u79D8fMZ021097 X-IMAG-MailScanner: Found to be clean X-IMAG-MailScanner-SpamCheck: X-IMAG-MailScanner-From: nicolas.palix@imag.fr MailScanner-NULL-Check: 1471352923.25336@3BGZPXJYOuuv8RXaDK5s9g Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a cryptographically signed message in MIME format. --------------ms040709060101020009060107 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Le 09/08/16 =E0 01:34, Jonathan Corbet a =E9crit : > No textual changes have been made, but the formatting has obviously bee= n > tweaked. > > Cc: Michal Marek > Cc: Gilles Muller > Cc: Nicolas Palix > Cc: Julia Lawall > Signed-off-by: Jonathan Corbet Acked-by: Nicolas Palix > --- > .../{coccinelle.txt =3D> dev-tools/coccinelle.rst} | 359 +++++++++++= ---------- > Documentation/dev-tools/tools.rst | 1 + > MAINTAINERS | 2 +- > 3 files changed, 192 insertions(+), 170 deletions(-) > rename Documentation/{coccinelle.txt =3D> dev-tools/coccinelle.rst} (5= 6%) > > diff --git a/Documentation/coccinelle.txt b/Documentation/dev-tools/coc= cinelle.rst > similarity index 56% > rename from Documentation/coccinelle.txt > rename to Documentation/dev-tools/coccinelle.rst > index 01fb1da..4a64b4c 100644 > --- a/Documentation/coccinelle.txt > +++ b/Documentation/dev-tools/coccinelle.rst > @@ -1,10 +1,18 @@ > -Copyright 2010 Nicolas Palix > -Copyright 2010 Julia Lawall > -Copyright 2010 Gilles Muller > +.. Copyright 2010 Nicolas Palix > +.. Copyright 2010 Julia Lawall > +.. Copyright 2010 Gilles Muller > > +.. highlight:: none > > - Getting Coccinelle > -~~~~~~~~~~~~~~~~~~~~ > +Coccinelle > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Coccinelle is a tool for pattern matching and text transformation that= has > +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. > @@ -22,24 +30,23 @@ of many distributions, e.g. : > - NetBSD > - FreeBSD > > - > You can get the latest version released from the Coccinelle homepage a= t > 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 > > -Once you have it, run the following command: > +Once you have it, run the following command:: > > ./configure > make > > -as a regular user, and install it with > +as a regular user, and install it with:: > > sudo make install > > - Supplemental documentation > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Supplemental documentation > +--------------------------- > > For supplemental documentation refer to the wiki: > > @@ -47,49 +54,52 @@ https://bottest.wiki.kernel.org/coccicheck > > The wiki documentation always refers to the linux-next version of the = script. > > - Using Coccinelle on the Linux kernel > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Using Coccinelle on the Linux kernel > +------------------------------------ > > A Coccinelle-specific target is defined in the top level > -Makefile. This target is named 'coccicheck' and calls the 'coccicheck'= > -front-end in the 'scripts' directory. > +Makefile. This target is named ``coccicheck`` and calls the ``cocciche= ck`` > +front-end in the ``scripts`` directory. > > -Four basic modes are defined: patch, report, context, and org. The mod= e to > -use is specified by setting the MODE variable with 'MODE=3D'. > +Four basic modes are defined: ``patch``, ``report``, ``context``, and > +``org``. The mode to use is specified by setting the MODE variable wit= h > +``MODE=3D``. > > -'patch' proposes a fix, when possible. > +- ``patch`` proposes a fix, when possible. > > -'report' generates a list in the following format: > +- ``report`` generates a list in the following format: > file:line:column-column: message > > -'context' highlights lines of interest and their context in a > -diff-like style.Lines of interest are indicated with '-'. > +- ``context`` highlights lines of interest and their context in a > + diff-like style.Lines of interest are indicated with ``-``. > > -'org' generates a report in the Org mode format of Emacs. > +- ``org`` generates a report in the Org mode format of Emacs. > > Note that not all semantic patches implement all modes. For easy use > of Coccinelle, the default mode is "report". > > Two other modes provide some common combinations of these modes. > > -'chain' tries the previous modes in the order above until one succeeds= =2E > +- ``chain`` tries the previous modes in the order above until one succ= eeds. > + > +- ``rep+ctxt`` runs successively the report mode and the context mode.= > + It should be used with the C option (described later) > + which checks the code on a file basis. > > -'rep+ctxt' runs successively the report mode and the context mode. > - It should be used with the C option (described later) > - which checks the code on a file basis. > +Examples > +~~~~~~~~ > > -Examples: > - To make a report for every semantic patch, run the following command:= > +To make a report for every semantic patch, run the following command::= > > make coccicheck MODE=3Dreport > > - To produce patches, run: > +To produce patches, run:: > > make coccicheck MODE=3Dpatch > > > The coccicheck target applies every semantic patch available in the > -sub-directories of 'scripts/coccinelle' to the entire Linux kernel. > +sub-directories of ``scripts/coccinelle`` to the entire Linux kernel. > > For each semantic patch, a commit message is proposed. It gives a > description of the problem being checked by the semantic patch, and > @@ -99,15 +109,15 @@ As any static code analyzer, Coccinelle produces f= alse > positives. Thus, reports must be carefully checked, and patches > reviewed. > > -To enable verbose messages set the V=3D variable, for example: > +To enable verbose messages set the V=3D variable, for example:: > > make coccicheck MODE=3Dreport V=3D1 > > - Coccinelle parallelization > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Coccinelle parallelization > +--------------------------- > > By default, coccicheck tries to run as parallel as possible. To change= > -the parallelism, set the J=3D variable. For example, to run across 4 C= PUs: > +the parallelism, set the J=3D variable. For example, to run across 4 C= PUs:: > > make coccicheck MODE=3Dreport J=3D4 > > @@ -115,44 +125,47 @@ As of Coccinelle 1.0.2 Coccinelle uses Ocaml parm= ap for parallelization, > if support for this is detected you will benefit from parmap paralleli= zation. > > When parmap is enabled coccicheck will enable dynamic load balancing b= y using > -'--chunksize 1' argument, this ensures we keep feeding threads with wo= rk > +``--chunksize 1`` argument, this ensures we keep feeding threads with = work > one by one, so that we avoid the situation where most work gets done b= y only > a few threads. With dynamic load balancing, if a thread finishes early= we keep > feeding it more work. > > When parmap is enabled, if an error occurs in Coccinelle, this error > -value is propagated back, the return value of the 'make coccicheck' > +value is propagated back, the return value of the ``make coccicheck`` > captures this return value. > > - Using Coccinelle with a single semantic patch > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Using Coccinelle with a single semantic patch > +--------------------------------------------- > > The optional make variable COCCI can be used to check a single > semantic patch. In that case, the variable must be initialized with > the name of the semantic patch to apply. > > -For instance: > +For instance:: > > make coccicheck COCCI=3D MODE=3Dpatch > -or > + > +or:: > + > make coccicheck COCCI=3D MODE=3Dreport > > > - Controlling Which Files are Processed by Coccinelle > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Controlling Which Files are Processed by Coccinelle > +--------------------------------------------------- > + > By default the entire kernel source tree is checked. > > -To apply Coccinelle to a specific directory, M=3D can be used. > -For example, to check drivers/net/wireless/ one may write: > +To apply Coccinelle to a specific directory, ``M=3D`` can be used. > +For example, to check drivers/net/wireless/ one may write:: > > make coccicheck M=3Ddrivers/net/wireless/ > > To apply Coccinelle on a file basis, instead of a directory basis, the= > -following command may be used: > +following command may be used:: > > make C=3D1 CHECK=3D"scripts/coccicheck" > > -To check only newly edited code, use the value 2 for the C flag, i.e. > +To check only newly edited code, use the value 2 for the C flag, i.e.:= : > > make C=3D2 CHECK=3D"scripts/coccicheck" > > @@ -166,8 +179,8 @@ semantic patch as shown in the previous section. > The "report" mode is the default. You can select another one with the > MODE variable explained above. > > - Debugging Coccinelle SmPL patches > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Debugging Coccinelle SmPL patches > +--------------------------------- > > Using coccicheck is best as it provides in the spatch command line > include options matching the options used when we compile the kernel. > @@ -177,8 +190,8 @@ manually run Coccinelle with debug options added. > Alternatively you can debug running Coccinelle against SmPL patches > by asking for stderr to be redirected to stderr, by default stderr > is redirected to /dev/null, if you'd like to capture stderr you > -can specify the DEBUG_FILE=3D"file.txt" option to coccicheck. For > -instance: > +can specify the ``DEBUG_FILE=3D"file.txt"`` option to coccicheck. For > +instance:: > > rm -f cocci.err > make coccicheck COCCI=3Dscripts/coccinelle/free/kfree.cocci MODE=3D= report DEBUG_FILE=3Dcocci.err > @@ -186,7 +199,7 @@ instance: > > You can use SPFLAGS to add debugging flags, for instance you may want = to > add both --profile --show-trying to SPFLAGS when debugging. For instan= ce > -you may want to use: > +you may want to use:: > > rm -f err.log > export COCCI=3Dscripts/coccinelle/misc/irqf_oneshot.cocci > @@ -198,24 +211,24 @@ work. > > DEBUG_FILE support is only supported when using coccinelle >=3D 1.2. > > - .cocciconfig support > -~~~~~~~~~~~~~~~~~~~~~~ > +.cocciconfig support > +-------------------- > > Coccinelle supports reading .cocciconfig for default Coccinelle option= s that > should be used every time spatch is spawned, the order of precedence f= or > variables for .cocciconfig is as follows: > > - o Your current user's home directory is processed first > - o Your directory from which spatch is called is processed next > - o The directory provided with the --dir option is processed last, if= used > +- Your current user's home directory is processed first > +- Your directory from which spatch is called is processed next > +- The directory provided with the --dir option is processed last, if u= sed > > 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'. > +.cocciconfig when using ``make coccicheck``. > > -'make coccicheck' also supports using M=3D targets.If you do not suppl= y > +``make coccicheck`` also supports using M=3D targets.If you do not sup= ply > any M=3D target, it is assumed you want to target the entire kernel. > -The kernel coccicheck script has: > +The kernel coccicheck script has:: > > if [ "$KBUILD_EXTMOD" =3D "" ] ; then > OPTIONS=3D"--dir $srctree $COCCIINCLUDE" > @@ -235,12 +248,12 @@ override any of the kernel's .coccicheck's settin= gs using SPFLAGS. > > We help Coccinelle when used against Linux with a set of sensible defa= ults > options for Linux with our own Linux .cocciconfig. This hints to cocci= nelle > -git can be used for 'git grep' queries over coccigrep. A timeout of 20= 0 > +git can be used for ``git grep`` queries over coccigrep. A timeout of = 200 > seconds should suffice for now. > > The options picked up by coccinelle when reading a .cocciconfig do not= appear > as arguments to spatch processes running on your system, to confirm wh= at > -options will be used by Coccinelle run: > +options will be used by Coccinelle run:: > > spatch --print-options-only > > @@ -252,219 +265,227 @@ carries its own .cocciconfig, you will need to = use SPFLAGS to use idutils if > desired. See below section "Additional flags" for more details on how = to use > idutils. > > - Additional flags > -~~~~~~~~~~~~~~~~~~ > +Additional flags > +---------------- > > Additional flags can be passed to spatch through the SPFLAGS > variable. This works as Coccinelle respects the last flags > -given to it when options are in conflict. > +given to it when options are in conflict. :: > > make SPFLAGS=3D--use-glimpse coccicheck > > Coccinelle supports idutils as well but requires coccinelle >=3D 1.0.6= =2E > When no ID file is specified coccinelle assumes your ID database file > is in the file .id-utils.index on the top level of the kernel, coccine= lle > -carries a script scripts/idutils_index.sh which creates the database w= ith > +carries a script scripts/idutils_index.sh which creates the database w= ith:: > > mkid -i C --output .id-utils.index > > If you have another database filename you can also just symlink with t= his > -name. > +name. :: > > make SPFLAGS=3D--use-idutils coccicheck > > Alternatively you can specify the database filename explicitly, for > -instance: > +instance:: > > make SPFLAGS=3D"--use-idutils /full-path/to/ID" coccicheck > > -See spatch --help to learn more about spatch options. > +See ``spatch --help`` to learn more about spatch options. > > -Note that the '--use-glimpse' and '--use-idutils' options > +Note that the ``--use-glimpse`` and ``--use-idutils`` options > require external tools for indexing the code. None of them is > thus active by default. However, by indexing the code with > one of these tools, and according to the cocci file used, > spatch could proceed the entire code base more quickly. > > - SmPL patch specific options > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +SmPL patch specific options > +--------------------------- > > SmPL patches can have their own requirements for options passed > to Coccinelle. SmPL patch specific options can be provided by > -providing them at the top of the SmPL patch, for instance: > +providing them at the top of the SmPL patch, for instance:: > > -// Options: --no-includes --include-headers > + // Options: --no-includes --include-headers > > - SmPL patch Coccinelle requirements > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +SmPL patch Coccinelle requirements > +---------------------------------- > > As Coccinelle features get added some more advanced SmPL patches > may require newer versions of Coccinelle. If an SmPL patch requires > at least a version of Coccinelle, this can be specified as follows, > -as an example if requiring at least Coccinelle >=3D 1.0.5: > +as an example if requiring at least Coccinelle >=3D 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 > developers. For sake of clarity, they should be organized in the > -sub-directories of 'scripts/coccinelle/'. > +sub-directories of ``scripts/coccinelle/``. > > > - Detailed description of the 'report' mode > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Detailed description of the ``report`` mode > +------------------------------------------- > + > +``report`` generates a list in the following format:: > > -'report' generates a list in the following format: > file:line:column-column: message > > -Example: > +Example > +~~~~~~~ > > -Running > +Running:: > > make coccicheck MODE=3Dreport COCCI=3Dscripts/coccinelle/api/err_cast= =2Ecocci > > -will execute the following part of the SmPL script. > +will execute the following part of the SmPL script:: > > - > -@r depends on !context && !patch && (org || report)@ > -expression x; > -position p; > -@@ > + > + @r depends on !context && !patch && (org || report)@ > + expression x; > + position p; > + @@ > > - ERR_PTR@p(PTR_ERR(x)) > + ERR_PTR@p(PTR_ERR(x)) > > -@script:python depends on report@ > -p << r.p; > -x << r.x; > -@@ > + @script:python depends on report@ > + p << r.p; > + x << r.x; > + @@ > > -msg=3D"ERR_CAST can be used with %s" % (x) > -coccilib.report.print_report(p[0], msg) > - > + msg=3D"ERR_CAST can be used with %s" % (x) > + coccilib.report.print_report(p[0], msg) > + > > This SmPL excerpt generates entries on the standard output, as > -illustrated below: > +illustrated below:: > > -/home/user/linux/crypto/ctr.c:188:9-16: ERR_CAST can be used with alg > -/home/user/linux/crypto/authenc.c:619:9-16: ERR_CAST can be used with = auth > -/home/user/linux/crypto/xts.c:227:9-16: ERR_CAST can be used with alg > + /home/user/linux/crypto/ctr.c:188:9-16: ERR_CAST can be used with = alg > + /home/user/linux/crypto/authenc.c:619:9-16: ERR_CAST can be used w= ith auth > + /home/user/linux/crypto/xts.c:227:9-16: ERR_CAST can be used with = alg > > > - Detailed description of the 'patch' mode > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Detailed description of the ``patch`` mode > +------------------------------------------ > > -When the 'patch' mode is available, it proposes a fix for each problem= > +When the ``patch`` mode is available, it proposes a fix for each probl= em > identified. > > -Example: > +Example > +~~~~~~~ > + > +Running:: > > -Running > make coccicheck MODE=3Dpatch COCCI=3Dscripts/coccinelle/api/err_cast.= cocci > > -will execute the following part of the SmPL script. > +will execute the following part of the SmPL script:: > > - > -@ depends on !context && patch && !org && !report @ > -expression x; > -@@ > + > + @ depends on !context && patch && !org && !report @ > + expression x; > + @@ > > -- ERR_PTR(PTR_ERR(x)) > -+ ERR_CAST(x) > - > + - ERR_PTR(PTR_ERR(x)) > + + ERR_CAST(x) > + > > This SmPL excerpt generates patch hunks on the standard output, as > -illustrated below: > +illustrated below:: > > -diff -u -p a/crypto/ctr.c b/crypto/ctr.c > ---- a/crypto/ctr.c 2010-05-26 10:49:38.000000000 +0200 > -+++ b/crypto/ctr.c 2010-06-03 23:44:49.000000000 +0200 > -@@ -185,7 +185,7 @@ static struct crypto_instance *crypto_ct > + diff -u -p a/crypto/ctr.c b/crypto/ctr.c > + --- a/crypto/ctr.c 2010-05-26 10:49:38.000000000 +0200 > + +++ b/crypto/ctr.c 2010-06-03 23:44:49.000000000 +0200 > + @@ -185,7 +185,7 @@ static struct crypto_instance *crypto_ct > alg =3D crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER, > CRYPTO_ALG_TYPE_MASK); > if (IS_ERR(alg)) > -- return ERR_PTR(PTR_ERR(alg)); > -+ return ERR_CAST(alg); > - > + - return ERR_PTR(PTR_ERR(alg)); > + + return ERR_CAST(alg); > + > /* Block size must be >=3D 4 bytes. */ > err =3D -EINVAL; > > - Detailed description of the 'context' mode > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Detailed description of the ``context`` mode > +-------------------------------------------- > > -'context' highlights lines of interest and their context > +``context`` highlights lines of interest and their context > in a diff-like style. > > -NOTE: The diff-like output generated is NOT an applicable patch. The > - intent of the 'context' mode is to highlight the important lines= > - (annotated with minus, '-') and gives some surrounding context > + **NOTE**: The diff-like output generated is NOT an applicable pa= tch. The > + intent of the ``context`` mode is to highlight the important lin= es > + (annotated with minus, ``-``) and gives some surrounding context= > lines around. This output can be used with the diff mode of > Emacs to review the code. > > -Example: > +Example > +~~~~~~~ > + > +Running:: > > -Running > make coccicheck MODE=3Dcontext COCCI=3Dscripts/coccinelle/api/err_cas= t.cocci > > -will execute the following part of the SmPL script. > +will execute the following part of the SmPL script:: > > - > -@ depends on context && !patch && !org && !report@ > -expression x; > -@@ > + > + @ depends on context && !patch && !org && !report@ > + expression x; > + @@ > > -* ERR_PTR(PTR_ERR(x)) > - > + * ERR_PTR(PTR_ERR(x)) > + > > This SmPL excerpt generates diff hunks on the standard output, as > -illustrated below: > +illustrated below:: > > -diff -u -p /home/user/linux/crypto/ctr.c /tmp/nothing > ---- /home/user/linux/crypto/ctr.c 2010-05-26 10:49:38.000000000 +0200 > -+++ /tmp/nothing > -@@ -185,7 +185,6 @@ static struct crypto_instance *crypto_ct > + diff -u -p /home/user/linux/crypto/ctr.c /tmp/nothing > + --- /home/user/linux/crypto/ctr.c 2010-05-26 10:49:38.000000000 +0= 200 > + +++ /tmp/nothing > + @@ -185,7 +185,6 @@ static struct crypto_instance *crypto_ct > alg =3D crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER, > CRYPTO_ALG_TYPE_MASK); > if (IS_ERR(alg)) > -- return ERR_PTR(PTR_ERR(alg)); > - > + - return ERR_PTR(PTR_ERR(alg)); > + > /* Block size must be >=3D 4 bytes. */ > err =3D -EINVAL; > > - Detailed description of the 'org' mode > -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +Detailed description of the ``org`` mode > +---------------------------------------- > + > +``org`` generates a report in the Org mode format of Emacs. > > -'org' generates a report in the Org mode format of Emacs. > +Example > +~~~~~~~ > > -Example: > +Running:: > > -Running > make coccicheck MODE=3Dorg COCCI=3Dscripts/coccinelle/api/err_cast.co= cci > > -will execute the following part of the SmPL script. > +will execute the following part of the SmPL script:: > > - > -@r depends on !context && !patch && (org || report)@ > -expression x; > -position p; > -@@ > + > + @r depends on !context && !patch && (org || report)@ > + expression x; > + position p; > + @@ > > - ERR_PTR@p(PTR_ERR(x)) > + ERR_PTR@p(PTR_ERR(x)) > > -@script:python depends on org@ > -p << r.p; > -x << r.x; > -@@ > + @script:python depends on org@ > + p << r.p; > + x << r.x; > + @@ > > -msg=3D"ERR_CAST can be used with %s" % (x) > -msg_safe=3Dmsg.replace("[","@(").replace("]",")") > -coccilib.org.print_todo(p[0], msg_safe) > - > + msg=3D"ERR_CAST can be used with %s" % (x) > + msg_safe=3Dmsg.replace("[","@(").replace("]",")") > + coccilib.org.print_todo(p[0], msg_safe) > + > > This SmPL excerpt generates Org entries on the standard output, as > -illustrated below: > +illustrated below:: > > -* TODO [[view:/home/user/linux/crypto/ctr.c::face=3Dovl-face1::linb=3D= 188::colb=3D9::cole=3D16][ERR_CAST can be used with alg]] > -* TODO [[view:/home/user/linux/crypto/authenc.c::face=3Dovl-face1::lin= b=3D619::colb=3D9::cole=3D16][ERR_CAST can be used with auth]] > -* TODO [[view:/home/user/linux/crypto/xts.c::face=3Dovl-face1::linb=3D= 227::colb=3D9::cole=3D16][ERR_CAST can be used with alg]] > + * TODO [[view:/home/user/linux/crypto/ctr.c::face=3Dovl-face1::lin= b=3D188::colb=3D9::cole=3D16][ERR_CAST can be used with alg]] > + * TODO [[view:/home/user/linux/crypto/authenc.c::face=3Dovl-face1:= :linb=3D619::colb=3D9::cole=3D16][ERR_CAST can be used with auth]] > + * TODO [[view:/home/user/linux/crypto/xts.c::face=3Dovl-face1::lin= b=3D227::colb=3D9::cole=3D16][ERR_CAST can be used with alg]] > diff --git a/Documentation/dev-tools/tools.rst b/Documentation/dev-tool= s/tools.rst > index 60ddb9e..ae0c58c 100644 > --- a/Documentation/dev-tools/tools.rst > +++ b/Documentation/dev-tools/tools.rst > @@ -14,3 +14,4 @@ whole; patches welcome! > .. toctree:: > :maxdepth: 2 > > + coccinelle > diff --git a/MAINTAINERS b/MAINTAINERS > index 20bb1d0..1e5460c 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -3124,7 +3124,7 @@ L: cocci@systeme.lip6.fr (moderated for non-subsc= ribers) > T: git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild.git= misc > W: http://coccinelle.lip6.fr/ > S: Supported > -F: Documentation/coccinelle.txt > +F: Documentation/dev-tools/coccinelle.rst > F: scripts/coccinelle/ > F: scripts/coccicheck > > --=20 Nicolas Palix http://lig-membres.imag.fr/palix/ --------------ms040709060101020009060107 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: Signature cryptographique S/MIME MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC CG8wggO2MIICnqADAgECAgEDMA0GCSqGSIb3DQEBBQUAMCwxCzAJBgNVBAYTAkZSMQ0wCwYD VQQKEwRDTlJTMQ4wDAYDVQQDEwVDTlJTMjAeFw0wOTAxMjEwOTAzNTJaFw0yOTAxMjAwOTAz NTJaMDUxCzAJBgNVBAYTAkZSMQ0wCwYDVQQKEwRDTlJTMRcwFQYDVQQDEw5DTlJTMi1TdGFu ZGFyZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJypZGq0ByMZw74ICMTiKl3t 1Cje/j+g7ZJEaxZHNRM3jXSp9U2D5AUbjwhhTN53W9ep/7tlncmsPA/xiXuTIqBHD18Gvo54 oAt510JlYXJjkkCKW2cQ+tYnPth3TR55229LEgBSWOLYQgWyMzd34I1sHbz49vKUWCX3gtmG 2Vzz2C7N/XCJBIfvOdEq2JKMaS8cUmX6YI8Qf8yP+VwuFO1Mi+CdN7jSPJTKUP1Bet72POyu 7L1cFt2w8HOZeoH/OzPSAJ5NjMZbOC4zw3aGynJU2y3iEP2SUGiThO13qYlpUYXr4JSj+ZcI EYwk8A+6OLQs1tdsTmP+tDGf74+mWqUCAwEAAaOB2TCB1jAPBgNVHRMBAf8EBTADAQH/MB0G A1UdDgQWBBQR49nRUkcbWbE8G3hma/ShiO0KWzBUBgNVHSMETTBLgBRQl7YN96wzF6/xHUY8 azv/AKDl5aEwpC4wLDELMAk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