Catégorie : Linux

staging: speakup: compress return logic into one line

Author: Alison Schofield <amsfield22@gmail.com> Simplify function return by merging assignment and return into one command line. Remove (now) unused local variable. Found using Coccinelle: @@ expression e, ret; @@ -ret = +return e; -return ret; Signed-off-by: Alison Schofield Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/speakup/i18n.c | 5 +—- 1 file changed, 1 insertion(+), 4 …

Lire la suite

staging: gdm72xx: compress return logic into one line

Author: Alison Schofield <amsfield22@gmail.com> Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ expression e, ret; @@ -ret = +return e; -return ret; Signed-off-by: Alison Schofield Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/gdm72xx/netlink_k.c | 3 +– drivers/staging/gdm72xx/usb_boot.c | 4 +— 2 files changed, 2 insertions(+), 5 deletions(-) …

Lire la suite

dmascc: 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. A variable `err` has been introduced for storing error codes. The return value of kzalloc on failure should return a -1 and not a -ENOMEM. This was found using Coccinelle. …

Lire la suite

staging: iio: Remove parantheses around right hand side of assignment

Author: Janani Ravichandran <janani.rvchndrn@gmail.com> Remove parantheses on the right hand side of assignments as they are not needed. Coccinelle patch used: @@ expression a, b, c, d; @@ ( a = (c == d) | a = – ( b – ) ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/adc/ad7280a.c | 4 ++– drivers/staging/iio/light/tsl2x7x_core.c …

Lire la suite

staging: rtl8188eu: Remove unnecessary pointer cast

Author: Janani Ravichandran <janani.rvchndrn@gmail.com> Remove unnecessary pointer cast. Issue found using the following Coccinelle semantic patch. @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index e602026..96e5c6d 100644 …

Lire la suite

Staging: lustre: lnet: Remove explicit NULL comparision

Author: Bhumika Goyal <bhumirks@gmail.com> Replaced explicit NULL comparision with its simplier form. Found using coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lnet/lnet/lib-md.c | 12 ++++++—— 1 file changed, 6 insertions(+), 6 deletions(-)   diff –git a/drivers/staging/lustre/lnet/lnet/lib-md.c b/drivers/staging/lustre/lnet/lnet/lib-md.c index 758f5be..b3d8364 100644 — a/drivers/staging/lustre/lnet/lnet/lib-md.c +++ b/drivers/staging/lustre/lnet/lnet/lib-md.c @@ …

Lire la suite

Staging:wlan-ng:Merged two lines into one

Author: Bhumika Goyal <bhumirks@gmail.com> The last two lines of these functions are compressed into one. Also removed the variable ret as it is now not used. Found using coccinelle: @@ expression e, ret; @@ -ret = +return e; -return ret; Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman — drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++—————- 1 file changed, 4 …

Lire la suite

bonding: Return correct error code

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

Lire la suite

Staging:iio:Remove exceptional & on function name

Author: Bhumika Goyal <bhumirks@gmail.com> In this file,function names are otherwise used as pointers without &. Found using coccinelle. // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Bhumika Goyal Signed-off-by: Jonathan Cameron — drivers/staging/iio/impedance-analyzer/ad5933.c | 8 ++++—- 1 file changed, 4 insertions(+), 4 deletions(-)   …

Lire la suite

USB: serial: fix semicolon.cocci warnings

Author: Mathieu OTHACEHE <m.othacehe@gmail.com> Remove unneeded semicolons. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Mathieu OTHACEHE Signed-off-by: Johan Hovold — drivers/usb/serial/keyspan.c | 2 +- drivers/usb/serial/kl5kusb105.c | 3 — 2 files changed, 1 insertion(+), 4 deletions(-)   diff –git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index e07b15e..b6bd8e4 100644 — a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c @@ -1963,7 +1963,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial, if (d_details->product_id …

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.