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 …
Catégorie : Linux
Jan 22 2013
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 ++—- …
Jan 21 2013
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, …
Jan 21 2013
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 …
Jan 21 2013
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@ …
Jan 21 2013
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@ …
Jan 21 2013
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@ …
Jan 21 2013
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@ …
Jan 21 2013
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 …; …
Jan 21 2013
[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@ …