Category: Linux

tegra: simplify use of devm_ioremap_resource

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ – res = platform_get_resource(pdev, IORESOURCE_MEM, n); …

Continue reading

spi/spi-{bcm63xx.c,bfin-v3.c}: simplify use of devm_ioremap_resource

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as …

Continue reading

mtd: simplify use of devm_ioremap_resource

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as …

Continue reading

drivers/gpio: simplify use of devm_ioremap_resource

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as …

Continue reading

video: mxsfb: simplify use of devm_ioremap_resource

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as …

Continue reading

pinctrl: nomadik: simplify use of devm_ioremap_resource

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as …

Continue reading

[media] marvell-ccic/mmp-driver.c: simplify use of devm_ioremap_resource

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ – res = platform_get_resource(pdev, IORESOURCE_MEM, n); …

Continue reading

pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

Author: Julia Lawall <Julia.Lawall@lip6.fr> Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(…, – ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e) ,…) // Signed-off-by: Julia Lawall Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki — drivers/cpufreq/pxa3xx-cpufreq.c | …

Continue reading

drivers/gpio/gpio-omap.c: convert comma to semicolon

Author: Julia Lawall <Julia.Lawall@lip6.fr> Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended. A simplified version of the semantic patch that performs this transformation is as follows: (http://coccinelle.lip6.fr/) // @r@ expression e1,e2,e; type T; identifier i; @@ …

Continue reading

arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument

Author: Julia Lawall <Julia.Lawall@lip6.fr> Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(…, – ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e) ,…) // Signed-off-by: Julia Lawall Signed-off-by: Jason Cooper — arch/arm/mach-kirkwood/openrd-setup.c | 3 ++- arch/arm/mach-kirkwood/rd88f6281-setup.c | …

Continue reading