<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/coccinelle/misc, branch v3.18</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=v3.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-09-26T11:42:31Z</updated>
<entry>
<title>coccinelle: misc: semantic patch to delete overly complex return code processing</title>
<updated>2014-09-26T11:42:31Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2014-08-23T05:34:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=932058a5d5f9fd919b90aaa2275d54b37340d585'/>
<id>urn:sha1:932058a5d5f9fd919b90aaa2275d54b37340d585</id>
<content type='text'>
This semantic patch simplifies cases where the effect of the processing of
a function call's return code is just to return the result of the function
directly.  It may also delete a local return flag variable, if this is no
longer used.

This was proposed by Uwe Kleine-König.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>Coccinelle: Script to replace if and BUG with BUG_ON</title>
<updated>2014-08-06T10:10:17Z</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-07-20T21:36:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5be1df668a40cc0a49bc26023fffc537fae1778e'/>
<id>urn:sha1:5be1df668a40cc0a49bc26023fffc537fae1778e</id>
<content type='text'>
This script detects cases where BUG() follows an if condition on an
expression and replaces the if condition and BUG() with a BUG_ON having
the conditional expression of the if statement as argument.

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>Coccinelle: Script to detect incorrect argument to sizeof</title>
<updated>2014-08-06T10:10:17Z</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-07-14T17:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e52320c3b20cbe209e98f2443866209120595636'/>
<id>urn:sha1:e52320c3b20cbe209e98f2443866209120595636</id>
<content type='text'>
This makes an effort to find cases where the argument to sizeof is wrong
in memory allocation functions by checking the type of the allocated
memory when it is a double pointer and ensuring the sizeof argument takes
a pointer to the the memory being allocated. There are false positives
in cases the sizeof argument is not used in constructing the return value.

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>Coccinelle: Script to use ARRAY_SIZE instead of division of two sizeofs</title>
<updated>2014-08-06T10:10:17Z</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-06-29T07:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ab04ea0e32cf8cabcbc33cefac36e5f9258734e'/>
<id>urn:sha1:7ab04ea0e32cf8cabcbc33cefac36e5f9258734e</id>
<content type='text'>
This script detects cases where ARRAY_SIZE can be used such as
where there is a division of sizeof the array by the sizeof its first
element or by any indexed element or the element type. It replaces the
division of the two sizeofs by ARRAY_SIZE.

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>coccicheck: Add unneeded return variable test</title>
<updated>2014-06-10T12:36:30Z</updated>
<author>
<name>Peter Senna Tschudin</name>
<email>peter.senna@gmail.com</email>
</author>
<published>2014-06-01T18:12:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=90829adb4a8ea3b007bd8c63f5b54fddb7972bec'/>
<id>urn:sha1:90829adb4a8ea3b007bd8c63f5b54fddb7972bec</id>
<content type='text'>
This semantic patch looks for variables that are initialized with a
constant, are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>coccinelle: Check for missing NULL terminators in of_device_id tables</title>
<updated>2014-06-09T21:39:16Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2014-06-03T18:25:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d5c5dbb48253f1729dc09f266a98bd2d7e694cb'/>
<id>urn:sha1:2d5c5dbb48253f1729dc09f266a98bd2d7e694cb</id>
<content type='text'>
Failure to terminate an of_device_id table can lead to confusing
failures depending on where the compiler places the array. Add a
check to make sure these tables are terminated. Thanks to Mitchel
Humpherys for coming up with the pattern initially.

Cc: Mitchel Humpherys &lt;mitchelh@codeaurora.org&gt;
Cc: Gilles Muller &lt;Gilles.Muller@lip6.fr&gt;
Cc: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: devicetree@vger.kernel.org
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Signed-off-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>Coccicheck: Remove memcpy to struct assignment test</title>
<updated>2014-03-29T20:35:09Z</updated>
<author>
<name>Peter Senna Tschudin</name>
<email>peter.senna@gmail.com</email>
</author>
<published>2014-03-18T21:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a830dad5e3ceffc1f12f3e674322182d809e3a9'/>
<id>urn:sha1:0a830dad5e3ceffc1f12f3e674322182d809e3a9</id>
<content type='text'>
The Coccinelle script scripts/coccinelle/misc/memcpy-assign.cocci look
for opportunities to replace a call to memcpy by a struct assignment.
This patch removes memcpy-assign.cocci as it is not clear that this
convention has an impact on the generated code.

Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>coccinelle: replace 0/1 with false/true in functions returning bool</title>
<updated>2013-08-13T20:43:41Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2013-08-11T21:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=46b5c9b856e8bcb44d8570cc55c46d19ca2428ff'/>
<id>urn:sha1:46b5c9b856e8bcb44d8570cc55c46d19ca2428ff</id>
<content type='text'>
This semantic patch replaces "return {0,1};" with "return
{false,true};" in functions returning bool.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>Coccinelle: Update the options used to the new option scheme</title>
<updated>2013-07-03T20:58:13Z</updated>
<author>
<name>Nicolas Palix</name>
<email>nicolas.palix@imag.fr</email>
</author>
<published>2013-06-20T11:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93f14468491747d6d3efd0b3a42785b1d51a127a'/>
<id>urn:sha1:93f14468491747d6d3efd0b3a42785b1d51a127a</id>
<content type='text'>
spatch has changed its option scheme.
E.g., --no_show_diff is now --no-show-diff

This patch updates:
 - scripts/coccicheck
 - Semantic patches under scripts/coccinelle/

Signed-off-by: Nicolas Palix &lt;nicolas.palix@imag.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>scripts/coccinelle: find constant additions that could be bit ors</title>
<updated>2013-02-22T13:26:00Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2013-02-02T16:19:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24f0c2d6ff859fbca45fd765f0d241528bdb4365'/>
<id>urn:sha1:24f0c2d6ff859fbca45fd765f0d241528bdb4365</id>
<content type='text'>
Semantic patch (http://coccinelle.lip6.fr/) to check for constants that are
added but are used elsewhere as bitmasks.

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