Catégorie : Linux

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 | …

Lire la suite

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; … …

Lire la suite

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 …

Lire la suite

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 @@ …

Lire la suite

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; …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.