From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
outreachy@lists.linux.dev
Subject: Re: [PATCH 3/3] staging: rtl8723bs: remove redundant else branches
Date: Sun, 3 Apr 2022 13:03:02 +0200 [thread overview]
Message-ID: <Ykl+5reEIg31WHyy@kroah.com> (raw)
In-Reply-To: <8d745122cd10f5db59393b1bff09e6a73e88640b.1648817213.git.sevinj.aghayeva@gmail.com>
On Fri, Apr 01, 2022 at 09:02:47AM -0400, Sevinj Aghayeva wrote:
> Adhere to Linux kernel coding style.
>
> Reported by checkpatch:
>
> WARNING: else is not generally useful after a break or return
>
> Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 63 +++++++++----------
> 1 file changed, 30 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> index 81e4b1bf68f6..b80d9061f5a5 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> @@ -907,10 +907,9 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram
> set_link_timer(pmlmeext, REAUTH_TO);
>
> return _SUCCESS;
> - } else {
> - /* open system */
> - go2asoc = 1;
> }
> + /* open system */
> + go2asoc = 1;
> } else if (seq == 4) {
> if (pmlmeinfo->auth_algo == dot11AuthAlgrthm_Shared)
> go2asoc = 1;
> @@ -1502,32 +1501,32 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)
>
>
> return _SUCCESS;
> - } else {
> - int ignore_received_deauth = 0;
> -
> - /* Commented by Albert 20130604 */
> - /* Before sending the auth frame to start the STA/GC mode connection with AP/GO, */
> - /* we will send the deauth first. */
> - /* However, the Win8.1 with BRCM Wi-Fi will send the deauth with reason code 6 to us after receieving our deauth. */
> - /* Added the following code to avoid this case. */
> - if ((pmlmeinfo->state & WIFI_FW_AUTH_STATE) ||
> - (pmlmeinfo->state & WIFI_FW_ASSOC_STATE)) {
> - if (reason == WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA) {
> - ignore_received_deauth = 1;
> - } else if (reason == WLAN_REASON_PREV_AUTH_NOT_VALID) {
> - /* TODO: 802.11r */
> - ignore_received_deauth = 1;
> - }
> + }
> + int ignore_received_deauth = 0;
> +
> + /* Commented by Albert 20130604 */
> + /* Before sending the auth frame to start the STA/GC mode connection with AP/GO, */
> + /* we will send the deauth first. */
> + /* However, the Win8.1 with BRCM Wi-Fi will send the deauth with reason code 6 to us after receieving our deauth. */
> + /* Added the following code to avoid this case. */
> + if ((pmlmeinfo->state & WIFI_FW_AUTH_STATE) ||
> + (pmlmeinfo->state & WIFI_FW_ASSOC_STATE)) {
Very odd indentation :(
next prev parent reply other threads:[~2022-04-03 11:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 13:02 [PATCH 0/3] rlt8723bs cleanup Sevinj Aghayeva
2022-04-01 13:02 ` [PATCH 1/3] staging: rtl8723bs: remove redundant braces in if statements Sevinj Aghayeva
2022-04-03 11:03 ` Greg Kroah-Hartman
2022-04-01 13:02 ` [PATCH 2/3] staging: rtl8723bs: place constants on the right side of tests Sevinj Aghayeva
2022-04-01 13:02 ` [PATCH 3/3] staging: rtl8723bs: remove redundant else branches Sevinj Aghayeva
2022-04-01 18:08 ` kernel test robot
2022-04-03 11:03 ` Greg Kroah-Hartman [this message]
2022-04-03 15:33 ` Sevinj Aghayeva
2022-04-01 19:06 [PATCH v2 0/3] rlt8723bs cleanup Sevinj Aghayeva
2022-04-01 19:07 ` [PATCH 3/3] staging: rtl8723bs: remove redundant else branches Sevinj Aghayeva
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=Ykl+5reEIg31WHyy@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=sevinj.aghayeva@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;
as well as URLs for NNTP newsgroup(s).