Category: Linux

[media] gsc-m2m: Use an unsigned data type for a variable

Author: Markus Elfring <elfring@users.sourceforge.net> The data type “int” was used by the variable “ret” in the gsc_m2m_poll() function despite of the aspect that the type “unsigned int” will usually be needed for the return value from a call of the v4l2_m2m_poll() function. Improve this implementation detail by addition of the type modifier then. This issue …

Continue reading

iio-light: Use a signed return type for ltr501_match_samp_freq()

Author: Markus Elfring <elfring@users.sourceforge.net> The return type “unsigned int” was used by the ltr501_match_samp_freq() function despite of the aspect that it will eventually return a negative error code. Improve this implementation detail by deletion of the type modifier then. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Peter Meerwald-Stadler Cc: …

Continue reading

gpu: host1x: Use a signed return type for do_relocs()

Author: Markus Elfring <elfring@users.sourceforge.net> The return type “unsigned int” was used by the do_relocs() function despite the fact that it will eventually return a negative error code. Use a signed integer instead to accomodate for error codes. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Thierry Reding — drivers/gpu/host1x/job.c | …

Continue reading

lpfc: Delete unnecessary checks before the function call “mempool_destroy”

Author: Markus Elfring <elfring@users.sourceforge.net> The mempool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: James Smart Reviewed-by: Hannes Reinicke Reviewed-by: Sebastian Herbszt Signed-off-by: Martin K. Petersen — drivers/scsi/lpfc/lpfc_mem.c | 6 …

Continue reading

tty: constify tty_port_operations structs

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Constifies tty_port_operations structures in the tty driver since they are not modified after their initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman — drivers/tty/goldfish.c | 2 +- drivers/tty/mxser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c index …

Continue reading

char: constify tty_port_operations structs

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Constifies tty_port_operations structure in the char driver since it is not modified after its initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall Signed-off-by: Aya Mahfouz Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman — drivers/char/ttyprintk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c index a15ce4e..b098d2d …

Continue reading

tty: serial: constify psc_ops structs

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Constifies psc_ops structures in tty’s serial port driver since they are not modified after their initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman — drivers/tty/serial/mpc52xx_uart.c | 8 ++++—- 1 file changed, 4 insertions(+), 4 deletions(-)   diff –git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c index 8c3e513..3970d6a 100644 — …

Continue reading

tty: serial: constify sunhv_ops structs

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Constifies sunhv_ops structures in tty’s serial driver since they are not modified after their initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall Signed-off-by: Aya Mahfouz Signed-off-by: David S. Miller — drivers/tty/serial/sunhv.c | 6 +++— 1 file changed, 3 insertions(+), 3 deletions(-)   diff –git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c index 0640318..f224e8a 100644 — …

Continue reading

staging: gdm724x: constify tty_port_operations structs

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Constifies tty_port_operations structure in the tty code of the gdm724x driver since it is not modified after its initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman — drivers/staging/gdm724x/gdm_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index …

Continue reading

extcon: max77843: fix handling return value of regmap_irq_get_virq

Author: Andrzej Hajda <a.hajda@samsung.com> The function can return negative values, so its result should be assigned to signed variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi — drivers/extcon/extcon-max77843.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff …

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.