<feed xmlns='http://www.w3.org/2005/Atom'>
<title>litmus-rt.git/scripts/coccinelle, branch test</title>
<subtitle>The LITMUS^RT kernel.</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/'/>
<entry>
<title>scripts/coccinelle/misc/bugon.cocci: update bug_on conversion warning</title>
<updated>2015-04-15T12:21:31+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-04-09T20:58:04+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=33236415ece63d5689411f3ddb676eeb93af2698'/>
<id>33236415ece63d5689411f3ddb676eeb93af2698</id>
<content type='text'>
if()/BUG conversion to BUG_ON must be avoided when there's side effect
in condition. The reason being BUG_ON won't execute the condition when
CONFIG_BUG is not defined.

Inspired-by: J. Bruce Fields &lt;bfields@fieldses.org&gt;
Suggested-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if()/BUG conversion to BUG_ON must be avoided when there's side effect
in condition. The reason being BUG_ON won't execute the condition when
CONFIG_BUG is not defined.

Inspired-by: J. Bruce Fields &lt;bfields@fieldses.org&gt;
Suggested-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>irqf_oneshot.cocci: add check of devm_request_threaded_irq()</title>
<updated>2015-03-25T10:58:10+00:00</updated>
<author>
<name>Valentin Rothberg</name>
<email>valentinrothberg@gmail.com</email>
</author>
<published>2015-03-04T08:32:32+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=2c2b913d19e149bf7c4ae5f62634fc3b46a06306'/>
<id>2c2b913d19e149bf7c4ae5f62634fc3b46a06306</id>
<content type='text'>
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

Until now, this coccinelle script only checked request_threaded_irq().
However, the counterpart devm function (see kernel/irq/devres.c) is also
affected by the missing flag which can be detected with this patch.

Signed-off-by: Valentin Rothberg &lt;valentinrothberg@gmail.com&gt;
Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

Until now, this coccinelle script only checked request_threaded_irq().
However, the counterpart devm function (see kernel/irq/devres.c) is also
affected by the missing flag which can be detected with this patch.

Signed-off-by: Valentin Rothberg &lt;valentinrothberg@gmail.com&gt;
Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild</title>
<updated>2014-12-20T21:33:03+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-12-20T21:33:03+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=787140ad6bb49422e2f114e9b8df18b242df00db'/>
<id>787140ad6bb49422e2f114e9b8df18b242df00db</id>
<content type='text'>
Pull misc kbuild changes from Michal Marek:
 "There are only a few things in the misc branch:

   - Fix for bugon.cocci semantic patch
   - Kdevelop4 files are .gitignored
   - Put make binrpm-pkg on diet"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts/package: binrpm-pkg do not create source and devel package
  .gitignore: Add Kdevelop4 project files
  bugon.cocci: fix Options at the macro
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull misc kbuild changes from Michal Marek:
 "There are only a few things in the misc branch:

   - Fix for bugon.cocci semantic patch
   - Kdevelop4 files are .gitignored
   - Put make binrpm-pkg on diet"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts/package: binrpm-pkg do not create source and devel package
  .gitignore: Add Kdevelop4 project files
  bugon.cocci: fix Options at the macro
</pre>
</div>
</content>
</entry>
<entry>
<title>bugon.cocci: fix Options at the macro</title>
<updated>2014-11-24T21:04:27+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2014-10-28T17:18:24+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=7426977c8efeaedf0a7ca00e1c1a5f52ef6b950f'/>
<id>7426977c8efeaedf0a7ca00e1c1a5f52ef6b950f</id>
<content type='text'>
The comma after --no-includes makes coccinelle to not run the script:

/usr/bin/spatch -D report --very-quiet --no-show-diff --cocci-file ./scripts/coccinelle/misc/bugon.cocci --no-includes, --include-headers --patch . --dir drivers/media/platform/coda/ -I ./arch/x86/include -I arch/x86/include/generated -I include -I ./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I include/generated/uapi -I ./include/linux/kconfig.h
Usage: spatch.opt --sp-file &lt;SP&gt; &lt;infile&gt; [-o &lt;outfile&gt;] [--iso-file &lt;iso&gt;] [options]
Options are:
  --sp-file                    &lt;file&gt; the semantic patch file
  -o                           &lt;file&gt; the output file
  --in-place                   do the modification on the file directly
  --backup-suffix              suffix to use when making a backup for inplace
...

At least with Fedora 20 coccinelle package:
	coccinelle-1.0.0-0.rc20.1.fc21.x86_64

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Tested-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 5be1df66 (Coccinelle: Script to replace if and BUG with BUG_ON)
Cc: stable@vger.kernel.org
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The comma after --no-includes makes coccinelle to not run the script:

/usr/bin/spatch -D report --very-quiet --no-show-diff --cocci-file ./scripts/coccinelle/misc/bugon.cocci --no-includes, --include-headers --patch . --dir drivers/media/platform/coda/ -I ./arch/x86/include -I arch/x86/include/generated -I include -I ./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I include/generated/uapi -I ./include/linux/kconfig.h
Usage: spatch.opt --sp-file &lt;SP&gt; &lt;infile&gt; [-o &lt;outfile&gt;] [--iso-file &lt;iso&gt;] [options]
Options are:
  --sp-file                    &lt;file&gt; the semantic patch file
  -o                           &lt;file&gt; the output file
  --in-place                   do the modification on the file directly
  --backup-suffix              suffix to use when making a backup for inplace
...

At least with Fedora 20 coccinelle package:
	coccinelle-1.0.0-0.rc20.1.fc21.x86_64

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Tested-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 5be1df66 (Coccinelle: Script to replace if and BUG with BUG_ON)
Cc: stable@vger.kernel.org
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>coccinelle: api: add spatch to prevent unnecessary .owner</title>
<updated>2014-11-06T23:16:02+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2014-10-28T16:40:43+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=1f648f88cea7f9b16ea8964cd81b92fb08df75a5'/>
<id>1f648f88cea7f9b16ea8964cd81b92fb08df75a5</id>
<content type='text'>
There are calls which silently set the owner of a module. This is the
preferred way [1], so avoid setting it manually. Currently, we only care
about platform drivers, but there might be more calls to be added later.

[1] https://lkml.org/lkml/2014/10/12/87

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are calls which silently set the owner of a module. This is the
preferred way [1], so avoid setting it manually. Currently, we only care
about platform drivers, but there might be more calls to be added later.

[1] https://lkml.org/lkml/2014/10/12/87

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>coccinelle: misc: semantic patch to delete overly complex return code processing</title>
<updated>2014-09-26T11:42:31+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2014-08-23T05:34:45+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=932058a5d5f9fd919b90aaa2275d54b37340d585'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild</title>
<updated>2014-08-14T17:14:29+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-08-14T17:14:29+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=899552d6e84babd24611fd36ac7051068cb1eb2d'/>
<id>899552d6e84babd24611fd36ac7051068cb1eb2d</id>
<content type='text'>
Pull misc kbuild updates from Michal Marek:
 "This is the non-critical part of kbuild for 3.17-rc1:

   - make help hint to use make -s with make kernelrelease et al.
   - moved a kbuild document to Documentation/kbuild where it belongs
   - four new Coccinelle scripts, one dropped and one fixed
   - new make kselftest target to run various tests on the kernel"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: kselftest - new make target to build and run kernel selftests
  Coccinelle: Script to replace if and BUG with BUG_ON
  Coccinelle: Script to detect incorrect argument to sizeof
  Coccinelle: Script to use ARRAY_SIZE instead of division of two sizeofs
  Coccinelle: Script to detect cast after memory allocation
  coccinelle/null: solve parse error
  Documentation: headers_install.txt is part of kbuild
  kbuild: make -s should be used with kernelrelease/kernelversion/image_name
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull misc kbuild updates from Michal Marek:
 "This is the non-critical part of kbuild for 3.17-rc1:

   - make help hint to use make -s with make kernelrelease et al.
   - moved a kbuild document to Documentation/kbuild where it belongs
   - four new Coccinelle scripts, one dropped and one fixed
   - new make kselftest target to run various tests on the kernel"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: kselftest - new make target to build and run kernel selftests
  Coccinelle: Script to replace if and BUG with BUG_ON
  Coccinelle: Script to detect incorrect argument to sizeof
  Coccinelle: Script to use ARRAY_SIZE instead of division of two sizeofs
  Coccinelle: Script to detect cast after memory allocation
  coccinelle/null: solve parse error
  Documentation: headers_install.txt is part of kbuild
  kbuild: make -s should be used with kernelrelease/kernelversion/image_name
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/coccinelle/free/ifnullfree.cocci: add copyright information</title>
<updated>2014-08-08T22:57:27+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-08-08T21:23:31+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=45715f33d447ba878a3ca81673514785bb4dfe5a'/>
<id>45715f33d447ba878a3ca81673514785bb4dfe5a</id>
<content type='text'>
All coccinelle scripts have a copyright in the header.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Suggested-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All coccinelle scripts have a copyright in the header.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Suggested-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/coccinelle/free: add NULL test before freeing functions</title>
<updated>2014-08-08T22:57:26+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-08-08T21:23:29+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=791dfeb49519f18a6efea4619f5678457f1532ff'/>
<id>791dfeb49519f18a6efea4619f5678457f1532ff</id>
<content type='text'>
Warns or generates patch for NULL check before the following functions:

kfree
usb_free_urb
debugfs_remove
debugfs_remove_recursive

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Cc: Gilles Muller &lt;Gilles.Muller@lip6.fr&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Warns or generates patch for NULL check before the following functions:

kfree
usb_free_urb
debugfs_remove
debugfs_remove_recursive

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Acked-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Cc: Gilles Muller &lt;Gilles.Muller@lip6.fr&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Coccinelle: Script to replace if and BUG with BUG_ON</title>
<updated>2014-08-06T10:10:17+00:00</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-07-20T21:36:35+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=5be1df668a40cc0a49bc26023fffc537fae1778e'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
</feed>
