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-max14577.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff …
Catégorie : Linux
Dec 14 2015
ath9k_htc: fix handling return value of ath9k_hw_calibrate
Author: Andrzej Hajda <a.hajda@samsung.com> The function can return negative values in case of error. Its result should be then tested for such case. 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 Signed-off-by: Kalle Valo — drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) …
Dec 14 2015
clk: sunxi: fix handling return value of of_property_match_string
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 Signed-off-by: Maxime Ripard — drivers/clk/sunxi/clk-sun8i-bus-gates.c | 8 ++++—- 1 file changed, 4 insertions(+), 4 deletions(-) diff –git a/drivers/clk/sunxi/clk-sun8i-bus-gates.c b/drivers/clk/sunxi/clk-sun8i-bus-gates.c …
Dec 14 2015
net/mlx4_core: fix handling return value of mlx4_slave_convert_port
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 Fixes: fc48866f7 (‘net/mlx4: Adapt code for N-Port VF’) Signed-off-by: Andrzej Hajda Acked-by: Or Gerlitz Signed-off-by: David S. Miller — drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 +++– …
Dec 13 2015
s390/hmcdrv: constify hmcdrv_ftp_ops structs
Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Constifies hmcdrv_ftp_ops structures in s390’s char 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: Heiko Carstens Signed-off-by: Martin Schwidefsky — drivers/s390/char/hmcdrv_ftp.c | 6 +++— 1 file changed, 3 insertions(+), 3 deletions(-) diff –git a/drivers/s390/char/hmcdrv_ftp.c b/drivers/s390/char/hmcdrv_ftp.c index d4b61d9..8cb7d8f …
Dec 12 2015
hwmon: (nct6683,nct6775) constify sensor_template_group structures
Author: Julia Lawall <Julia.Lawall@lip6.fr> The sensor_template_group structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Guenter Roeck — drivers/hwmon/nct6683.c | 11 ++++++—– drivers/hwmon/nct6775.c | 11 ++++++—– 2 files changed, 12 insertions(+), 10 deletions(-) diff –git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c index 37f0170..6cf392c 100644 — a/drivers/hwmon/nct6683.c +++ b/drivers/hwmon/nct6683.c …
Dec 11 2015
rtc: v3020: constify v3020_chip_ops structures
Author: Julia Lawall <julia.lawall@lip6.fr> The v3020_chip_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Alexandre Belloni — drivers/rtc/rtc-v3020.c | 6 +++— 1 file changed, 3 insertions(+), 3 deletions(-) diff –git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c index f9f9709..7a04363 100644 — a/drivers/rtc/rtc-v3020.c +++ b/drivers/rtc/rtc-v3020.c @@ -57,7 +57,7 @@ …
Dec 11 2015
bpf: Constify bpf_verifier_ops structure
Author: Julia Lawall <Julia.Lawall@lip6.fr> This bpf_verifier_ops structure is never modified, like the other bpf_verifier_ops structures, so declare it as const. Done with the help of Coccinelle. Link: http://lkml.kernel.org/r/1449855359-13724-1-git-send-email-Julia.Lawall@lip6.fr Signed-off-by: Julia Lawall Signed-off-by: Steven Rostedt — kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 4228fd3..45dd798 100644 — …
Dec 11 2015
[media] media-entity: remove unneded enclosing parenthesis
Author: Javier Martinez Canillas <javier@osg.samsung.com> Commit 86ee417578a2 (« [media] media: convert links from array to list ») had many changes that were automated using coccinelle but the semantic patch was not smart enough to rely on operators precedence and avoid using unnecessary enclosing parenthesis. This patch removes them since are not needed. Suggested-by: Laurent Pinchart Signed-off-by: Javier …
Dec 11 2015
[media] go7007: constify go7007_hpi_ops structures
Author: Julia Lawall <Julia.Lawall@lip6.fr> The go7007_hpi_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/pci/saa7134/saa7134-go7007.c | 2 +- drivers/media/usb/go7007/go7007-priv.h | 2 +- drivers/media/usb/go7007/go7007-usb.c | 4 ++– 3 files changed, 4 insertions(+), 4 deletions(-) diff –git a/drivers/media/pci/saa7134/saa7134-go7007.c …