Articles de cet auteur
Sep 23 2014
Staging: vt6656: Merge two lines of code into one
Author: Rajbinder Brar <brar.rajbinder@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: Rajbinder Brar …
Sep 23 2014
staging: dgnc: Replace non-standard spinlock’s macros
Author: Roberta Dobrescu <roberta.dobrescu@gmail.com> This patch replaces non-standard spinlock’s macros. It is done using coccinelle and the following semantic patch: @@ expression x; @@ – DGNC_SPINLOCK_INIT(x) + spin_lock_init(&x) @@ expression x, y; @@ – DGNC_LOCK(x, y) + spin_lock_irqsave(&x, y) @@ expression x, y; @@ – DGNC_UNLOCK(x, y) + spin_unlock_irqrestore(&x, y) @used_by_lock exists@ typedef ulong; symbol …
Sep 23 2014
[media] dib0700_devices: Use c99 initializers for structures.
Author: Mauro Carvalho Chehab <mchehab@osg.samsung.com> A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @decl@ identifier i1,fld; type T; field list[n] fs; @@ struct i1 { fs T fld; …}; @bad@ identifier decl.i1,i2; expression e; initializer list[decl.n] is; @@ struct i1 i2 = { is, + .fld = …
Sep 22 2014
Staging: vme: devices: 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; Signed-off-by: Mahati Chamarthy Signed-off-by: Greg Kroah-Hartman — drivers/staging/vme/devices/vme_user.c | 4 +— 1 file changed, …
Sep 22 2014
staging: rtl8192u: remove unecessary variable
Author: Tapasweni Pathak <tapaswenipathak@gmail.com> This patch removes unncessary variable in file r8192U_core.c using Coccinelle. Semantic patch for this is as follows : @@ identifier ret; @@ -int ret = 0; … when != ret when strict -return ret; +return 0; Signed-off-by: Tapasweni Pathak Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192u/r8192U_core.c | 9 ++++—– 1 file changed, 4 …
Sep 22 2014
staging: rtl8712: merge lines and remove unused variable for immediate return
Author: Tapasweni Pathak <tapaswenipathak@gmail.com> This patch merge two lines in a single line if immediate return is found. Unused variables in each case were removed manually as they are no longer needed. This is done using Coccinelle. Semantic patch used for this is as follows : @@ expression ret; identifier f; @@ -ret = +return …
Sep 21 2014
Staging: vt6656: Merges two lines of code and also 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 …
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 …