From: Joe Perches <joe@perches.com>
To: Jaehee Park <jhpark1013@gmail.com>, Larry.Finger@lwfinger.net
Cc: phil@philpotter.co.uk, gregkh@linuxfoundation.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
outreachy@lists.linux.dev
Subject: Re: [PATCH 4/6] staging: r8188eu: place constants on the right side of tests
Date: Wed, 13 Apr 2022 18:16:58 -0700 [thread overview]
Message-ID: <eda6a3a94b768f06e67581bbc4d9974b391f0651.camel@perches.com> (raw)
In-Reply-To: <d2469155c37b8677a8dcbed28bc0840745d46f76.1649880454.git.jhpark1013@gmail.com>
On Wed, 2022-04-13 at 16:11 -0400, Jaehee Park wrote:
> To comply with the linux coding style, place constants on the right
> side of the test in comparisons. Issue found with checkpatch.
> WARNING: Comparisons should place the constant on the right side of
> the test.
[]
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
[]
> @@ -1997,19 +1998,19 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
> else
> pnetwork = &pmlmepriv->cur_network;
>
> - if (0 < rtw_to_roaming(padapter)) {
> + if (rtw_to_roaming(padapter) > 0) {
Do you think this change is the same test?
What happens if rtw_to_roaming returns 0?
[]
> - if (0 < pmlmepriv->to_roaming) {
> + if (pmlmepriv->to_roaming > 0) {
here too
> continue;
> } else {
> rtw_indicate_disconnect(padapter);
next prev parent reply other threads:[~2022-04-14 1:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 20:11 [PATCH 0/6] staging: r8188eu: fix warnings reported by checkpatch Jaehee Park
2022-04-13 20:11 ` [PATCH 1/6] staging: r8188eu: remove unnecessary braces in single statement block Jaehee Park
2022-04-13 20:24 ` Pavel Skripkin
2022-04-14 19:41 ` Jaehee Park
2022-04-14 19:50 ` Pavel Skripkin
2022-04-15 2:51 ` Jaehee Park
2022-04-13 20:11 ` [PATCH 2/6] staging: r8188eu: remove spaces before tabs Jaehee Park
2022-04-13 20:11 ` [PATCH 3/6] staging: r8188eu: remove 'added by' author comments Jaehee Park
2022-04-13 20:28 ` Pavel Skripkin
2022-04-14 19:41 ` Jaehee Park
2022-04-13 20:11 ` [PATCH 4/6] staging: r8188eu: place constants on the right side of tests Jaehee Park
2022-04-14 1:16 ` Joe Perches [this message]
2022-04-14 19:46 ` Jaehee Park
2022-04-13 20:11 ` [PATCH 5/6] staging: r8188eu: replace spaces with tabs Jaehee Park
2022-04-13 20:34 ` Pavel Skripkin
2022-04-14 19:43 ` Jaehee Park
2022-04-13 20:11 ` [PATCH 6/6] staging: r8188eu: correct typo in comments Jaehee Park
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=eda6a3a94b768f06e67581bbc4d9974b391f0651.camel@perches.com \
--to=joe@perches.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=jhpark1013@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).