[PATCH] HID: hyperv: Cocci spatch "memdup.spatch"

2013-06-01 Thread Thomas Meyer
Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c @@ -199,13 +199,11 @@ static void mousevsc_on_receive_device_i if (desc->bLength == 0) goto clea

[PATCH] Staging: android: ram_console: Use resource_size function

2012-01-22 Thread Thomas Meyer
The semantic patch that makes this change is available in scripts/coccinelle/api/resource_size.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/android/ram_console.c b/drivers/staging

[PATCH] drm/omap: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(..

2012-01-22 Thread Thomas Meyer
The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/omapdrm/omap_gem_helpers.c b/drivers/staging

[PATCH] Staging: bcm: Use memdup_user rather than duplicating its implementation

2012-01-22 Thread Thomas Meyer
This is a little bit restricted to reduce false positives The semantic patch that makes this change is available in scripts/coccinelle/api/memdup_user.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer --- diff -u -p a

[PATCH] staging:iio: Use kcalloc instead of kzalloc to allocate array

2011-11-29 Thread Thomas Meyer
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas

[PATCH] staging: hv: Use kmemdup rather than duplicating its implementation

2011-11-12 Thread Thomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c --- a/drivers/staging/hv/hv_mouse.c

[PATCH] gma500: Use kmemdup rather than duplicating its implementation

2011-11-12 Thread Thomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/gma500/intel_bios.c b/drivers/staging/gma500/intel_bios.c --- a/drivers/staging

[PATCH] staging: go7007: Use kmemdup rather than duplicating its implementation

2011-11-12 Thread Thomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/media/go7007/go7007-driver.c b/drivers/staging/media/go7007/go7007-driver.c --- a

[PATCH] staging: hv: Use kmemdup rather than duplicating its implementation

2011-11-12 Thread Thomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c --- a/drivers/staging/hv/hv_mouse.c

[PATCH] staging: go7007: Use kmemdup rather than duplicating its implementation

2011-11-12 Thread Thomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/media/go7007/go7007-driver.c b/drivers/staging/media/go7007/go7007-driver.c --- a

[PATCH] gma500: Use kmemdup rather than duplicating its implementation

2011-11-12 Thread Thomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/gma500/intel_bios.c b/drivers/staging/gma500/intel_bios.c --- a/drivers/staging

[PATCH] Staging: speakup: Use kmemdup rather than duplicating its implementation

2011-11-12 Thread Thomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c --- a/drivers/staging

[PATCH] staging: rtl8192e: Use kzalloc rather than kmalloc v2

2011-11-10 Thread Thomas Meyer
/coccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c --- a/drivers/staging/rtl8192e/rtllib_softmac.c 2011-11-07 19:38:11.780313813 +0100 +++ b/drivers/staging/rtl8192e

[PATCH] Staging: line6: Use kmemdup rather than duplicating its implementation

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer

[PATCH] staging: rtl8192e: Use kmemdup rather than duplicating its implementation

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer

[PATCH] staging: rtl8192e: Use kmemdup rather than duplicating its implementation

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer

[PATCH] staging: rtl8192e: Use kzalloc rather than kmalloc

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this

[PATCH] staging: rtl8192e: Use kzalloc rather than kmalloc

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this

[PATCH] staging: rtl8192e: Use kzalloc rather than kmalloc

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this

[PATCH] staging: rtl8192e: Use kzalloc rather than kmalloc

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this

[PATCH] staging: rtl8192e: Use kzalloc rather than kmalloc

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this

[PATCH] staging: rtl8192e: Use kzalloc rather than kmalloc

2011-11-08 Thread Thomas Meyer
From: Thomas Meyer Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this

[PATCH] staging: rts_pstor: dont cast void* from kmalloc()

2011-08-16 Thread Thomas Meyer
From: Thomas Meyer Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is

[PATCH] staging: tidspbridge: dont cast void* from kmalloc()

2011-08-16 Thread Thomas Meyer
From: Thomas Meyer Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is

[PATCH] staging: rts_pstor: dont cast void* from kmalloc()

2011-08-16 Thread Thomas Meyer
From: Thomas Meyer Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is

[PATCH] staging/easycap: Use memdup_user

2011-08-16 Thread Thomas Meyer
From: Thomas Meyer Use kmemdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives The semantic patch that makes this output is available in scripts/coccinelle/api/memdup_user.cocci. More information about semantic patching is

[PATCH] staging: spectra: Use memdup_user

2011-08-16 Thread Thomas Meyer
From: Thomas Meyer Use kmemdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives The semantic patch that makes this output is available in scripts/coccinelle/api/memdup_user.cocci. More information about semantic patching is

[PATCH] Staging: rts_pstor: dont cast void* from kmalloc()

2011-08-16 Thread Thomas Meyer
From: Thomas Meyer Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is

[PATCH] staging: altera-stapl: dont cast void* from kmalloc()

2011-08-16 Thread Thomas Meyer
From: Thomas Meyer Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is

[PATCH] staging: ft1000: dont cast void* from kmalloc()

2011-08-16 Thread Thomas Meyer
From: Thomas Meyer Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is

[PATCH] staging: brcm80211: use kzalloc()

2011-08-06 Thread Thomas Meyer
From: Thomas Meyer Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this