From: Kang Minchul <tegongkang@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Johannes Berg <johannes.berg@intel.com>,
Veerendranath Jakkam <quic_vjakkam@quicinc.com>,
GUO Zihua <guozihua@huawei.com>,
Hannes Braun <hannesbraun@mail.de>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Kang Minchul <tegongkang@gmail.com>
Subject: [PATCH 2/4] staging: rtl8723bs: Relocate constant on the right side of test
Date: Thu, 22 Sep 2022 21:23:08 +0900 [thread overview]
Message-ID: <20220922122310.3379711-3-tegongkang@gmail.com> (raw)
In-Reply-To: <20220922122310.3379711-1-tegongkang@gmail.com>
This patch fixes following warning generated by checkpatch:
WARNING: Comparisons should place the constant on the right side of the test
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 2c6f4b5ab101..b66e8789885c 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1066,7 +1066,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
}
}
- if (_FAIL == rtw_pwr_wakeup(padapter)) {
+ if (rtw_pwr_wakeup(padapter) == _FAIL) {
ret = -EPERM;
goto exit;
}
@@ -1240,7 +1240,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
}
rtw_ps_deny(padapter, PS_DENY_SCAN);
- if (_FAIL == rtw_pwr_wakeup(padapter)) {
+ if (rtw_pwr_wakeup(padapter) == _FAIL) {
need_indicate_scan_done = true;
goto check_need_indicate_scan_done;
}
@@ -1583,7 +1583,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int ret = 0;
- if (_FAIL == rtw_pwr_wakeup(padapter)) {
+ if (rtw_pwr_wakeup(padapter) == _FAIL) {
ret = -EPERM;
goto exit;
}
@@ -1674,7 +1674,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
}
rtw_ps_deny(padapter, PS_DENY_JOIN);
- if (_FAIL == rtw_pwr_wakeup(padapter)) {
+ if (rtw_pwr_wakeup(padapter) == _FAIL) {
ret = -EPERM;
goto exit;
}
@@ -2468,7 +2468,7 @@ static int cfg80211_rtw_dump_station(struct wiphy *wiphy, struct net_device *nde
spin_lock_bh(&pstapriv->asoc_list_lock);
psta = rtw_sta_info_get_by_idx(idx, pstapriv);
spin_unlock_bh(&pstapriv->asoc_list_lock);
- if (NULL == psta) {
+ if (psta == NULL) {
ret = -ENOENT;
goto exit;
}
@@ -2603,7 +2603,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
goto exit;
rtw_ps_deny(padapter, PS_DENY_MGNT_TX);
- if (_FAIL == rtw_pwr_wakeup(padapter)) {
+ if (rtw_pwr_wakeup(padapter) == _FAIL) {
ret = -EFAULT;
goto cancel_ps_deny;
}
--
2.34.1
next prev parent reply other threads:[~2022-09-22 12:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 12:23 [PATCH 0/4] staging: rtl8723bs: cleanups for checkpatch fixes Kang Minchul
2022-09-22 12:23 ` [PATCH 1/4] staging: rtl8723bs: replace code indent as tabs Kang Minchul
2022-09-22 12:23 ` Kang Minchul [this message]
2022-09-22 12:23 ` [PATCH 3/4] staging: rtl8723bs: Make switch and case at the same indent Kang Minchul
2022-09-22 12:23 ` [PATCH 4/4] staging: rtl8723bs: Add a blank line after declarations Kang Minchul
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=20220922122310.3379711-3-tegongkang@gmail.com \
--to=tegongkang@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=guozihua@huawei.com \
--cc=hannesbraun@mail.de \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=quic_vjakkam@quicinc.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).