From: Saurav Girepunje <saurav.girepunje@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
straube.linux@gmail.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com
Subject: Re: [PATCH] staging: r8188eu: avoid use of goto statement
Date: Mon, 25 Oct 2021 20:09:56 +0530 [thread overview]
Message-ID: <79254f8c-1d11-320a-6fdb-3ca066a8862a@gmail.com> (raw)
In-Reply-To: <YXZVV9j2DMA22MUS@kroah.com>
On 25/10/21 12:27 pm, Greg KH wrote:
> On Mon, Oct 25, 2021 at 10:28:54AM +0530, Saurav Girepunje wrote:
>> Remove the goto statement from _rtw_init_cmd_priv(). In this function
>> goto statement can be replace by return statement. By replacing the
>> goto statement with return statement local variable "res" is also
>> not required.As on goto label exit, function only return it is not
>
> You need a ' ' after the '.' here please.
>
>> performing any cleanup.Avoiding goto will simplify the function.
>
> Same here.
>
>> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
>> ---
>> drivers/staging/r8188eu/core/rtw_cmd.c | 16 +++++-----------
>> 1 file changed, 5 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
>> index e17332677daa..22046bd5cf82 100644
>> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
>> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
>> @@ -19,7 +19,6 @@ No irqsave is necessary.
>>
>> static int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
>> {
>> - int res = _SUCCESS;
>>
>
> Please also remove the extra blank line.
>
> thanks,
>
> greg k-h
>
Thanks greg for review. I have updated the patch and sent v2.
Regards,
Saurav Girepunje
prev parent reply other threads:[~2021-10-25 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 4:58 Saurav Girepunje
2021-10-25 6:57 ` Greg KH
2021-10-25 14:39 ` Saurav Girepunje [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=79254f8c-1d11-320a-6fdb-3ca066a8862a@gmail.com \
--to=saurav.girepunje@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
--cc=saurav.girepunje@hotmail.com \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®