<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/coccinelle, branch v5.15.27</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.27</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.27'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-08-08T20:00:49Z</updated>
<entry>
<title>scripts: coccinelle: allow list_entry_is_head() to use pos</title>
<updated>2021-08-08T20:00:49Z</updated>
<author>
<name>Daniel Thompson</name>
<email>daniel.thompson@linaro.org</email>
</author>
<published>2021-07-30T09:58:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e71ec0bc06038cdfa18cbd23f5cea71fe4785d35'/>
<id>urn:sha1:e71ec0bc06038cdfa18cbd23f5cea71fe4785d35</id>
<content type='text'>
Currently use_after_iter.cocci generates false positives for code of the
following form:
~~~
	list_for_each_entry(d, &amp;ddata-&gt;irq_list, node) {
		if (irq == d-&gt;irq)
			break;
	}

	if (list_entry_is_head(d, &amp;ddata-&gt;irq_list, node))
		return IRQ_NONE;
~~~
[This specific example comes from drivers/power/supply/cpcap-battery.c]

Most list macros use list_entry_is_head() as loop exit condition meaning it
is not unsafe to reuse pos (a.k.a. d) in the code above.

Let's avoid reporting these cases.

Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>coccinelle: api: rename kzfree to kfree_sensitive</title>
<updated>2021-08-05T11:01:09Z</updated>
<author>
<name>Weizhao Ouyang</name>
<email>o451686892@gmail.com</email>
</author>
<published>2021-08-05T09:58:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9eec0792024983276871baeb201609abb07dd35d'/>
<id>urn:sha1:9eec0792024983276871baeb201609abb07dd35d</id>
<content type='text'>
Commit 453431a54934 ("mm, treewide: rename kzfree() to
kfree_sensitive()") renamed kzfree() to kfree_sensitive(),
it should be applied to coccinelle.

Signed-off-by: Weizhao Ouyang &lt;o451686892@gmail.com&gt;
Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Acked-by: Denis Efremov &lt;efremov@linux.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: api: remove kobj_to_dev.cocci script</title>
<updated>2021-06-21T18:45:49Z</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2021-06-21T17:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5e5234462756a39e56f4182694f47ec72b5abe52'/>
<id>urn:sha1:5e5234462756a39e56f4182694f47ec72b5abe52</id>
<content type='text'>
Using kobj_to_dev() instead of container_of() is not universally
accepted among maintainers as an improvement. The warning leads to
repeated patch submissions that won't be accepted. Remove the script.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Denis Efremov &lt;efremov@linux.com&gt;
Cc: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Acked-by: Denis Efremov &lt;efremov@linux.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: misc: minmax: suppress patch generation for err returns</title>
<updated>2021-05-01T19:27:10Z</updated>
<author>
<name>Denis Efremov</name>
<email>efremov@linux.com</email>
</author>
<published>2021-04-28T06:03:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=aeb300c1dbfc77b493728f608dd14d6814676546'/>
<id>urn:sha1:aeb300c1dbfc77b493728f608dd14d6814676546</id>
<content type='text'>
There is a standard idiom for "if 'ret' holds an error, return it":
	return ret &lt; 0 ? ret : 0;

Developers prefer to keep the things as they are because stylistic
change to "return min(ret, 0);" breaks readability.

Let's suppress automatic generation for this type of patches.

Signed-off-by: Denis Efremov &lt;efremov@linux.com&gt;
</content>
</entry>
<entry>
<title>drop unneeded *s</title>
<updated>2021-05-01T19:23:57Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@inria.fr</email>
</author>
<published>2021-04-28T07:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=32c465613959248a8db8a1458d65a266411ddccc'/>
<id>urn:sha1:32c465613959248a8db8a1458d65a266411ddccc</id>
<content type='text'>
Kfree.cocci only supports org and report mode, so the *s (used for
context mode) are not useful.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>coccinelle: irqf_oneshot: reduce the severity due to false positives</title>
<updated>2021-05-01T19:23:57Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@canonical.com</email>
</author>
<published>2021-04-23T10:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5d2db9bb5f8a850d037983f0df72ad59cefa9e3d'/>
<id>urn:sha1:5d2db9bb5f8a850d037983f0df72ad59cefa9e3d</id>
<content type='text'>
The IRQF_ONESHOT should be present for threaded IRQ using default
primary handler.  However intetrupt of many child devices, e.g. children
of MFD, is nested thus the IRQF_ONESHOT is not needed.  The coccinelle
message about error misleads submitters and reviewers about the severity
of the issue, so make it a warning and mention possible false positive.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>coccinelle: misc: add swap script</title>
<updated>2021-05-01T19:23:56Z</updated>
<author>
<name>Denis Efremov</name>
<email>efremov@linux.com</email>
</author>
<published>2021-03-05T10:09:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7845daa8bd72efa8bbc1de122edfce6e058bbe41'/>
<id>urn:sha1:7845daa8bd72efa8bbc1de122edfce6e058bbe41</id>
<content type='text'>
Check for opencoded swap() implementation.

Signed-off-by: Denis Efremov &lt;efremov@linux.com&gt;
Signed-off-by: Julia Lawall &lt;julia.lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>coccinelle: misc: update uninitialized_var.cocci documentation</title>
<updated>2021-05-01T19:23:56Z</updated>
<author>
<name>Denis Efremov</name>
<email>efremov@linux.com</email>
</author>
<published>2021-03-08T07:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cb62732d3bf0cd4c136d5927b003f002ff658e1c'/>
<id>urn:sha1:cb62732d3bf0cd4c136d5927b003f002ff658e1c</id>
<content type='text'>
Remove the documentation link from the warning message because commit
3942ea7a10c9 ("deprecated.rst: Remove now removed uninitialized_var")
removed the section from documentation. Update the rule documentation
accordingly.

Signed-off-by: Denis Efremov &lt;efremov@linux.com&gt;
Signed-off-by: Julia Lawall &lt;julia.lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>coccinelle: misc: restrict patch mode in flexible_array.cocci</title>
<updated>2021-05-01T19:23:56Z</updated>
<author>
<name>Denis Efremov</name>
<email>efremov@linux.com</email>
</author>
<published>2021-03-08T19:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3afb532b19df3238dede98b184bc8852517f206a'/>
<id>urn:sha1:3afb532b19df3238dede98b184bc8852517f206a</id>
<content type='text'>
Skip patches generation for structs with a single field.
Changing a zero-length array to a flexible array member in a struct
with no named members breaks the compilation. However, reporting
such cases is still valuable, e.g. commit 637464c59e0b
("ACPI: NFIT: Fix flexible_array.cocci warnings").

Signed-off-by: Denis Efremov &lt;efremov@linux.com&gt;
Signed-off-by: Julia Lawall &lt;julia.lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>coccinelle: misc: add minmax script</title>
<updated>2021-05-01T19:23:56Z</updated>
<author>
<name>Denis Efremov</name>
<email>efremov@linux.com</email>
</author>
<published>2021-03-09T06:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408'/>
<id>urn:sha1:5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408</id>
<content type='text'>
Check for opencoded min(), max() implementations.

Signed-off-by: Denis Efremov &lt;efremov@linux.com&gt;
Signed-off-by: Julia Lawall &lt;julia.lawall@inria.fr&gt;
</content>
</entry>
</feed>
