<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/coccinelle, branch v4.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-12-11T11:08:26Z</updated>
<entry>
<title>Coccinelle: misc: Add support for devm variant in all modes</title>
<updated>2016-12-11T11:08:26Z</updated>
<author>
<name>Vaishali Thakkar</name>
<email>vaishali.thakkar@oracle.com</email>
</author>
<published>2016-11-23T08:46:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d1e774f49f0305092c9975d9070aefe318f49872'/>
<id>urn:sha1:d1e774f49f0305092c9975d9070aefe318f49872</id>
<content type='text'>
Add missing support for the devm_request_threaded_irq in
the rules of context, report and org modes.

Misc:
----
To be consistent with other scripts, change confidence level
of the script to 'Moderate'.

Signed-off-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&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>Coccinelle: misc: Improve the result given by context mode</title>
<updated>2016-12-11T11:08:26Z</updated>
<author>
<name>Vaishali Thakkar</name>
<email>vaishali.thakkar@oracle.com</email>
</author>
<published>2016-11-23T08:46:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35b303ae361611a6b418e385fee06fa08732b2e6'/>
<id>urn:sha1:35b303ae361611a6b418e385fee06fa08732b2e6</id>
<content type='text'>
To eliminate false positives given by the context mode, add
necessary arguments for the function request_threaded_irq.

Signed-off-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&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>Coccinelle: misc: Improve the matching of rules</title>
<updated>2016-12-11T11:08:26Z</updated>
<author>
<name>Vaishali Thakkar</name>
<email>vaishali.thakkar@oracle.com</email>
</author>
<published>2016-11-23T08:46:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dca24c4544d96989f521b5aa49fd44ae0ae5a5b6'/>
<id>urn:sha1:dca24c4544d96989f521b5aa49fd44ae0ae5a5b6</id>
<content type='text'>
Currently because of the left associativity of the operators, pattern
IRQF_ONESHOT | flags does not match with the pattern when we have more
than one flag after the disjunction. This eventually results in giving
false positives by the script. This patch eliminates these FPs by
improving the rule.

Signed-off-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>Coccinelle: Add misc/boolconv.cocci</title>
<updated>2016-12-11T11:07:00Z</updated>
<author>
<name>Andrew F. Davis</name>
<email>afd@ti.com</email>
</author>
<published>2016-10-17T16:52:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75238b9e6aadca6d9255d4b385e026385e78bb15'/>
<id>urn:sha1:75238b9e6aadca6d9255d4b385e026385e78bb15</id>
<content type='text'>
Add a script to check for unneeded conversions to bool.

Signed-off-by: Andrew F. Davis &lt;afd@ti.com&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>Coccinelle: flag conditions with no effect</title>
<updated>2016-10-11T07:57:17Z</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2016-10-08T15:51:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8990359d4b12f14656386526ddf904635076902'/>
<id>urn:sha1:c8990359d4b12f14656386526ddf904635076902</id>
<content type='text'>
Report code constructs where the if and else branch are functionally
identical. In cases where this is intended it really should be
documented - most reported cases probably are bugs.

Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>Coccinelle: pm_runtime: ensure relevance of pm_runtime reports</title>
<updated>2016-10-01T21:03:41Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-09-22T08:28:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d97629f1686574a800a76eb0d2ce65e3f3d3ef92'/>
<id>urn:sha1:d97629f1686574a800a76eb0d2ce65e3f3d3ef92</id>
<content type='text'>
pm_runtime.cocci starts with one rule that searches for a variety of
functions calls, followed by various rules that report errors.  Previously,
the only connection between the first rule and the rest was to check that
the first rule had matched somewhere.  Change the rules to propagate a
position from the first rule to the others, to make sure that the sites
reported on are the same as the sites that were identified as having the
relevant functions.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>Coccinelle: limit memdup_user transformation to GFP_KERNEL case</title>
<updated>2016-10-01T21:03:09Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-09-21T15:48:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43d96390d57aa0e61d15ce2bcb887df8516d58f5'/>
<id>urn:sha1:43d96390d57aa0e61d15ce2bcb887df8516d58f5</id>
<content type='text'>
Memdup_user encapsulates a memory allocation with the flag GFP_KERNEL, so
only allow this flag in the original code.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.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:39Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2016-06-29T22:14:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>coccinelle: catch krealloc() on devm_*() allocated memory</title>
<updated>2016-06-21T09:43:32Z</updated>
<author>
<name>Yann Droneaud</name>
<email>ydroneaud@opteya.com</email>
</author>
<published>2016-05-23T15:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7b2ee41f300b69c67c798df0cd5b8648bcb26a3'/>
<id>urn:sha1:b7b2ee41f300b69c67c798df0cd5b8648bcb26a3</id>
<content type='text'>
krealloc() must not be used against devm_*() allocated
memory regions:

- if a bigger memory is to be allocated, krealloc() and
  __krealloc() could return a different pointer than the
  one given to them, creating a memory region which is not
  managed, thus it will not be automatically released on
  device removal.

- if a bigger memory is to be allocated, krealloc() could
  kfree() the managed memory region which is passed to it.
  The old pointer is left registered as a resource for the
  device. On device removal, this dangling pointer will be
  used and an unrelated memory region could be released.

- if the requested size is equal to 0, krealloc() can also
  just behave like kfree(). Here too, the old pointer is
  kept associated with the device. On device removal, this
  invalid pointer will be used and an unrelated memory
  region could be released.

For all these reasons, krealloc() must not be used on a
pointer returned by devm_*() functions.

Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: recognize more devm_* memory allocation functions</title>
<updated>2016-06-21T09:43:32Z</updated>
<author>
<name>Yann Droneaud</name>
<email>ydroneaud@opteya.com</email>
</author>
<published>2016-05-23T15:07:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a720c0644d14011d3a1bcc8d1b36e80571ad2ce1'/>
<id>urn:sha1:a720c0644d14011d3a1bcc8d1b36e80571ad2ce1</id>
<content type='text'>
Updates free/devm_free.cocci to recognize functions added by:

- commit 64c862a839a8 ('devres: add kernel standard devm_k.alloc functions')
- commit e31108cad3de ('devres: introduce API "devm_kstrdup"')
- commit 3046365bb470 ('devres: introduce API "devm_kmemdup')
- commit 43339bed7010 ('devres: Add devm_get_free_pages API')
- commit 75f2a4ead5d5 ('devres: Add devm_kasprintf and devm_kvasprintf API')

See also Documentation/driver-model/devres.txt

Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Manish Badarkhe &lt;badarkhe.manish@gmail.com&gt;
Cc: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Cc: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Cc: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Cc: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Cc: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
</feed>
