Catégorie : Linux

gpio: xgene: fix type of variable containing error codes

Author: Andrzej Hajda <a.hajda@samsung.com> ret variable can contain error values and is compared with zero. Its type must be signed. The problem has been detected using coccinelle script scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci Signed-off-by: Andrzej Hajda Signed-off-by: Linus Walleij — drivers/gpio/gpio-xgene-sb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/gpio/gpio-xgene-sb.c b/drivers/gpio/gpio-xgene-sb.c index b993b86..fd81ebc 100644 …

Lire la suite

gpio: xgene: fix type of variable containing error codes

Author: Andrzej Hajda <a.hajda@samsung.com> ret variable can contain error values and is compared with zero. Its type must be signed. The problem has been detected using coccinelle script scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci Signed-off-by: Andrzej Hajda Signed-off-by: Linus Walleij — drivers/gpio/gpio-xgene-sb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/gpio/gpio-xgene-sb.c b/drivers/gpio/gpio-xgene-sb.c index b993b86..fd81ebc 100644 …

Lire la suite

ASoC: max9867: fix type of variable containing error codes

Author: Andrzej Hajda <a.hajda@samsung.com> value variable can contain error values and is compared with zero. Its type must be signed. The problem has been detected using coccinelle script scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci Signed-off-by: Andrzej Hajda Reviewed-by: Axel Lin Signed-off-by: Mark Brown — sound/soc/codecs/max9867.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)   diff –git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c …

Lire la suite

staging: fbtft: Use kmalloc_array

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Use kmalloc_array instead of kmalloc for arrays to prevent integer overflows. This was done using Coccinelle: @@ expression e1, e2; constant C; type t; @@ ( – kmalloc( + kmalloc_array( e2 – * + , sizeof(e1), C) | – kmalloc( + kmalloc_array( e1 – * + , sizeof(t), C) | – …

Lire la suite

staging: rtl8712: Remove unnecessary parantheses

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Removed parantheses on the right hand side of assignments as they are not needed. This was done with Coccinelle: @@ expression a, b; @@ a = – ( b – ) ; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/ieee80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   …

Lire la suite

staging: rtl8188eu: Remove unnecessary parantheses

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Removed parantheses on the right hand side of assignments as they are not needed. This was done with Coccinelle: @@ expression a, b; @@ a = – ( b – ) ; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   …

Lire la suite

staging: rtl8723au: Remove unnecessary parantheses

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Removed parantheses on the right hand side of assignments as they are not needed. This was done with Coccinelle: @@ expression a, b; @@ a = – ( b – ) ; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   …

Lire la suite

staging: rdma: hfi1: Compress return logic

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Simplified function return by merging assignment and return into one line. Found with Coccinelle. @@ expression e; local idexpression ret; @@ – ret = + return e; – return ret; @@ type T; identifier x; @@ – T x; … when != x Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rdma/hfi1/user_pages.c …

Lire la suite

staging: most: hdm-usb: Use macro DIV_ROUND_UP

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> The macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) /(d)). It clarifies the divisor calculations. This occurence was detected using the coccinelle script: @@ expression e1; expression e2; @@ ( – ((e1) + e2 – 1) / (e2) + DIV_ROUND_UP(e1,e2) | – ((e1) + (e2 – 1))/ (e2) + …

Lire la suite

usb: dwc2: Use kmem_cache_free()

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Here, free memory is allocated using kmem_cache_zalloc. So, use kmem_cache_free instead of kfree. This is done using Coccinelle and semantic patch used is as follows: // @@ expression x,E,c; @@ x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,…) … when != x = E when != &x ?-kfree(x) +kmem_cache_free(c,x) // Acked-by: John Youn Signed-off-by: Amitoj …

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.