Catégorie : Linux

[media] staging/media/solo6x10: Use PTR_RET rather than if(IS_ERR(…)) + PTR_ERR

Author: Peter Huewe <PeterHuewe@gmx.de> Found with coccicheck. The semantic patch that makes this change is available in scripts/coccinelle/api/ptr_ret.cocci. Signed-off-by: Peter Huewe Signed-off-by: Mauro Carvalho Chehab — drivers/staging/media/solo6x10/v4l2.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-)   diff –git a/drivers/staging/media/solo6x10/v4l2.c b/drivers/staging/media/solo6x10/v4l2.c index 571c3a3..ca774cc 100644 — a/drivers/staging/media/solo6x10/v4l2.c +++ b/drivers/staging/media/solo6x10/v4l2.c @@ -415,10 +415,7 @@ static int …

Lire la suite

crypto: use ERR_CAST

Author: Julia Lawall <Julia.Lawall@lip6.fr> Replace PTR_ERR followed by ERR_PTR by ERR_CAST, to be more concise. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression err,x; @@ – err = PTR_ERR(x); if (IS_ERR(x)) – return ERR_PTR(err); + return ERR_CAST(x); // Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu — crypto/aead.c | 6 ++—- …

Lire la suite

staging/iio: Use correct argument for sizeof

Author: Peter Huewe <peterhuewe@gmx.de> found with coccicheck sizeof when applied to a pointer typed expression gives the size of the pointer The semantic patch that makes this output is available in scripts/coccinelle/misc/noderef.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Peter Huewe Signed-off-by: Jonathan Cameron — drivers/staging/iio/iio_hwmon.c | 2 +- 1 file changed, …

Lire la suite

staging/comedi: Use bool initializations

Author: Peter Huewe <peterhuewe@gmx.de> Found with coccicheck. The semantic patch that makes this output is available in scripts/coccinelle/misc/boolinit.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Peter Huewe Signed-off-by: Greg Kroah-Hartman — drivers/staging/comedi/comedi_fops.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 3e82ab9..dc3588a 100644 — a/drivers/staging/comedi/comedi_fops.c …

Lire la suite

IB/mlx4: Adjust duplicate test

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete successive tests to the same location. The code tested the result of a previous allocation, that itself was already tested. It is changed to test the result of the most recent allocation. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ …

Lire la suite

drivers/ipack/devices/ipoctal.c: adjust duplicate test

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete successive tests to the same location. The code tested the result of a previous allocation, that itself was already tested. It is changed to test the result of the most recent allocation. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ …

Lire la suite

arch/powerpc/platforms/85xx/p1022_ds.c: adjust duplicate test

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete successive tests to the same location. The code tested the result of a previous call, that itself was already tested. It is changed to test the result of the most recent call. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ …

Lire la suite

crypto: atmel-aes – adjust duplicate test

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete successive tests to the same location. The code tested the result of a previous allocation, that itself was already tested. It is changed to test the result of the most recent allocation. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ …

Lire la suite

drivers/net/wireless/iwlegacy/4965-mac.c: adjust duplicate test

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete successive tests to the same location. This looks like simple code duplication. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ local idexpression y; expression x,e; @@ *if ( \(x == NULL\|IS_ERR(x)\|y != 0\) ) { … when forall return …; …

Lire la suite

[SCSI] bnx2fc: adjust duplicate test

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete successive tests to the same location. The code tested the result of a previous allocation, that itself was already tested. It is changed to test the result of the most recent allocation. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @s exists@ …

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.