Category: Linux

staging: lustre: libcfs: expand the GOTO macro

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ – GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ – GOTO(lbl,rc); + rc; + goto lbl; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/libcfs/module.c | 3 ++- drivers/staging/lustre/lustre/libcfs/upcall_cache.c …

Continue reading

staging: lustre: ptlrpc: expand the GOTO macro

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ – GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ – GOTO(lbl,rc); + rc; + goto lbl; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/ptlrpc/client.c | 32 +++++—- drivers/staging/lustre/lustre/ptlrpc/connection.c …

Continue reading

[media] s5p-tv: Simplify the return logic

Author: Mauro Carvalho Chehab <m.chehab@samsung.com> Make sure pm_runtime_* calls does not use unnecessary IS_ERR_VALUE(). Reported by scripts/coccinelle/api/pm_runtime.cocci script. Signed-off-by: Mauro Carvalho Chehab — drivers/media/platform/s5p-tv/hdmi_drv.c | 2 +- drivers/media/platform/s5p-tv/sdo_drv.c | 2 +- drivers/media/platform/s5p-tv/sii9234_drv.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)   diff –git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c index 754740f..37c8bd6 100644 — a/drivers/media/platform/s5p-tv/hdmi_drv.c +++ b/drivers/media/platform/s5p-tv/hdmi_drv.c @@ …

Continue reading

[media] vivid-vid-out: use memdup_user()

Author: Mauro Carvalho Chehab <m.chehab@samsung.com> Instead of allocating and coping from __user, do it using one atomic call. That makes the code simpler. Found by coccinelle. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/platform/vivid/vivid-vid-out.c | 10 +++——- 1 file changed, 3 insertions(+), 7 deletions(-)   diff –git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c index c983461..8ed9f6d 100644 — a/drivers/media/platform/vivid/vivid-vid-out.c …

Continue reading

[media] soc_camera: use kmemdup()

Author: Mauro Carvalho Chehab <m.chehab@samsung.com> Instead of calling kzalloc and then copying, use kmemdup(). That avoids zeroing the data structure before copying. Found by coccinelle. Acked-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab — drivers/media/platform/soc_camera/soc_camera.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   diff –git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index f4308fe..ee8cdc9 100644 — a/drivers/media/platform/soc_camera/soc_camera.c +++ …

Continue reading

staging: lustre: ldlm: expand the GOTO macro

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ – GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ – GOTO(lbl,rc); + rc; + goto lbl; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 51 ++++++++—– drivers/staging/lustre/lustre/ldlm/ldlm_lock.c …

Continue reading

staging: lustre: adjust spacing within pointer casts

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; expression e; @@ ( – T * + T * ) e // This semantic patch just removes the cast and adds it back, but when it does so, it follows the spacing conventions of Linux. …

Continue reading

staging: lustre: fid,fld: expand the GOTO macro

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ – GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ – GOTO(lbl,rc); + rc; + goto lbl; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/fid/fid_request.c | 18 +++++++++++——- drivers/staging/lustre/lustre/fld/fld_request.c …

Continue reading

staging: lustre: llite: expand the GOTO macro

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; @@ if (…) GOTO(lbl,…); +else GOTO(lbl,…); @@ identifier lbl,rc; constant c; expression e,e1; @@ if ( – e + !e ) – GOTO(lbl,\(rc\|c\)); -else GOTO(lbl,e1); + e1; +goto lbl; @@ identifier lbl,rc; constant c; expression e,e1; …

Continue reading

net: phy: mdio-bcm-unimac: NULL-terminate unimac_mdio_ids

Author: Florian Fainelli <f.fainelli@gmail.com> drivers/net/phy/mdio-bcm-unimac.c:195:37-38: unimac_mdio_ids is not NULL terminated at line 195 Make sure of_device_id tables are NULL terminated Generated by: scripts/coccinelle/misc/of_table.cocci Signed-off-by: Fengguang Wu Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller — drivers/net/phy/mdio-bcm-unimac.c | 1 + 1 file changed, 1 insertion(+)   diff –git a/drivers/net/phy/mdio-bcm-unimac.c b/drivers/net/phy/mdio-bcm-unimac.c index e6b08ce..5b643e5 100644 — a/drivers/net/phy/mdio-bcm-unimac.c +++ b/drivers/net/phy/mdio-bcm-unimac.c …

Continue reading