Author: Julia Lawall <julia.lawall@lip6.fr> Propagate error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when …
Catégorie : Linux
Aug 23 2015
mmc: omap: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …
Aug 22 2015
ASoC: cs4349: fix platform_no_drv_owner.cocci warnings
Author: kbuild test robot <fengguang.wu@intel.com> sound/soc/codecs/cs4349.c:389:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Tim Howe Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown — sound/soc/codecs/cs4349.c | 1 – 1 file changed, 1 deletion(-) diff –git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c …
Aug 22 2015
[media] i2c: fix platform_no_drv_owner.cocci warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/media/i2c/tc358743.c:1960:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Geert Uytterhoeven Signed-off-by: Fengguang Wu Signed-off-by: Mauro Carvalho Chehab — drivers/media/i2c/tc358743.c | 1 – 1 file changed, 1 deletion(-) diff –git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c …
Aug 21 2015
drm/bridge: ps8622: Fix coccinelle warnings
Author: kbuild test robot <fengguang.wu@intel.com> The platform_no_drv_owner.cocci coccinelle script generates the following warning: drivers/gpu/drm/bridge/parade-ps8622.c:671:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically. Patch generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fengguang Wu Signed-off-by: Thierry Reding — drivers/gpu/drm/bridge/parade-ps8622.c | 1 – 1 file changed, 1 …
Aug 21 2015
drm/bridge: ptn3460: Fix coccinelle warnings
Author: kbuild test robot <fengguang.wu@intel.com> The platform_no_drv_owner.cocci coccinelle script generates the following warning: drivers/gpu/drm/bridge/nxp-ptn3460.c:403:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically. Patch generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fengguang Wu Signed-off-by: Thierry Reding — drivers/gpu/drm/bridge/nxp-ptn3460.c | 1 – 1 file changed, 1 …
Aug 20 2015
dmaengine: ioatdma: fix coccinelle warning
Author: Dave Jiang <dave.jiang@intel.com> Simplifying the end return. This existed in the original code but was flagged when refactoring of the code made it appear it’s new. coccinelle warnings: (new ones prefixed by >>) >> drivers/dma/ioat/init.c:1018:1-3: WARNING: end returns can be simpified Signed-off-by: Dave Jiang Signed-off-by: Vinod Koul — drivers/dma/ioat/init.c | 7 +++—- 1 file …
Aug 20 2015
PCI: imx6: Simplify a trivial if-return sequence
Author: Fabio Estevam <fabio.estevam@freescale.com> Simplify a trivial if-return sequence by combining it with a preceding function call. The semantic patch that makes this change is available in scripts/coccinelle/misc/simple_return.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas CC: Lucas Stach — drivers/pci/host/pci-imx6.c | 12 ++———- 1 file changed, 2 insertions(+), 10 deletions(-) diff –git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index …
Aug 20 2015
PCI: spear: Use BUG_ON() instead of condition followed by BUG()
Author: Fabio Estevam <fabio.estevam@freescale.com> Use BUG_ON() instead of an if condition followed by BUG(). The semantic patch that makes this change is available in scripts/coccinelle/misc/bugon.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas CC: Pratyush Anand — drivers/pci/host/pcie-spear13xx.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c index c49fbdc..98d2683 100644 — …
Aug 20 2015
PCI: dra7xx: Remove unneeded use of IS_ERR_VALUE()
Author: Fabio Estevam <fabio.estevam@freescale.com> There is no need to use the IS_ERR_VALUE() macro for checking the return value from pm_runtime_* functions. Test for a negative pm_runtime_get_sync() return value instead of using IS_ERR_VALUE(). The semantic patch that makes this change is available in scripts/coccinelle/api/pm_runtime.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas CC: Kishon Vijay Abraham I — …