Catégorie : Linux

IB/core: Use memdup_user() rather than duplicating its implementation

Author: Markus Elfring <elfring@users.sourceforge.net> * Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. * The local variable « ret » will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford — …

Lire la suite

IB/qib: Use memdup_user() rather than duplicating its implementation

Author: Markus Elfring <elfring@users.sourceforge.net> Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford — drivers/infiniband/hw/qib/qib_fs.c | 26 +++++——————— 1 file changed, 5 insertions(+), 21 deletions(-)   diff –git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c index fcdf3791..c3edc03 100644 — a/drivers/infiniband/hw/qib/qib_fs.c …

Lire la suite

powerpc/powernv/pci: fix iterator signedness

Author: Andrzej Hajda <a.hajda@samsung.com> Unsigned type is always non-negative, so the loop could not end in case condition is never true. The problem has been detected using semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci Signed-off-by: Andrzej Hajda Signed-off-by: Benjamin Herrenschmidt — arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index fd9444f..1321826 …

Lire la suite

powerpc: mpc8349emitx: Delete unnecessary assignment for the field « owner »

Author: Markus Elfring <elfring@users.sourceforge.net> The field « owner » is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Benjamin Herrenschmidt — arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c index dbcd030..63c5ab64 100644 — a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c +++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c @@ -222,7 +222,6 @@ static const struct …

Lire la suite

powerpc/512x: Delete unnecessary assignment for the field « owner »

Author: Markus Elfring <elfring@users.sourceforge.net> The field « owner » is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Benjamin Herrenschmidt — arch/powerpc/platforms/512x/mpc512x_lpbfifo.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/arch/powerpc/platforms/512x/mpc512x_lpbfifo.c b/arch/powerpc/platforms/512x/mpc512x_lpbfifo.c index 8eb82b0..d93dd4a 100644 — a/arch/powerpc/platforms/512x/mpc512x_lpbfifo.c +++ b/arch/powerpc/platforms/512x/mpc512x_lpbfifo.c @@ -528,7 +528,6 @@ static struct platform_driver …

Lire la suite

Thermal-INT3406: Delete owner assignment

Author: Markus Elfring <elfring@users.sourceforge.net> The field « owner » is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Zhang Rui — drivers/thermal/int340x_thermal/int3406_thermal.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/thermal/int340x_thermal/int3406_thermal.c b/drivers/thermal/int340x_thermal/int3406_thermal.c index a578cd2..1891f34 100644 — a/drivers/thermal/int340x_thermal/int3406_thermal.c +++ b/drivers/thermal/int340x_thermal/int3406_thermal.c @@ -225,7 +225,6 @@ static struct platform_driver int3406_thermal_driver …

Lire la suite

drivers/macintosh: Delete owner assignment

Author: Markus Elfring <elfring@users.sourceforge.net> The field « owner » is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring Signed-off-by: Benjamin Herrenschmidt — drivers/macintosh/ams/ams-i2c.c | 1 – drivers/macintosh/windfarm_pm112.c | 1 – drivers/macintosh/windfarm_pm72.c | 1 – drivers/macintosh/windfarm_rm31.c | 1 – 4 files changed, 4 deletions(-)   diff –git a/drivers/macintosh/ams/ams-i2c.c b/drivers/macintosh/ams/ams-i2c.c index 978eda8..8a3ba56 100644 …

Lire la suite

MIPS: Modify error handling

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> debugfs_create_file returns NULL on error so an IS_ERR test is incorrect here and a NULL check is required. The Coccinelle semantic patch used to make this change is as follows: @@ expression e; @@ e = debugfs_create_file(…); if( – IS_ERR(e) + !e ) { } Signed-off-by: Amitoj Kaur Chawla Cc: …

Lire la suite

zsmalloc: Delete an unnecessary check before the function call « iput »

Author: Markus Elfring <elfring@users.sourceforge.net> iput() tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Link: http://lkml.kernel.org/r/559cf499-4a01-25f9-c87f-24d906626a57@users.sourceforge.net Signed-off-by: Markus Elfring Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — mm/zsmalloc.c | 3 +– …

Lire la suite

rtc: asm9260: remove .owner field for driver

Author: Wei Yongjun <weiyj.lk@gmail.com> Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: Alexandre Belloni — drivers/rtc/rtc-asm9260.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c index 355fdb9..5219916 100644 — a/drivers/rtc/rtc-asm9260.c +++ b/drivers/rtc/rtc-asm9260.c @@ -343,7 +343,6 @@ static struct platform_driver asm9260_rtc_driver = …

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.