Catégorie : Linux

ASoC: nau8825: fix platform_no_drv_owner.cocci warnings

Author: kbuild test robot <lkp@intel.com> sound/soc/codecs/nau8825.c:1096:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Anatol Pomozov Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown — sound/soc/codecs/nau8825.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c …

Lire la suite

clk: vt8500: fix sign of possible PLL values

Author: Andrzej Hajda <a.hajda@samsung.com> With unsigned values underflow in loops can occur resulting in theoretically infinite loops. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Stephen Boyd — drivers/clk/clk-vt8500.c | 9 ++++++— 1 file changed, 6 insertions(+), 3 deletions(-)   diff –git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c index 37e9288..98c4492 …

Lire la suite

[media] i2c: fix platform_no_drv_owner.cocci warnings

Author: Fengguang Wu <fengguang.wu@intel.com> drivers/media/i2c/ml86v7667.c:430:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Geert Uytterhoeven Signed-off-by: Fengguang Wu Signed-off-by: Mauro Carvalho Chehab — drivers/media/i2c/ml86v7667.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/media/i2c/ml86v7667.c b/drivers/media/i2c/ml86v7667.c …

Lire la suite

perf/x86/intel/uncore: Do not use macro DEFINE_PCI_DEVICE_TABLE()

Author: Vaishali Thakkar <vthakkar1994@gmail.com> The DEFINE_PCI_DEVICE_TABLE() macro is deprecated. Use ‘struct pci_device_id’ instead of DEFINE_PCI_DEVICE_TABLE(), with the goal of getting rid of this macro completely. This Coccinelle semantic patch performs this transformation: @@ identifier a; declarer name DEFINE_PCI_DEVICE_TABLE; initializer i; @@ – DEFINE_PCI_DEVICE_TABLE(a) + const struct pci_device_id a[] = i; Signed-off-by: Vaishali Thakkar Cc: Arnaldo …

Lire la suite

Staging: most: Use module_i2c_driver

Author: Shraddha Barke <shraddha.6596@gmail.com> Macro module_i2c_driver is used for drivers whose init and exit paths does only register and unregister to i2c API. Remove some boilerplate code by using module_i2c_driver. Problem found using Coccinelle. Signed-off-by: Shraddha Barke Signed-off-by: Greg Kroah-Hartman — drivers/staging/most/hdm-i2c/hdm_i2c.c | 22 +——————— 1 file changed, 1 insertion(+), 21 deletions(-)   diff –git …

Lire la suite

power: bq27xxx_battery: fix signedness bug in bq27xxx_battery_read_health()

Author: Andrzej Hajda <a.hajda@samsung.com> We need flags to be signed for the error handling to work. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Fixes: 74aab849f342 (‘power: bq27xxx_battery: Cleanup health checking’) Signed-off-by: Andrzej Hajda Signed-off-by: Dan Carpenter Acked-By: Pali Rohár Acked-by: Andrew F. Davis Signed-off-by: Sebastian Reichel — drivers/power/bq27xxx_battery.c | …

Lire la suite

bna: fix error handling

Author: Andrzej Hajda <a.hajda@samsung.com> Several functions can return negative value in case of error, so their return type should be fixed as well as type of variables to which this value is assigned. 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: David S. Miller — drivers/net/ethernet/brocade/bna/bfa_ioc.c …

Lire la suite

tools: bpf_jit_disasm: make get_last_jit_image return unsigned

Author: Andrzej Hajda <a.hajda@samsung.com> The function returns always non-negative values. 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: David S. Miller — tools/net/bpf_jit_disasm.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/tools/net/bpf_jit_disasm.c b/tools/net/bpf_jit_disasm.c index 2cd3d4c..5b32413 100644 — a/tools/net/bpf_jit_disasm.c +++ b/tools/net/bpf_jit_disasm.c @@ …

Lire la suite

libata: samsung_cf: fix handling platform_get_irq result

Author: Andrzej Hajda <a.hajda@samsung.com> The function can return negative value. 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: Tejun Heo — drivers/ata/pata_samsung_cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index cbb5a47..f6facd6 100644 — a/drivers/ata/pata_samsung_cf.c +++ b/drivers/ata/pata_samsung_cf.c @@ -70,7 …

Lire la suite

mac80211: make ieee80211_new_mesh_header return unsigned

Author: Andrzej Hajda <a.hajda@samsung.com> The function returns always non-negative values. 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: Johannes Berg — net/mac80211/mesh.c | 6 +++— net/mac80211/mesh.h | 6 +++— 2 files changed, 6 insertions(+), 6 deletions(-)   diff –git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 62b3e29..626e8de 100644 — a/net/mac80211/mesh.c …

Lire la suite