From: Larry Finger <Larry.Finger@lwfinger.net>
To: Saurav Girepunje <saurav.girepunje@gmail.com>,
phil@philpotter.co.uk, gregkh@linuxfoundation.org,
straube.linux@gmail.com, fmdefrancesco@gmail.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: saurav.girepunje@hotmail.com
Subject: Re: [PATCH] staging: r8188eu: core: remove goto statement
Date: Mon, 25 Oct 2021 10:15:50 -0500 [thread overview]
Message-ID: <7dc4eba4-c009-b8b7-bc08-5b608bdf86a0@lwfinger.net> (raw)
In-Reply-To: <YXafzp5F8T7/+tk2@Sauravs-MacBook-Air.local>
On 10/25/21 07:15, Saurav Girepunje wrote:
> Remove the goto statement from rtw_do_join(). In this function goto
> can be replace by return statement. As on goto label exit, function only
> return it is not performing any cleanup. Avoiding goto will improve
> the function readability.
>
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
You need to read section 14 of Documentation/process/submitting-patches.rst to
learn how to submit a revised patch. Resubmitting such a revision using the same
subject line is likely to confuse reviewers and maintainers alike, if not
patchworks.
Larry
> drivers/staging/r8188eu/core/rtw_ioctl_set.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
> index 2b54cdfa9d6e..411b06e135be 100644
> --- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c
> +++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c
> @@ -51,7 +51,7 @@ u8 rtw_do_join(struct adapter *padapter)
> ret = _FAIL;
> }
>
> - goto exit;
> + return ret;
> } else {
> int select_ret;
>
> @@ -78,10 +78,9 @@ u8 rtw_do_join(struct adapter *padapter)
>
> rtw_generate_random_ibss(pibss);
>
> - if (rtw_createbss_cmd(padapter) != _SUCCESS) {
> - ret = false;
> - goto exit;
> - }
> + if (rtw_createbss_cmd(padapter) != _SUCCESS)
> + return false;
> +
> pmlmepriv->to_join = false;
> } else {
> /* can't associate ; reset under-linking */
> @@ -102,8 +101,6 @@ u8 rtw_do_join(struct adapter *padapter)
> }
> }
>
> -exit:
> -
> return ret;
> }
>
> --
> 2.33.0
>
next prev parent reply other threads:[~2021-10-25 15:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 12:15 Saurav Girepunje
2021-10-25 15:15 ` Larry Finger [this message]
2021-10-25 17:00 ` Saurav Girepunje
2021-10-25 17:26 ` Larry Finger
2021-10-25 17:46 ` Saurav Girepunje
2021-11-10 18:17 Saurav Girepunje
2021-11-10 18:45 ` Dan Carpenter
2021-11-13 5:15 ` Saurav Girepunje
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=7dc4eba4-c009-b8b7-bc08-5b608bdf86a0@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=fmdefrancesco@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
--cc=saurav.girepunje@gmail.com \
--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®