From: Rebecca Mckeever <remckee0@gmail.com>
To: outreachy@lists.linux.dev
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Rebecca Mckeever <remckee0@gmail.com>
Subject: [PATCH 1/6] staging: r8188eu: place constants on the right side of tests
Date: Sat, 2 Apr 2022 03:50:43 -0500 [thread overview]
Message-ID: <0f3db3586b3668d6d784e075bc52ffd88b0920d2.1648888461.git.remckee0@gmail.com> (raw)
In-Reply-To: <cover.1648888461.git.remckee0@gmail.com>
Conform to Linux kernel coding style.
Reported by checkpatch:
WARNING: Comparisons should place the constant on the right side of the test
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 4fda2fe07ecc..3b282c387282 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -189,7 +189,7 @@ u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
cmd_obj->padapter = padapter;
res = rtw_cmd_filter(pcmdpriv, cmd_obj);
- if (_FAIL == res) {
+ if (res == _FAIL) {
rtw_free_cmd_obj(cmd_obj);
goto exit;
}
@@ -260,7 +260,7 @@ int rtw_cmd_thread(void *context)
if (!pcmd)
continue;
- if (_FAIL == rtw_cmd_filter(pcmdpriv, pcmd)) {
+ if (rtw_cmd_filter(pcmdpriv, pcmd) == _FAIL) {
pcmd->res = H2C_DROPPED;
goto post_process;
}
@@ -613,7 +613,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
res = rtw_enqueue_cmd(cmdpriv, cmdobj);
} else {
/* no need to enqueue, do the cmd hdl directly and free cmd parameter */
- if (H2C_SUCCESS != disconnect_hdl(padapter, (u8 *)param))
+ if (disconnect_hdl(padapter, (u8 *)param) != H2C_SUCCESS)
res = _FAIL;
kfree(param);
}
--
2.32.0
next prev parent reply other threads:[~2022-04-02 8:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-02 8:50 [PATCH 0/6] staging: r8188eu: cleanup Rebecca Mckeever
2022-04-02 8:50 ` Rebecca Mckeever [this message]
2022-04-02 8:50 ` [PATCH 2/6] staging: r8188eu: remove else after return Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 3/6] staging: r8188eu: correct misspelling in comment "conider" -> "consider" Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 4/6] staging: r8188eu: format block comments Rebecca Mckeever
2022-04-02 16:37 ` Larry Finger
2022-04-03 4:55 ` Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 5/6] staging: r8188eu: remove unnecessary braces in conditional statements Rebecca Mckeever
2022-04-02 8:50 ` [PATCH 6/6] staging: r8188eu: remove spaces before tabs Rebecca Mckeever
2022-04-02 16:42 ` Larry Finger
2022-04-04 12:16 ` Dan Carpenter
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=0f3db3586b3668d6d784e075bc52ffd88b0920d2.1648888461.git.remckee0@gmail.com \
--to=remckee0@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=phil@philpotter.co.uk \
/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®