lkml.org 
[lkml]   [2019]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] coccinelle: platform_get_irq: drop unneeded metavariable
Date
From: Masahiro Yamada <yamada.masahiro@socionext.com>

Having E as a metavariable adds the requirement to verify its type.
This seems like an unnecessary constraint, so drop it.
There is currently no impact on the set of results.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
scripts/coccinelle/api/platform_get_irq.cocci | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/scripts/coccinelle/api/platform_get_irq.cocci b/scripts/coccinelle/api/platform_get_irq.cocci
index e5d04fb..17e5895 100644
--- a/scripts/coccinelle/api/platform_get_irq.cocci
+++ b/scripts/coccinelle/api/platform_get_irq.cocci
@@ -11,7 +11,6 @@ virtual report

@depends on context@
expression ret;
-struct platform_device *E;
@@

ret =
@@ -19,7 +18,7 @@ ret =
platform_get_irq
|
platform_get_irq_byname
-)(E, ...);
+)(...);

if ( \( ret < 0 \| ret <= 0 \) )
{
@@ -30,7 +29,6 @@ if ( \( ret < 0 \| ret <= 0 \) )

@depends on patch@
expression ret;
-struct platform_device *E;
statement S;
@@

@@ -39,7 +37,7 @@ ret =
platform_get_irq
|
platform_get_irq_byname
-)(E, ...);
+)(...);

if ( \( ret < 0 \| ret <= 0 \) )
-{
@@ -49,7 +47,6 @@ S

@depends on patch@
expression ret;
-struct platform_device *E;
@@

ret =
@@ -57,7 +54,7 @@ ret =
platform_get_irq
|
platform_get_irq_byname
-)(E, ...);
+)(...);

if ( \( ret < 0 \| ret <= 0 \) )
{
@@ -76,7 +73,6 @@ if ( \( ret < 0 \| ret <= 0 \) )
@r depends on org || report@
position p1;
expression ret;
-struct platform_device *E;
@@

ret =
@@ -84,7 +80,7 @@ ret =
platform_get_irq
|
platform_get_irq_byname
-)(E, ...);
+)(...);

if ( \( ret < 0 \| ret <= 0 \) )
{
\
 
 \ /
  Last update: 2019-11-19 19:04    [W:0.099 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site