Author: Supriya Karanth <iskaranth@gmail.com> Remove « break » statement after a « return » statement as it does not get executed. Deadcode found by coccinelle –debug option Signed-off-by: Supriya Karanth Signed-off-by: Greg Kroah-Hartman — drivers/staging/comedi/drivers/ni_mio_common.c | 2 — 1 file changed, 2 deletions(-) diff –git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index ecfd0544..ada050e 100644 — a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -3811,8 +3811,6 @@ …
Catégorie : Linux
Mar 13 2015
Staging: comedi: Remove parentheses around right side assignment
Author: Haneen Mohammed <hamohammed.sa@gmail.com> Parentheses are not needed around the right hand side of an assignment. This patch remove parenthese of such occurences. Issue was detected and solved using the following coccinelle script: @rule1@ identifier x, y, z; expression E1, E2; @@ ( x = (y == z); | x = (E1 == E2); | …
Mar 12 2015
staging: lustre: Use kmemdup rather than duplicating its implementation
Author: Ravindran, Madhusudhanan (M.) <mravindr@visteon.com> The semantic patch that makes this change is available in scriptcoccinelle/api/memdup.cocci. Signed-off-by: Madhusudhanan Ravindran Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/llite/xattr_cache.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index 7e2fcfe..da190f9 100644 — a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -132,11 +132,10 @@ static int ll_xattr_cache_add(struct list_head *cache, …
Mar 12 2015
Staging: iio: Simplify return logic
Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch removes the conditional return of the ade77*_probe functions based on the return values of iio_device_register as the latter returns 0 or ret, the same as the checked values. Warning found by coccinelle. Signed-off-by: Cristina Opriceana Reviewed-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/meter/ade7753.c | 6 +—– drivers/staging/iio/meter/ade7754.c | 6 …
Mar 12 2015
staging: sm750fb: remove intialization of static ints
Author: Supriya Karanth <iskaranth@gmail.com> static ints are initialized to 0 by the compiler. Explicit initialization is not necessary. Found by checkpatch.pl – ERROR: do not initialise statics to 0 or NULL changes made using coccinelle script: @@ type T; identifier var; @@ static T var – =0 ; Signed-off-by: Supriya Karanth Signed-off-by: Greg Kroah-Hartman — …
Mar 12 2015
staging: rtl8723au: remove intialization of static ints
Author: Supriya Karanth <iskaranth@gmail.com> static ints are initialized to 0 by the compiler. Explicit initialization is not necessary. Found by checkpatch.pl – ERROR: do not initialise statics to 0 or NULL changes made using coccinelle script: @@ type T; identifier var; @@ static T var – =0 ; Signed-off-by: Supriya Karanth Signed-off-by: Greg Kroah-Hartman — …
Mar 12 2015
staging: rtl8188eu: remove intialization of static ints
Author: Supriya Karanth <iskaranth@gmail.com> static ints are initialized to 0 by the compiler. Explicit initialization is not necessary. Found by checkpatch.pl – ERROR: do not initialise statics to 0 or NULL changes made using coccinelle script: @@ type T; identifier var; @@ static T var – =0 ; Signed-off-by: Supriya Karanth Signed-off-by: Greg Kroah-Hartman — …
Mar 12 2015
staging: i2o: remove intialization of static ints
Author: Supriya Karanth <iskaranth@gmail.com> static ints are initialized to 0 by the compiler. Explicit initialization is not necessary. Found by checkpatch.pl – ERROR: do not initialise statics to 0 or NULL changes made using coccinelle script: @@ type T; identifier var; @@ static T var – =0 ; Signed-off-by: Supriya Karanth Signed-off-by: Greg Kroah-Hartman — …
Mar 12 2015
Staging: rtl8192e: Remove unnecessary variables
Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch removes unnecessary intermediary variables in return lines and uses actual values. Found by coccinelle using this semantic patch: @@ type T; expression expr; identifier r; @@ -T r = expr; … when != r when strict -return r; +return expr; Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | …
Mar 12 2015
Staging: rtl8192u: Remove unnecessary variable
Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch detects the cases in which a variable is not modified through the code and it is used as a return value. The variable is detected and removed by coccinelle using the following semantic patch: @@ type T; expression expr; identifier r; constant c; @@ -T r = expr; … …