Author: Julia Lawall <julia@diku.dk> At this point, window has not been stored anywhere, so it has to be freed before leaving the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression *ptr != NULL; @@ x …
Catégorie : Linux
Aug 06 2011
staging: brcm80211: use kzalloc()
Author: Thomas Meyer <thomas@m3y3r.de> 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 output is …
Aug 06 2011
ALSA: asihpi – use kzalloc()
Author: Thomas Meyer <thomas@m3y3r.de> 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 output is …
Aug 06 2011
ARM: davinci: edma: use kzalloc()
Author: Thomas Meyer <thomas@m3y3r.de> 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 output is …
Aug 06 2011
ACPI: use kstrdup()
Author: Thomas Meyer <thomas@m3y3r.de> Use kstrdup rather than duplicating its implementation The semantic patch that makes this output is available in scripts/coccinelle/api/kstrdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Len Brown — drivers/acpi/scan.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index …
Aug 06 2011
arm: mach-omap2: mux: use kstrdup()
Author: Thomas Meyer <thomas@m3y3r.de> Use kstrdup rather than duplicating its implementation The semantic patch that makes this output is available in scripts/coccinelle/api/kstrdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Tony Lindgren — arch/arm/mach-omap2/mux.c | 14 ++++———- 1 file changed, 4 insertions(+), 10 deletions(-) diff –git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index …
Aug 06 2011
staging: brcm80211: use kstrdup()
Author: Thomas Meyer <thomas@m3y3r.de> Use kstrdup rather than duplicating its implementation The semantic patch that makes this output is available in scripts/coccinelle/api/kstrdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/brcm80211/brcmfmac/dhd_common.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) diff –git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c index …
Aug 06 2011
xen/pciback: use resource_size()
Author: Thomas Meyer <thomas@m3y3r.de> Use resource_size function on resource object instead of explicit computation. The semantic patch that makes this output 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 Signed-off-by: Konrad Rzeszutek Wilk — drivers/xen/xen-pciback/conf_space_header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff …
Aug 06 2011
[media] davinci vpbe: Use resource_size()
Author: Thomas Meyer <thomas@m3y3r.de> Use resource_size function on resource object instead of explicit computation. The semantic patch that makes this output 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 Signed-off-by: Mauro Carvalho Chehab — drivers/media/video/davinci/vpbe_osd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff …
Aug 04 2011
fs/ext2/balloc.c: delete useless initialization
Author: Julia Lawall <julia@diku.dk> Delete nontrivial initialization that is immediately overwritten by the result of an allocation function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier i; expression e; @@ ( T i = \(0\|NULL\|ERR_PTR(…)\); | -T i = e; +T i; ) … when != i …