Category: Coccinelle

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

[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 …

Continue reading

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 …

Continue reading

fs/ext3/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 …

Continue reading

drivers/ide/cy82c693.c: Add missing pci_dev_put

Author: Julia Lawall <julia@diku.dk> Pci_get_slot calls pci_dev_get, so pci_dev_put is needed before leaving the function in the case where pci_get_slot is locally used. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ local idexpression x; expression e; @@ *x = pci_get_slot(…) … when != true x == NULL when != pci_dev_put(x) …

Continue reading

arch/tile/mm/init.c: trivial: use BUG_ON

Author: Julia Lawall <julia@diku.dk> Use BUG_ON(x) rather than if(x) BUG(); The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ -if (x) BUG(); +BUG_ON(x); @@ identifier x; @@ -if (!x) BUG(); +BUG_ON(!x); // Signed-off-by: Julia Lawall Signed-off-by: Chris Metcalf — arch/tile/mm/init.c | 3 +– 1 file changed, 1 insertion(+), …

Continue reading

arch/openrisc/mm/init.c: trivial: use BUG_ON

Author: Julia Lawall <julia@diku.dk> Use BUG_ON(x) rather than if(x) BUG(); The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ -if (x) BUG(); +BUG_ON(x); @@ identifier x; @@ -if (!x) BUG(); +BUG_ON(!x); // Signed-off-by: Julia Lawall Signed-off-by: Jonas Bonn — arch/openrisc/mm/init.c | 3 +– 1 file changed, 1 insertion(+), …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.