Quentin LAMBERT

Articles de cet auteur

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 …

Lire la suite

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 …

Lire la suite

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(+), …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

Staging: iio: meter: ade7753: Merged assignment with immediately following return statement

Author: Tina Johnson <tinajohnson.1234@gmail.com> Saved one line of code by merging the assigning and return statements of variable ret. And thus removed variable len which was no longer useful. This patch was done using Coccinelle script and the following semantic patch was used: @@ expression ret; identifier f; @@ -ret = +return f(…); -return ret; …

Lire la suite

Staging: rtl8188eu: os_dep: Compression of lines for immediate return

Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch compresses two lines in to a single line in file rtw_android.c if immediate return statement is found. It also removes variable bytes_written as it is no longer needed. It is done using script Coccinelle. And coccinelle uses following semantic patch for this compression function: @@ expression ret; identifier f; …

Lire la suite

wil6210: fix PTR_ERR() usage after initialization to constant

Author: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Reported by coccinelle: tree: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master head: 6a5d088a923854569e20eac4f3f569926d5911ec commit: b7cde47009640b88cb3629ee7078a43bc2642459 [18/80] wil6210: convert debugfs to the table mode coccinelle warnings: (new ones prefixed by >>) >> drivers/net/wireless/ath/wil6210/debugfs.c:327:17-24: ERROR: PTR_ERR applied after initialization to constant on line 304 vim +327 drivers/net/wireless/ath/wil6210/debugfs.c 298 struct dentry *dbg, void *base, 299 const struct dbg_off * …

Lire la suite

staging: lustre: lov: expand the GOTO macro

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ – GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ – GOTO(lbl,rc); + rc; + goto lbl; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/lov/lov_obd.c | 152 +++++++++++++++——— drivers/staging/lustre/lustre/lov/lov_object.c …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.