<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/coccinelle/iterators, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-08-07T19:30:36+00:00</updated>
<entry>
<title>update Coccinelle URL</title>
<updated>2022-08-07T19:30:36+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@inria.fr</email>
</author>
<published>2022-08-07T16:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f01701cec8cbb94df209e9705b97abd01c151ba1'/>
<id>urn:sha1:f01701cec8cbb94df209e9705b97abd01c151ba1</id>
<content type='text'>
Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>drop fen.cocci</title>
<updated>2022-01-15T11:15:35+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@inria.fr</email>
</author>
<published>2021-12-26T10:36:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3cdb8e995ee2e393b66d2abe156b90475009ec41'/>
<id>urn:sha1:3cdb8e995ee2e393b66d2abe156b90475009ec41</id>
<content type='text'>
This semantic patch does not take into account the fact that of_node_put
can be safely applied to NULL.  Thus it gives only false positives.
Drop it.

Reported-by: Qing Wang &lt;wangqing@vivo.com&gt;
Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>scripts: coccinelle: allow list_entry_is_head() to use pos</title>
<updated>2021-08-08T20:00:49+00:00</updated>
<author>
<name>Daniel Thompson</name>
<email>daniel.thompson@linaro.org</email>
</author>
<published>2021-07-30T09:58:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/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: iterators: Add for_each_child.cocci script</title>
<updated>2020-10-15T20:28:10+00:00</updated>
<author>
<name>Sumera Priyadarsini</name>
<email>sylphrenadin@gmail.com</email>
</author>
<published>2020-10-15T10:51:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=82c2d81361ecd142a54e84a9da1e287113314a4f'/>
<id>urn:sha1:82c2d81361ecd142a54e84a9da1e287113314a4f</id>
<content type='text'>
While iterating over child nodes with the for_each functions, if
control is transferred from the middle of the loop, as in the case
of a break or return or goto, there is no decrement in the
reference counter thus ultimately resulting in a memory leak.

Add this script to detect potential memory leaks caused by
the absence of of_node_put() before break, goto, or, return
statements which transfer control outside the loop.

Signed-off-by: Sumera Priyadarsini &lt;sylphrenadin@gmail.com&gt;
Signed-off-by: Julia Lawall &lt;julia.lawall@inria.fr&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505</title>
<updated>2019-06-19T15:11:22+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-06-04T08:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f904d7e1f3ec7c2de47c024a5a5c30988b54703'/>
<id>urn:sha1:7f904d7e1f3ec7c2de47c024a5a5c30988b54703</id>
<content type='text'>
Based on 1 normalized pattern(s):

  gplv2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 58 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081207.556988620@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts: coccinelle: check for redeclaration</title>
<updated>2019-01-06T00:46:51+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2018-12-28T14:49:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dc7884f34a5da79c61a9443c465a99512dc7bb15'/>
<id>urn:sha1:dc7884f34a5da79c61a9443c465a99512dc7bb15</id>
<content type='text'>
Avoid reporting on the use of an iterator index variable when
the variable is redeclared.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: use exists to improve efficiency</title>
<updated>2017-11-14T14:21:16+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2017-11-12T15:02:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6851ba1a1b22ba2e0800002d531bf04ced22ec18'/>
<id>urn:sha1:6851ba1a1b22ba2e0800002d531bf04ced22ec18</id>
<content type='text'>
This just needs to find any reassignment of the loop iterator, and doesn't
need such a thing on all execution paths, so use exists on the first rule.

Signed-off-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>scripts/coccinelle: require coccinelle &gt;= 1.0.4 on device_node_continue.cocci</title>
<updated>2016-07-22T10:13:39+00:00</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc65e823363834a7ff0a2eca9bef2bbef64135f7'/>
<id>urn:sha1:cc65e823363834a7ff0a2eca9bef2bbef64135f7</id>
<content type='text'>
Make use of the new Requires: tag to be able to specify coccinelle binary
version requirements. The cocci file device_node_continue.cocci requires at
least coccinelle 1.0.4.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&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>scripts/coccinelle: modernize &amp;</title>
<updated>2016-02-18T10:49:30+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-02-17T23:16:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b669e713f277a4d4b3cec84e13d16544ac8286d'/>
<id>urn:sha1:1b669e713f277a4d4b3cec84e13d16544ac8286d</id>
<content type='text'>
&amp; is no longer allowed in column 0, since Coccinelle 1.0.4.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Tested-by: Nishanth Menon &lt;nm@ti.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>cocinelle: iterators: semantic patch to delete unneeded of_node_put</title>
<updated>2015-10-26T21:39:11+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2015-10-22T20:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=41167d072b8626ed14e80241c71beb99ac65db53'/>
<id>urn:sha1:41167d072b8626ed14e80241c71beb99ac65db53</id>
<content type='text'>
Device node iterators perform an of_node_put on each iteration, so putting
an of_node_put before a continue results in a double put.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
</feed>
