Articles de cet auteur
Apr 04 2015
clk: versatile: test returned value
Author: Julia Lawall <Julia.Lawall@lip6.fr> Put NULL test on the result of the previous call instead on one of its arguments. A simplified version of the semantic match that finds this problem is as follows (http://coccinelle.lip6.fr/): // r@ expression *e1; expression *e2; identifier f; statement S1,S2; @@ e1 = f(…,e2,…); ( if (e1 == NULL || …
Apr 02 2015
staging: lustre: include: replace OBD_CHECK_DEV_ACTIVE by obd_check_dev_active
Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Static inline functions are preferred over macros. The inline function obd_check_dev_active is introduced to replace OBD_CHECK_DEV_ACTIVE. All functions that call obd_check_dev_active store the return values and return them if they represent an error code. Some of the changes were carried out manually while others were done using coccinelle. Signed-off-by: Aya Mahfouz …
Apr 02 2015
staging: lustre: include: replace OBD_CHECK_DEV by obd_check_dev
Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Static inline functions are preferred over macros. Hence, the function obd_check_dev was introduced. obd_check_dev replaces the macro OBD_CHECK_DEV. All functions that call obd_check_dev store the return values and return them if they represent an error code. Some of the changes were carried out manually while others were done using coccinelle. Signed-off-by: …
Apr 02 2015
Staging: sm750fb: Remove zero testing pointer typed value
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Removes variable comparison with 0. Done using following coccinelle script. @ disable is_zero,isnt_zero @ expression *E; expression E1,f; @@ E = f(…) ?E = E1 @ disable is_zero,isnt_zero @ expression *E; @@ ( E == – 0 + NULL | E != – 0 + NULL | – 0 + …
Mar 31 2015
Staging: rtl8712: Remove zero-testing pointer typed value
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Removes variable comparison with 0 by using !. Done using following coccinelle script. @ disable is_zero,isnt_zero @ expression *E; expression E1,f; @@ E = f(…) ?E = E1 @ disable is_zero,isnt_zero @ expression *E; @@ ( E == – 0 + NULL | E != – 0 + NULL | …
Mar 31 2015
tty: remove buf parameter from tty_name()
Author: Rasmus Villemoes <linux@rasmusvillemoes.dk> tty_name no longer uses the buf parameter, so remove it along with all the 64 byte stack buffers that used to be passed in. Mostly generated by the coccinelle script @depends on patch@ identifier buf; constant C; expression tty; @@ – char buf[C]; allmodconfig compiles, so I’m fairly confident the stack …
Mar 31 2015
Staging: iio: accel: Remove explicit NULL comparison
Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch removes explicit NULL comparison and writes it in its equivalent shorter form. Done with coccinelle. @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/accel/lis3l02dq_ring.c | 6 +++— 1 file changed, 3 insertions(+), 3 deletions(-) diff –git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 20435b5..b892f2c …
Mar 31 2015
Staging: iio: adc: Remove explicit NULL comparison
Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch removes explicit NULL comparison and writes it in its shorter form. Detected with coccinelle. Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/adc/ad7606_ring.c | 2 +- drivers/staging/iio/adc/ad7780.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff –git a/drivers/staging/iio/adc/ad7606_ring.c b/drivers/staging/iio/adc/ad7606_ring.c index 3bf174c..a6f8eb1 100644 — a/drivers/staging/iio/adc/ad7606_ring.c +++ b/drivers/staging/iio/adc/ad7606_ring.c @@ …
Mar 31 2015
Staging: iio: impedance-analyzer: Remove explicit NULL comparison
Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch removes explicit NULL comparison and replaces it with its shorter form. Detected with coccinelle. Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c index 7919439..c18109c 100644 — a/drivers/staging/iio/impedance-analyzer/ad5933.c +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c @@ -703,7 +703,7 @@ static …
Mar 31 2015
Staging: iio: trigger: Remove explicit NULL comparison
Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch removes explicit NULL comparison and replaces it with its shorter form. Detected with coccinelle. Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/trigger/iio-trig-periodic-rtc.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-) diff –git a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c index 89df1d3..0c1976d 100644 — a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c +++ b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c @@ -124,7 +124,7 @@ static …