Catégorie : Linux

powerpc: don’t export static symbol

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ type T; identifier f; @@ static T f (…) { … } @@ identifier r.f; declarer name EXPORT_SYMBOL; @@ -EXPORT_SYMBOL(f); // Furthermore, the function is never used, so its definition is dropped as well. Signed-off-by: Julia Lawall Signed-off-by: …

Lire la suite

NFSv4.1: don’t export static symbol

Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ type T; identifier f; @@ static T f (…) { … } @@ identifier r.f; declarer name EXPORT_SYMBOL_GPL; @@ -EXPORT_SYMBOL_GPL(f); // Signed-off-by: Julia Lawall Signed-off-by: Trond Myklebust — fs/nfs/pnfs.c | 2 — 1 file changed, 2 deletions(-)   …

Lire la suite

staging: sm750fb: Add void to function definition with no arguments

Author: Supriya Karanth <iskaranth@gmail.com> Found by checkpatch.pl – ERROR: Bad function definition A function with no arguments allows for variadic arguments. Add void in between the empty parentheses to indicate that the function takes no arguments. changes made using coccinelle script: @@ type T; identifier f; @@ T f( +void ) { … } Signed-off-by: …

Lire la suite

Staging: dgnc: Use goto for spinlock release before return

Author: Quentin Lambert <lambert.quentin@gmail.com> spin_unlock_irqrestore() is called at several different places before exiting. This patch uses a goto statement to factorize these calls. Coccinelle was used to generate this patch. Signed-off-by: Quentin Lambert Signed-off-by: Greg Kroah-Hartman — drivers/staging/dgnc/dgnc_tty.c | 48 ++++++++++++++++++++——————— 1 file changed, 23 insertions(+), 25 deletions(-)   diff –git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index d78e5bf..8445f84 …

Lire la suite

Staging: dgnc: Use goto for error handling

Author: Quentin Lambert <lambert.quentin@gmail.com> This patch introduces goto statments for error handling and in cases where a lock needs to be released. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @candidates exists@ identifier f, label; statement s; position p1, p2, p3; @@ f@p1(…) { …when any if@p2(…) { …

Lire la suite

Staging: rtl8192u: Combine initialization using setup_timer

Author: Somya Anand <somyaanand214@gmail.com> The function setup_timer combines the initialization of a timer with the initialization of the timer’s function and data fields. So, this patch combines the multiline code for timer initialization using the function setup_timer. This issue is identified via coccinelle script. @@ expression E1, E2, E3; type T; @@ – init_timer(&E1); … …

Lire la suite

Staging: lustre: Use setup_timer to combine initialization

Author: Somya Anand <somyaanand214@gmail.com> The function setup_timer combines the initialization of a timer with the initialization of the timer’s function and data fields. So, this patch combines the multiline code for timer initialization using the function setup_timer. This issue is identified via coccinelle script. @@ expression E1, E2, E3; type T; @@ – init_timer(&E1); … …

Lire la suite

Staging: dgap: Use setup_timer to combine initialization

Author: Somya Anand <somyaanand214@gmail.com> The function setup_timer combines the initialization of a timer with the initialization of the timer’s function and data fields. So, this patch combines the multiline code for timer initialization using the function setup_timer. This issue is identified via coccinelle script. @@ expression E1, E2, E3; type T; @@ – init_timer(&E1); … …

Lire la suite

Staging: comedi: Use function setup_timer for combining initialization

Author: Somya Anand <somyaanand214@gmail.com> The function setup_timer combines the initialization of a timer with the initialization of the timer’s function and data fields. So, this patch combines the multiline code for timer initialization using the function setup_timer. This issue is identified via coccinelle script. @@ expression E1, E2, E3; type T; @@ – init_timer(&E1); … …

Lire la suite

Staging: rtl8192e: Eliminate use of MSECS macro

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use msecs_to_jiffies instead of driver specific macro MSECS. This is done using Coccinelle and semantic patch used for this is as follows: @@expression t;@@ – MSECS(t) + msecs_to_jiffies(t) Signed-off-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 6 +++— drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++– drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 6 +++— drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 13 +++++++—— …

Lire la suite