<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/coccicheck, branch v4.9.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-10-11T07:50:43Z</updated>
<entry>
<title>scripts/coccicheck: Update reference for the corresponding documentation</title>
<updated>2016-10-11T07:50:43Z</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2016-10-07T14:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1e01892e7ad521a96760da0d791b42badf755d3f'/>
<id>urn:sha1:1e01892e7ad521a96760da0d791b42badf755d3f</id>
<content type='text'>
Use the current name (in a comment at the beginning of this script) for
the file which was converted to the documentation format "reStructuredText"
in August 2016.

Fixes: 4b9033a33494 ("docs: sphinxify coccinelle.txt and add it to dev-tools")
Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: refer to Documentation/coccinelle.txt and wiki</title>
<updated>2016-07-22T10:13:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c100d537b9a088caddb4e355847986b439b017c2'/>
<id>urn:sha1:c100d537b9a088caddb4e355847986b439b017c2</id>
<content type='text'>
Refer to the Documentation/coccinelle.txt and supplemental documentation
on the wiki:

https://bottest.wiki.kernel.org/coccicheck

This page shall always refer to the linux-next iteration of scripts/coccicheck.

v4: only refer to the wiki as supplemental documentation, and also
    update Documentation/coccinelle.txt.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: add support for requring a coccinelle version</title>
<updated>2016-07-22T10:13:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a9e064c00413fb59e7236be81578024ab0ebe6b2'/>
<id>urn:sha1:a9e064c00413fb59e7236be81578024ab0ebe6b2</id>
<content type='text'>
Enable Coccinelle SmPL patches to require a specific version of
Coccinelle. In the event that the version does not match we just
inform the user, if the user asked to go through all SmPL patches
we just inform them of the need for a new version of coccinelle for
the SmPL patch and continue on with the rest.

This uses the simple kernel scripts/ld-version.sh to create a weight
on the version provided by spatch. The -dirty attribute is ignored if
supplied, the benefit of scripts/ld-version.sh is it has a long history
and well tested.

While at it, document the // Options stuff as well.

v4: Document // Options and // Requires as well on
    Documentation/coccinelle.txt.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: replace --very-quiet with --quiet when debugging</title>
<updated>2016-07-22T10:13:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5c384dba979f7aa57d1f09a6ca1a7cd486e7caba'/>
<id>urn:sha1:5c384dba979f7aa57d1f09a6ca1a7cd486e7caba</id>
<content type='text'>
When debugging (using --profile or --show-trying) you want to
avoid supressing output,  use --quiet instead. While at it, extend
documentation for SPFLAGS use.

For instance one can use:

$ export COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci
$ make coccicheck DEBUG_FILE="poo.err" MODE=report SPFLAGS="--profile --show-trying" M=./drivers/mfd/arizona-irq.c

Expand Documentation/coccinelle.txt as well.

v4: expand Documentation/coccinelle.txt
v3: rebased, resolve conflicts, expand Documentation/coccinelle.txt
v2: use egrep instead of the *"=--option"* check, this doesn't work for
    disjunctions.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: add support for DEBUG_FILE</title>
<updated>2016-07-22T10:13:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=be1fa90066644c5a7fdf4a08767c4a359f95096f'/>
<id>urn:sha1:be1fa90066644c5a7fdf4a08767c4a359f95096f</id>
<content type='text'>
Enable to capture stderr via a DEBUG_FILE variable passed to
coccicheck. You can now do:

$ rm -f cocci.err
$ export COCCI=scripts/coccinelle/free/kfree.cocci
$ make coccicheck MODE=report DEBUG_FILE=cocci.err
...
$ cat cocci.err

This will be come more useful once we add support to
use more things which would go into stderr, such as
profiling. That will be done separately in another
commit.

Expand Documentation/coccinelle.txt with details.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: enable parmap support</title>
<updated>2016-07-22T10:13:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c930a1b23bb7a22439cf505db130a8db60e22688'/>
<id>urn:sha1:c930a1b23bb7a22439cf505db130a8db60e22688</id>
<content type='text'>
Coccinelle has had parmap support since 1.0.2, this means
it supports --jobs, enabling built-in multithreaded functionality,
instead of needing one to script it out. Just look for --jobs
in the help output to determine if this is supported and use it
only if your number of processors detected is &gt; 1.

If parmap is enabled also enable the load balancing to be dynamic, so
that if a thread finishes early we keep feeding it.

stderr is currently sent to /dev/null, addressing a way to capture
that will be addressed next.

If --jobs is not supported we fallback to the old mechanism.
We expect to deprecate the old mechanism as soon as we can get
confirmation all users are ready.

While at it propagate back into the shell script any coccinelle error
code. When used in serialized mode where all cocci files are run this
also stops processing if an error has occured. This lets us handle some
errors in coccinelle cocci files and if they bail out we should inspect
the errors. This will be more useful later to help annotate coccinelle
version dependency requirements. This will let you run only SmPL files
that your system supports.

Extend Documentation/coccinelle.txt as well.

As a small example, prior to this change, on an 8-core system:

Before:

$ export COCCI=scripts/coccinelle/free/kfree.cocci
$ time make coccicheck MODE=report
...

real    29m14.912s
user    103m1.796s
sys     0m4.464s

After:

real    16m22.435s
user    128m30.060s
sys     0m2.712s

v4:

o expand Documentation/coccinelle.txt to reflect parmap support info
o update commit log to reflect what we actually do now with stderr
o split out DEBUG_FILE use into another patch
o detect number of CPUs and if its 1 then skip parmap support,
  note that if you still support parmap, but have 1 CPU you will
  also go through the new branches, so the old complex multithreaded process
  is skipped as well.

v3:

o move USE_JOBS to avoid being overriden

v2:

o redirect coccinelle stderr to /dev/null by default and
  only if DEBUG_FILE is used do we pass it to a file
o fix typo of paramap/parmap

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: make SPFLAGS more useful</title>
<updated>2016-07-22T10:13:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8e826ad52b751ca34d5153533f4f58ec38cf4799'/>
<id>urn:sha1:8e826ad52b751ca34d5153533f4f58ec38cf4799</id>
<content type='text'>
SPFLAGS is set early, it means that any heuristics done on
coccicheck cannot be overridden currently. Move SPFLAGS
after OPTIONS and set this at the end. This lets you override
any heuristics as coccinelle treats conflicts by only listening
to the last option that makes sense.

v3: this patch was added in the v3 series
v4: Update Documentation/coccinelle.txt explaining how
    SPFLAGS works as well.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: move spatch binary check up</title>
<updated>2016-07-22T10:13:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=13d948653372987388a09c259758abd44ed6e7f2'/>
<id>urn:sha1:13d948653372987388a09c259758abd44ed6e7f2</id>
<content type='text'>
This has no functional changes. This is being done
to enable us to later use spatch binary for some
flag checking for certain features early on.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: Allow for overriding spatch flags</title>
<updated>2016-06-20T20:08:13Z</updated>
<author>
<name>Deepa Dinamani</name>
<email>deepa.kernel@gmail.com</email>
</author>
<published>2016-06-12T19:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7a2358b3818691521c7df531415d1ea4d0398520'/>
<id>urn:sha1:7a2358b3818691521c7df531415d1ea4d0398520</id>
<content type='text'>
Documentation/coccinelle.txt suggests using the SPFLAGS
make variable to pass additional options to spatch.

Reorder the way SPFLAGS is added to FLAGS, to allow
for options in the SPFLAGS to override the default
--very-quiet option.

Similarly, rearrage the FLAGS for org or report mode.
This allows for overriding of the default --no-show-diff
option through SPFLAGS.

Signed-off-by: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
Cc: Gilles Muller &lt;Gilles.Muller@lip6.fr&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: Fix missing 0 index in kill loop</title>
<updated>2016-05-19T07:56:59Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2016-05-16T12:55:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2552a39facb6609007a02eeda5d5edee4fcaca30'/>
<id>urn:sha1:2552a39facb6609007a02eeda5d5edee4fcaca30</id>
<content type='text'>
By default, "seq" counts from 1, but processes were starting counting
from 0, so when interrupted, coccicheck would leave the 0th process
running.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
</feed>
