Catégorie : Coccinelle

arm: Cleanup the irq namespace

Author: Thomas Gleixner <tglx@linutronix.de> Convert to the new function names. Automated with coccinelle. Signed-off-by: Thomas Gleixner — arch/arm/common/gic.c | 14 ++++—- arch/arm/common/it8152.c | 4 +– arch/arm/common/locomo.c | 18 +++++—— arch/arm/common/sa1111.c | 24 +++++++——- arch/arm/common/vic.c | 6 ++– arch/arm/kernel/ecard.c | 6 ++– arch/arm/mach-at91/at91cap9_devices.c | 6 ++– arch/arm/mach-at91/gpio.c | 10 +++— arch/arm/mach-at91/irq.c | 4 +– arch/arm/mach-bcmring/irq.c | …

Lire la suite

drivers/staging/tty/specialix.c: convert func_enter to func_exit

Author: Julia Lawall <julia@diku.dk> Convert calls to func_enter on leaving a function to func_exit. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ @@ – func_enter(); + func_exit(); return…; // Signed-off-by: Julia Lawall Cc: Roger Wolff Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — drivers/staging/tty/specialix.c | 8 ++++—- 1 file changed, 4 …

Lire la suite

drivers/tty/bfin_jtag_comm.c: avoid calling put_tty_driver on NULL

Author: Julia Lawall <julia@diku.dk> put_tty_driver calls tty_driver_kref_put on its argument, and then tty_driver_kref_put calls kref_put on the address of a field of this argument. kref_put checks for NULL, but in this case the field is likely to have some offset and so the result of taking its address will not be NULL. Labels are added …

Lire la suite

drivers/net/a2065.c: Convert release_resource to release_region/release_mem_region

Author: Julia Lawall <julia@diku.dk> Request_mem_region should be used with release_mem_region, not release_resource. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,E; @@ *x = request_mem_region(…) … when != release_mem_region(x) when != x = E * release_resource(x); // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — drivers/net/a2065.c | 10 +++++—– …

Lire la suite

drivers/net/ariadne.c: Convert release_resource to release_region/release_mem_region

Author: Julia Lawall <julia@diku.dk> Request_mem_region should be used with release_mem_region, not release_resource. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,E; @@ *x = request_mem_region(…) … when != release_mem_region(x) when != x = E * release_resource(x); // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — drivers/net/ariadne.c | 10 +++++—– …

Lire la suite

sched/rt: Use schedule_preempt_disabled()

Author: Thomas Gleixner <tglx@linutronix.de> Coccinelle based conversion. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-24swm5zut3h9c4a6s46x8rws@git.kernel.org Signed-off-by: Ingo Molnar — arch/arm/kernel/process.c | 4 +— arch/avr32/kernel/process.c | 4 +— arch/blackfin/kernel/process.c | 4 +— arch/cris/kernel/process.c | 4 +— arch/frv/kernel/process.c | 4 +— arch/h8300/kernel/process.c | 4 +— arch/ia64/kernel/process.c | 4 +— arch/m32r/kernel/process.c | 4 +— arch/m68k/kernel/process_mm.c | 4 +— …

Lire la suite

drm/i915: Fix use after free within tracepoint

Author: Chris Wilson <chris@chris-wilson.co.uk> Detected by scripts/coccinelle/free/kfree.cocci. Signed-off-by: Chris Wilson Reviewed-by: Keith Packard — drivers/gpu/drm/i915/i915_gem.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index edd6098..c9bdaf2 100644 — a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3603,6 +3603,8 @@ static void i915_gem_free_object_tail(struct drm_i915_gem_object *obj) return; }   + trace_i915_gem_object_destroy(obj); + if (obj->base.map_list.map) i915_gem_free_mmap_offset(obj); …

Lire la suite

x86: Cleanup the genirq name space

Author: Thomas Gleixner <tglx@linutronix.de> genirq is switching to a consistent name space for the irq related functions. Convert x86. Conversion was done with coccinelle. Signed-off-by: Thomas Gleixner — arch/x86/kernel/apic/io_apic.c | 75 ++++++++++++++++++—————- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i8259.c | 2 +- arch/x86/kernel/irqinit.c | 2 +- arch/x86/lguest/boot.c | 4 +- arch/x86/pci/xen.c | 8 ++– arch/x86/platform/uv/uv_irq.c | 4 …

Lire la suite

staging: rts_pstor: optimize kmalloc to kzalloc

Author: Alexander Beregalov <a.beregalov@gmail.com> Use kzalloc rather than kmalloc followed by memset with 0. Found by coccinelle. Signed-off-by: Alexander Beregalov Signed-off-by: Greg Kroah-Hartman — drivers/staging/rts_pstor/rtsx.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/staging/rts_pstor/rtsx.c b/drivers/staging/rts_pstor/rtsx.c index c3f33d1..db3470e 100644 — a/drivers/staging/rts_pstor/rtsx.c +++ b/drivers/staging/rts_pstor/rtsx.c @@ -931,11 +931,10 @@ static int __devinit rtsx_probe(struct …

Lire la suite

staging: ft1000: optimize kmalloc to kzalloc

Author: Alexander Beregalov <a.beregalov@gmail.com> Use kzalloc rather than kmalloc followed by memset with 0. Found by coccinelle. Signed-off-by: Alexander Beregalov Signed-off-by: Greg Kroah-Hartman — drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c index 874919c..10af477 100644 — a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c @@ -120,11 +120,10 @@ static int ft1000_attach(struct pcmcia_device …

Lire la suite