Quentin LAMBERT

Author's posts

mfd: Remove redundant spi driver bus initialization

Author: Lars-Peter Clausen <lars@metafoo.de> In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register() so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // @@ identifier _driver; @@ struct spi_driver _driver = { …

Continue reading

net: Remove redundant spi driver bus initialization

Author: Lars-Peter Clausen <lars@metafoo.de> In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register() so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // @@ identifier _driver; @@ struct spi_driver _driver = { …

Continue reading

net:phy:marvell: remove unnecessary code

Author: Srinivas Kandagatla <srinivas.kandagatla@st.com> Compile tested. remove unnecessary code that matches this coccinelle pattern ret = phy_write(x, y , z) if (ret < 0) return ret; return 0; As phy_write returns error code, we dont need to do not need extra check before returning. Signed-off-by: Srinivas Kandagatla Signed-off-by: David S. Miller --- drivers/net/phy/marvell.c | 18 …

Continue reading

net:phy:davicom: remove unnecessary code

Author: Srinivas Kandagatla <srinivas.kandagatla@st.com> Compile tested. remove unnecessary code that matches this coccinelle pattern ret = phy_write(x, y , z) if (ret < 0) return ret; return 0; As phy_write returns error code, we dont need to do not need extra check before returning. Signed-off-by: Srinivas Kandagatla Signed-off-by: David S. Miller --- drivers/net/phy/davicom.c | 7 …

Continue reading

net:phy:bcm63xx: remove unnecessary code

Author: Srinivas Kandagatla <srinivas.kandagatla@st.com> Compile tested. remove unnecessary code that matches this coccinelle pattern ret = phy_write(x, y , z) if (ret < 0) return ret; return 0; As phy_write returns error code, we dont need to do not need extra check before returning. Signed-off-by: Srinivas Kandagatla Signed-off-by: David S. Miller --- drivers/net/phy/bcm63xx.c | 5 …

Continue reading

MIPS: ath79: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Gabor Juhos Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3483/ Signed-off-by: Ralf Baechle — arch/mips/ath79/dev-gpio-buttons.c | 4 +— arch/mips/ath79/dev-leds-gpio.c | 4 +— 2 files changed, 2 insertions(+), 6 deletions(-)   diff –git a/arch/mips/ath79/dev-gpio-buttons.c b/arch/mips/ath79/dev-gpio-buttons.c index 4b0168a..366b35f 100644 — a/arch/mips/ath79/dev-gpio-buttons.c +++ …

Continue reading

mtd: do not use plain 0 as NULL

Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> The first 3 arguments of ‘mtd_device_parse_register()’ are pointers, but many callers pass ‘0’ instead of ‘NULL’. Fix this globally. Thanks to coccinelle for making it easy to do with the following semantic patch: @@ expression mtd, types, parser_data, parts, nr_parts; @@ ( -mtd_device_parse_register(mtd, 0, parser_data, parts, nr_parts) +mtd_device_parse_register(mtd, NULL, parser_data, parts, …

Continue reading

drivers/atm/solos-pci.c: exchange pci_iounmaps

Author: Julia Lawall <Julia.Lawall@lip6.fr> The calls to pci_iounmap are in the wrong order, as compared to the associated calls to pci_iomap. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,x; statement S,S1; int ret; @@ e = pci_iomap(x,…) … when != pci_iounmap(x,e) if () S …

Continue reading

PTR_ERR should be called before its argument is cleared.

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,e1; constant c; @@ *e = c … when != e = e1 when != &e when != true IS_ERR(e) *PTR_ERR(e) // Signed-off-by: Julia Lawall Reported-by: Josh Triplett Signed-off-by: Paul E. McKenney — kernel/rcutorture.c | 5 ++++- …

Continue reading

drivers/net/ethernet/ti: Move call to PTR_ERR after reassignment

Author: Julia Lawall <Julia.Lawall@lip6.fr> PTR_ERR should be called before its argument is cleared. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,e1; constant c; @@ *e = c … when != e = e1 when != &e when != true IS_ERR(e) *PTR_ERR(e) // Signed-off-by: Julia Lawall Reported-by: Josh Triplett …

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.