Quentin LAMBERT

Author's posts

staging: rtl8192e: Drop useless initialisation

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Removed initialisation of a varible if it is immediately reassigned. Changes were made using Coccinelle. @@ type T; constant C; expression e; identifier i; @@ T i – = C ; i = e; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 ++++—- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +- drivers/staging/rtl8192e/rtl819x_BAProc.c | …

Continue reading

staging: media: davinci_vpfe: remove ret variable in switch statements

Author: Thaissa Falbo <thaissa.falbo@gmail.com> Remove ret variable in functions that used it to determine the return. Simplified the return logic for these functions. Found with Coccinelle script: @@ local idexpression ret; expression c,d; identifier label; @@ switch ( … ) { case label : … – ret = c; – break; + return c; … …

Continue reading

staging: rtl8723au: hal: Use macro ARRAY_SIZE

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> The macro ARRAY_SIZE is more concise to use instead of dividing size of the array by the size of its type. Changes were made using Coccinelle. @@ type T; T[] E; @@ – (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c | 2 +- 1 file changed, 1 …

Continue reading

staging: rtl8712: Replace explicit NULL comparison

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Replace explicit NULL comparison with ! operator. Found with Coccinelle. @@ expression e; @@ – e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/xmit_linux.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c index d398183..f8866d7 100644 — a/drivers/staging/rtl8712/xmit_linux.c +++ b/drivers/staging/rtl8712/xmit_linux.c @@ …

Continue reading

staging: media: davinci_vpfe: remove unnecessary ret variable

Author: Thaissa Falbo <thaissa.falbo@gmail.com> Simplified return of funcions by removing assignment of ret variable. Coccinelle script used: @@ local idexpression ret; expression e; @@ – ret = e; – if(ret) – return ret; + if(e) + return e; @@ local idexpression ret; expression e; @@ – ret = e; – return ret; + return e; …

Continue reading

usb: host: xhci-plat: fix of_table.cocci warnings

Author: Julia Lawall <julia.lawall@lip6.fr> Make sure (of/i2c/platform)_device_id tables are NULL terminated Generated by: scripts/coccinelle/misc/of_table.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman — drivers/usb/host/xhci-plat.c | 1 + 1 file changed, 1 insertion(+)   diff –git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 3aede6e..5c15e9b 100644 — a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -116,6 +116,7 @@ static const struct …

Continue reading

Staging: fsl-mc: bus: Drop owner assignment from platform_driver

Author: Bhumika Goyal <bhumirks@gmail.com> For platform_driver, we don’t need to set .owner field as is set by platform driver core. The semantic patch used here first checks whether platform_driver struct was actually used in a call to set the .owner field. The coccinelle script that generated the patch can be found here: http://www.spinics.net/lists/kernel/msg2029903.html Signed-off-by: Bhumika …

Continue reading

pinctrl: mtk2701: skip setting .owner

Author: Linus Walleij <linus.walleij@linaro.org> The device core will handle this and Coccinelle complains. Signed-off-by: Linus Walleij — drivers/pinctrl/mediatek/pinctrl-mt2701.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/pinctrl/mediatek/pinctrl-mt2701.c b/drivers/pinctrl/mediatek/pinctrl-mt2701.c index 65b0d3e..8d802fa 100644 — a/drivers/pinctrl/mediatek/pinctrl-mt2701.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt2701.c @@ -573,7 +573,6 @@ static struct platform_driver mtk_pinctrl_driver = { .probe = mt2701_pinctrl_probe, .driver = { .name …

Continue reading

staging: wilc1000: Return correct error codes

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> This change has been made with the goal that kernel functions should return something more descriptive than -1 on failure. The return value on an alloc_etherdev failure should be -ENOMEM, and not -1. This was found using Coccinelle. A simplified version of the semantic patch used is: // @@ expression …

Continue reading

qlogicpti: Return correct error code

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> The return value of of_ioremap on failure should be -ENODEV and not -1. Found using Coccinelle. A simplified version of the semantic patch used is: // @@ expression *e; @@ e = of_ioremap(…); if (e == NULL) { … return – -1 + -ENODEV ; } // The single call …

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.