Skip to contentSkip to conversation

staging: gasket: apex: Modify return type suggested by Coccinelle.

PATCH In review Sanjana Sanikommu 2 participants 3 messages Apr 1, 2019 – Apr 2, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: gasket: apex: Modify return type suggested by Coccinelle.

The last two lines in the function could
be compressed into one. Avoid usage of local variable. Issue found by Coccinelle using ret.cocci.

---
 drivers/staging/gasket/apex_driver.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/gasket/apex_driver.c +1 -3
index a79613db71ef..2be45ee9d061 100644
@@ -439,9 +439,7 @@ static int apex_reset(struct gasket_dev *gasket_dev)
 		if (ret)
 			return ret;
 	}
-	ret = apex_quit_reset(gasket_dev);
-
-	return ret;
+	return apex_quit_reset(gasket_dev);
 }
 
 /*
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 14 lines · Sanjana Sanikommu

The last two lines in the function could
be compressed into one. Avoid usage of local variable. Issue found by Coccinelle using ret.cocci.

---
 drivers/staging/gasket/apex_driver.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/gasket/apex_driver.c +0 -0
index a79613db71ef..2be45ee9d061 100644

drivers/staging/gasket/apex_driver.c static int apex_reset(struct gasket_dev *gasket_dev) · line 445

Quoted 10 lines
drivers/staging/gasket/apex_driver.c +1 -3
@@ -439,9 +439,7 @@ static int apex_reset(struct gasket_dev *gasket_dev)
 		if (ret)
 			return ret;
 	}
-	ret = apex_quit_reset(gasket_dev);
-
-	return ret;
+	return apex_quit_reset(gasket_dev);
 }
 
 /*

This patch does not apply to my tree at all, I think someone else already did this before you did. Please update your local tree and verify this.

thanks,

greg k-h

#2 lore raw
Quoted 26 lines · gregkh

Review

Quoted 10 lines · Sanjana Sanikommu

The last two lines in the function could
be compressed into one. Avoid usage of local variable. Issue found by Coccinelle using ret.cocci.

Signed-off-by Sanjana Sanikommu <[email protected] <javascript:>>

---

 drivers/staging/gasket/apex_driver.c | 4 +--- 
 1 file changed, 1 insertion(+), 3 deletions(-) 
(quoted diff) +0 -0

b/drivers/staging/gasket/apex_driver.c

Quoted 13 lines

index a79613db71ef..2be45ee9d061 100644

drivers/staging/gasket/apex_driver.c +1 -3
@@ -439,9 +439,7 @@ static int apex_reset(struct gasket_dev *gasket_dev) 
                 if (ret) 
                         return ret; 
         } 
-        ret = apex_quit_reset(gasket_dev); 
- 
-        return ret; 
+        return apex_quit_reset(gasket_dev); 
 } 
 
Quoted 6 lines

drivers/staging/gasket/apex_driver.c static int apex_reset(struct gasket_dev *gasket_dev) · line 445

Quoted 1 line
drivers/staging/gasket/apex_driver.c +0 -0
 /* 

This patch does not apply to my tree at all, I think someone else already did this before you did. Please update your local tree and verify this.

Sure, I would drop this.
Thanks
Sanjana

Quoted 5 lines

thanks,

greg k-h