Quentin LAMBERT

Author's posts

USB: serial: fix boolinit.cocci warnings

Author: Mathieu OTHACEHE <m.othacehe@gmail.com> Bool initializations should use true and false. Bool tests don’t need comparisons. Also, use IS_ENABLED instead of ifdef. Generated by: scripts/coccinelle/misc/boolinit.cocci Signed-off-by: Mathieu OTHACEHE Signed-off-by: Johan Hovold — drivers/usb/serial/iuu_phoenix.c | 4 ++– drivers/usb/serial/mos7840.c | 4 ++– drivers/usb/serial/quatech2.c | 2 +- drivers/usb/serial/safe_serial.c | 11 +++——– 4 files changed, 8 insertions(+), 13 deletions(-) …

Continue reading

USB: serial: fix returnvar.cocci warnings

Author: Mathieu OTHACEHE <m.othacehe@gmail.com> Remove unneeded variables when “0” can be returned. Generated by: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Mathieu OTHACEHE Signed-off-by: Johan Hovold — drivers/usb/serial/cyberjack.c | 3 +– drivers/usb/serial/garmin_gps.c | 3 +– 2 files changed, 2 insertions(+), 4 deletions(-)   diff –git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 2916dea..5f17a3b 100644 — a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c @@ -140,7 +140,6 @@ static int …

Continue reading

USB: serial: fix compare_const_fl.cocci warnings

Author: Mathieu OTHACEHE <m.othacehe@gmail.com> Move constants to the right of binary operators where it increases readability. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Mathieu OTHACEHE [johan: drop some chunks and fix others, amend commit message ] Signed-off-by: Johan Hovold — drivers/usb/serial/ch341.c | 2 +- drivers/usb/serial/ftdi_sio.c | 10 ++++—– drivers/usb/serial/ftdi_sio.h | 8 +++—- drivers/usb/serial/garmin_gps.c | 48 ++++++++++++++++++++——————— 4 files …

Continue reading

net: mvpp2: Return correct error codes

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; position p,q; @@ e@q = kzalloc(…); if@p (e == NULL) { … return – -1 + -ENOMEM …

Continue reading

net: cavium: liquidio: Return correct error code

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> The return value of vmalloc 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; identifier l1; position p,q; @@ e@q = vmalloc(…); if@p (e == NULL) { … goto l1; } …

Continue reading

of: resolver: Add missing of_node_get and of_node_put

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> In __of_find_node_by_full_name, add an of_node_get when detecting the desired element, to ensure that it ends up with a reference count that is one greater than on entering the function. Also in __of_find_node_by_full_name, add an of_node_put on breaking out of the for_each_child_of_node loop, to ensure that the reference count of the …

Continue reading

Input: cap11xx – add missing of_node_put

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> for_each_child_of_node performs an of_node_get on each iteration, so to break out of the loop an of_node_put is required. Found using Coccinelle. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Dmitry Torokhov — drivers/input/keyboard/cap11xx.c | 8 ++++++– 1 file changed, 6 insertions(+), 2 deletions(-)   diff –git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c index 378db10..4401be2 100644 — a/drivers/input/keyboard/cap11xx.c …

Continue reading

usb: storage: ene_ub6250: Remove unnecessary cast in kfree

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Remove unnecassary casts in the argument to kfree. Found using Coccinelle. The semantic patch used to find this is as follows: // @@ type T; expression *f; @@ – kfree((T *)(f)); + kfree(f); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — drivers/usb/storage/ene_ub6250.c | 4 ++– 1 file changed, 2 …

Continue reading

[media] media: platform: vivid: vivid-osd: Remove unnecessary cast to kfree

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Remove an unnecassary cast in the argument to kfree. Found using Coccinelle. The semantic patch used to find this is as follows: // @@ type T; expression *f; @@ – kfree((T *)(f)); + kfree(f); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/platform/vivid/vivid-osd.c | 2 …

Continue reading

usb: host: ehci-sched: move constants to right

Author: Geyslan G. Bem <geyslan@gmail.com> This patch moves the constants to right. Tested by compilation only. Caught by coccinelle: scripts/coccinelle/misc/compare_const_fl.cocci Signed-off-by: Geyslan G. Bem Signed-off-by: Greg Kroah-Hartman — drivers/usb/host/ehci-sched.c | 6 +++— 1 file changed, 3 insertions(+), 3 deletions(-)   diff –git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 74c2023..f4a94d4 100644 — a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -330,7 +330,7 @@ …

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.