Author: Julia Lawall <Julia.Lawall@lip6.fr> Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …
Category: Linux
Aug 14 2012
drivers/net/ethernet/freescale/fs_enet: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …
Aug 09 2012
staging:iio: Constify static iio_chan_spec arrays
Author: Lars-Peter Clausen <lars@metafoo.de> The per driver iio_chan_spec arrays are usually shared between multiple device instances. So a single device instance may not modify the iio_chan_spec array since this would also affect the other device instances. To make this restriction explicit mark the per driver iio_chan_spec arrays as const. Conversion was done automatically using the …
Aug 07 2012
drm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
Author: Thomas Meyer <thomas@m3y3r.de> 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 Signed-off-by: Dave Airlie — drivers/gpu/drm/udl/udl_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c index 7bd65bd..291ecc1 100644 — a/drivers/gpu/drm/udl/udl_gem.c +++ b/drivers/gpu/drm/udl/udl_gem.c @@ …
Aug 07 2012
drm/exynos: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
Author: Thomas Meyer <thomas@m3y3r.de> 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 Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park — drivers/gpu/drm/exynos/exynos_drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index f9efde4..da4e3ca 100644 — a/drivers/gpu/drm/exynos/exynos_drm_gem.c …
Aug 06 2012
m68k: Use PTR_RET rather than if(IS_ERR(…)) + PTR_ERR
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/ptr_ret.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Geert Uytterhoeven — arch/m68k/kernel/time.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 707f057..5d0bcaa 100644 — a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c @@ …
Aug 06 2012
m68k/q40: Use PTR_RET rather than if(IS_ERR(…)) + PTR_ERR
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/ptr_ret.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Geert Uytterhoeven — arch/m68k/q40/config.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index 8a1ce32..1adb5b7 100644 — a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c @@ …
Aug 06 2012
m68k/amiga: Use PTR_RET rather than if(IS_ERR(…)) + PTR_ERR
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/ptr_ret.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Geert Uytterhoeven — arch/m68k/amiga/platform.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c index 80076d3..6083088 100644 — a/arch/m68k/amiga/platform.c +++ b/arch/m68k/amiga/platform.c @@ …
Aug 06 2012
net: Use PTR_RET rather than if(IS_ERR(.. [1]
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/ptr_ret.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller — drivers/net/appletalk/cops.c | 4 +— drivers/net/appletalk/ltpc.c | 4 +— 2 files changed, 2 insertions(+), 6 deletions(-) diff –git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index 545c09e..cff6f02 100644 …
Aug 06 2012
drivers/cpufreq/pcc-cpufreq.c: fix error return code
Author: Julia Lawall <julia@diku.dk> Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; …