Author: Mahati Chamarthy <mahati.chamarthy@gmail.com> This patch merges an assignment with an immediately following return of the assigned variable. The following Coccinelle semantic patch was used to make this transformation: @@ expression ret; identifier f; @@ -ret = +return f(…); -return ret; A variable that became unused due to this transformation was also removed. Signed-off-by: Mahati …
Catégorie : Linux
Sep 21 2014
Staging: vt6656: Merges two lines of code and removes unused variable
Author: Mahati Chamarthy <mahati.chamarthy@gmail.com> This patch merges an assignment with an immediately following return of the assigned variable.The following Coccinelle semantic patch was used to make this transformation: @@ expression ret; identifier f; @@ -ret = +return f(…); -return ret; A variable that became unused due to this transformation was also removed. Signed-off-by: Mahati Chamarthy …
Sep 21 2014
Staging: rtl8192e: rtl8192e: Merges two lines of code and removes unused variable
Author: Mahati Chamarthy <mahati.chamarthy@gmail.com> This patch merges an assignment with an immediately following return of the assigned variable. It also removes a variable that becomes unused due to this transformation. The following Coccinelle semantic patch was used to make this transformation: @@ expression ret; identifier f; @@ -ret = +return f(…); -return ret; @@ identifier …
Sep 20 2014
Staging: lustre: Replace GOTO macro with necessary code
Author: Tina Johnson <tinajohnson.1234@gmail.com> The GOTO macro is neither standard in Linux nor does its definiton contain much useful code. Hence GOTO can be replaced with useful parts of its definition. In a statement like GOTO(label, rc), the replacing code will be goto label if rc is a constant or a variable. But in cases …
Sep 19 2014
Staging: dgnc: Merge lines and remove unused variable for immediate return
Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch merges two lines in a single line if immediate return is found. It also removes unnecessory variable rc as it is no longer needed. This is done using Coccinelle. Semantic patch used for this is as follows: @@ type T; identifier i; identifier f; constant C; @@ – T …
Sep 19 2014
staging: lustre: llite: Use kzalloc and rewrite null tests
Author: Julia Lawall <Julia.Lawall@lip6.fr> This patch removes some kzalloc-related macros and rewrites the associated null tests to use !x rather than x == NULL. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; statement S,S1; @@ \(OBD_ALLOC\|OBD_ALLOC_WAIT\|OBD_ALLOC_PTR\|OBD_ALLOC_PTR_WAIT\)(ptr,…); if ( + ! ptr – == NULL …
Sep 18 2014
Staging: dgap: Remove unnecessary variable.
Author: Ankita Patil <patil.ankita.r@gmail.com> This patch removes unnecessary variable in file dgap.c using Coccinelle. Semantic patch for this is as follows: @@ expression ret; identifier f; @@ -ret = +return f(…); -return ret; Also removed the unneeded variable manually. Signed-off-by: Ankita Patil Signed-off-by: Greg Kroah-Hartman — drivers/staging/media/omap24xx/omap24xxcam.c | 10 ++——– 1 file changed, 2 insertions(+), …
Sep 17 2014
Staging: rtl8192e: rtl8192e: Remove unnecessory variable
Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch removes unnecessory variable in file ret_core.c using coccinelle script.Semantic patch for this is as follows: @@ identifier ret; @@ -int ret = 0; … when != ret when strict -return ret; +return 0; Signed-off-by: Vaishali Thakkar Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 9 ++++—– 1 file …
Sep 17 2014
Staging: media: lirc: lirc_imon: Removed unnecessary variable to simplify return variable handling
Author: Tina Johnson <tinajohnson.1234@gmail.com> Variable rc was removed after merging its assignment statement with immediately following return statement. Variable retval is not used at all other that to return its initial value.Hence replaced retval with its initial value in the return statement and removed the variable. This patch was done using Coccinelle script and the …
Sep 16 2014
Input: palmas-pwrbutton – use IRQF_ONESHOT
Author: Nishanth Menon <nm@ti.com> make C=2 CHECK= »scripts/coccicheck » MODE=report COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci ./drivers/input/misc/palmas-pwrbutton.o Reports: drivers/input/misc/palmas-pwrbutton.c:213:9-29: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Palmas power button just needs threaded IRQ handler since I2C operations are involved and there is nothing in non-threaded primary handler we could do. So mark the request with ONESHOT as it should …