Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete jump to a label on the next line, when that label is not used elsewhere. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier l; @@ -if (…) goto l; -l: // Signed-off-by: Julia Lawall Signed-off-by: Kalle Valo — drivers/net/wireless/ti/wl1251/acx.c | …
Catégorie : Linux
May 29 2015
NFS: drop unneeded goto
Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete jump to a label on the next line, when that label is not used elsewhere. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier l; @@ -if (…) goto l; -l: // Also drop the unnecessary ret variable. Signed-off-by: Julia Lawall …
May 29 2015
ipv6: drop unneeded goto
Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete jump to a label on the next line, when that label is not used elsewhere. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier l; @@ -if (…) goto l; -l: // Also remove the unnecessary ret variable. Signed-off-by: Julia Lawall …
May 28 2015
staging: xgifb: use arch_phys_wc_add() and ioremap_wc()
Author: Luis R. Rodriguez <mcgrof@suse.com> The same area used for ioremap() is used for the MTRR area. Convert the driver from using the x86 specific MTRR code to the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add() will avoid MTRR if write-combining is available, in order to take advantage of that also ensure the ioremap’d area is requested as …
May 27 2015
rcu: Change return type to bool
Author: Nicholas Mc Guire <hofrat@osadl.org> Type-checking coccinelle spatches are being used to locate type mismatches between function signatures and return values in this case this produced: ./kernel/rcu/srcu.c:271 WARNING: return of wrong type int != unsigned long, srcu_readers_active() returns an int that is the sum of per_cpu unsigned long but the only user is cleanup_srcu_struct() which …
May 27 2015
kernel/params: constify struct kernel_param_ops uses
Author: Luis R. Rodriguez <mcgrof@suse.com> Most code already uses consts for the struct kernel_param_ops, sweep the kernel for the last offending stragglers. Other than include/linux/moduleparam.h and kernel/params.c all other changes were generated with the following Coccinelle SmPL patch. Merge conflicts between trees can be handled with Coccinelle. In the future git could get Coccinelle merge …
May 26 2015
block: fix returnvar.cocci warnings
Author: Julia Lawall <julia.lawall@lip6.fr> Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Signed-off-by: Jens Axboe — fs/buffer.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/fs/buffer.c b/fs/buffer.c index efd85e0..f96173a 100644 — a/fs/buffer.c +++ b/fs/buffer.c @@ -2996,7 +2996,6 @@ void guard_bio_eod(int rw, …
May 25 2015
irda: use msecs_to_jiffies for conversion to jiffies
Author: Nicholas Mc Guire <hofrat@osadl.org> API compliance scanning with coccinelle flagged: ./net/irda/timer.c:63:35-37: use of msecs_to_jiffies probably perferable Converting milliseconds to jiffies by « val * HZ / 1000 » technically is not a clean solution as it does not handle all corner cases correctly. By changing the conversion to use msecs_to_jiffies(val) conversion is correct in all cases. …
May 25 2015
iio: twl4030-madc: Pass the IRQF_ONESHOT flag
Author: Fabio Estevam <fabio.estevam@freescale.com> Since commit 1c6c69525b40 (« genirq: Reject bogus threaded irq requests ») threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam Cc: Signed-off-by: Jonathan …
May 25 2015
iio: twl4030-madc: Pass the IRQF_ONESHOT flag
Author: Fabio Estevam <fabio.estevam@freescale.com> Since commit 1c6c69525b40 (« genirq: Reject bogus threaded irq requests ») threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam Cc: Signed-off-by: Jonathan …