* [PATCH] staging: gasket: apex: Modify return type suggested by Coccinelle.
@ 2019-04-01 13:29 Sanjana Sanikommu
2019-04-01 17:31 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Sanjana Sanikommu @ 2019-04-01 13:29 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
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 <sanjana99reddy99@gmail.com>
---
drivers/staging/gasket/apex_driver.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
index a79613db71ef..2be45ee9d061 100644
--- a/drivers/staging/gasket/apex_driver.c
+++ b/drivers/staging/gasket/apex_driver.c
@@ -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);
}
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: gasket: apex: Modify return type suggested by Coccinelle.
2019-04-01 13:29 [PATCH] staging: gasket: apex: Modify return type suggested by Coccinelle Sanjana Sanikommu
@ 2019-04-01 17:31 ` Greg KH
2019-04-02 4:40 ` sanjana99reddy99
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2019-04-01 17:31 UTC (permalink / raw)
To: Sanjana Sanikommu; +Cc: outreachy-kernel
On Mon, Apr 01, 2019 at 06:59:06PM +0530, Sanjana Sanikommu wrote:
> 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 <sanjana99reddy99@gmail.com>
> ---
> drivers/staging/gasket/apex_driver.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
> index a79613db71ef..2be45ee9d061 100644
> --- a/drivers/staging/gasket/apex_driver.c
> +++ b/drivers/staging/gasket/apex_driver.c
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: gasket: apex: Modify return type suggested by Coccinelle.
2019-04-01 17:31 ` Greg KH
@ 2019-04-02 4:40 ` sanjana99reddy99
0 siblings, 0 replies; 3+ messages in thread
From: sanjana99reddy99 @ 2019-04-02 4:40 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1295 bytes --]
On Monday, April 1, 2019 at 11:11:07 PM UTC+5:30, gregkh wrote:
>
> On Mon, Apr 01, 2019 at 06:59:06PM +0530, Sanjana Sanikommu wrote:
> > 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 <sanjana9...@gmail.com <javascript:>>
> > ---
> > drivers/staging/gasket/apex_driver.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/gasket/apex_driver.c
> b/drivers/staging/gasket/apex_driver.c
> > index a79613db71ef..2be45ee9d061 100644
> > --- a/drivers/staging/gasket/apex_driver.c
> > +++ b/drivers/staging/gasket/apex_driver.c
> > @@ -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.
>
Sure, I would drop this.
Thanks
Sanjana
>
> thanks,
>
> greg k-h
>
[-- Attachment #1.2: Type: text/html, Size: 2077 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-02 4:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 13:29 [PATCH] staging: gasket: apex: Modify return type suggested by Coccinelle Sanjana Sanikommu
2019-04-01 17:31 ` Greg KH
2019-04-02 4:40 ` sanjana99reddy99
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.