* [PATCH 0/4] staging: rtl8723bs: cleanups for checkpatch fixes
@ 2022-09-22 12:23 Kang Minchul
2022-09-22 12:23 ` [PATCH 1/4] staging: rtl8723bs: replace code indent as tabs Kang Minchul
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kang Minchul @ 2022-09-22 12:23 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Johannes Berg, Veerendranath Jakkam, GUO Zihua, Hannes Braun,
linux-staging, linux-kernel, Kang Minchul
This patch series removes errors and warnings generated by checkpatch
Kang Minchul (4):
staging: rtl8723bs: replace code indent as tabs
staging: rtl8723bs: Relocate constant on the right side of test
staging: rtl8723bs: Make switch and case at the same indent
staging: rtl8723bs: Add a blank line after declarations
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 106 +++++++++---------
1 file changed, 54 insertions(+), 52 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] staging: rtl8723bs: replace code indent as tabs
2022-09-22 12:23 [PATCH 0/4] staging: rtl8723bs: cleanups for checkpatch fixes Kang Minchul
@ 2022-09-22 12:23 ` Kang Minchul
2022-09-22 12:23 ` [PATCH 2/4] staging: rtl8723bs: Relocate constant on the right side of test Kang Minchul
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kang Minchul @ 2022-09-22 12:23 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Johannes Berg, Veerendranath Jakkam, GUO Zihua, Hannes Braun,
linux-staging, linux-kernel, Kang Minchul
This patch removes error below generated by checkpatch
ERROR: code indent should use tabs where possible
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 ddbddf3c9993..2c6f4b5ab101 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -198,7 +198,7 @@ static int rtw_ieee80211_channel_to_frequency(int chan, int band)
if (band == NL80211_BAND_2GHZ) {
if (chan == 14)
return 2484;
- else if (chan < 14)
+ else if (chan < 14)
return 2407 + chan * 5;
}
@@ -810,7 +810,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len > 16 ? 16 : param->u.crypt.key_len));
memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
- padapter->securitypriv.binstallGrpkey = true;
+ padapter->securitypriv.binstallGrpkey = true;
padapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx;
rtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, true);
@@ -920,9 +920,9 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
ret = rtw_cfg80211_ap_set_encryption(ndev, param, param_len);
} else if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true
- || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) {
- ret = rtw_cfg80211_set_encryption(ndev, param, param_len);
- }
+ || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) {
+ ret = rtw_cfg80211_set_encryption(ndev, param, param_len);
+ }
addkey_end:
kfree(param);
@@ -2349,7 +2349,7 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev,
}
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
- struct cfg80211_beacon_data *info)
+ struct cfg80211_beacon_data *info)
{
struct adapter *adapter = rtw_netdev_priv(ndev);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] staging: rtl8723bs: Relocate constant on the right side of test
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
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
3 siblings, 0 replies; 5+ messages in thread
From: Kang Minchul @ 2022-09-22 12:23 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Johannes Berg, Veerendranath Jakkam, GUO Zihua, Hannes Braun,
linux-staging, linux-kernel, Kang Minchul
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] staging: rtl8723bs: Make switch and case at the same indent
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 ` [PATCH 2/4] staging: rtl8723bs: Relocate constant on the right side of test Kang Minchul
@ 2022-09-22 12:23 ` Kang Minchul
2022-09-22 12:23 ` [PATCH 4/4] staging: rtl8723bs: Add a blank line after declarations Kang Minchul
3 siblings, 0 replies; 5+ messages in thread
From: Kang Minchul @ 2022-09-22 12:23 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Johannes Berg, Veerendranath Jakkam, GUO Zihua, Hannes Braun,
linux-staging, linux-kernel, Kang Minchul
This patch fixes switch and case as linux kernel coding style
and amend this error generated by checkpatch:
ERROR: switch and case should be at the same indent
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
---
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 80 +++++++++----------
1 file changed, 40 insertions(+), 40 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index b66e8789885c..57a68f9edec7 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1500,49 +1500,49 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel
pairwise_cipher = WPA_CIPHER_NONE;
switch (group_cipher) {
- case WPA_CIPHER_NONE:
- padapter->securitypriv.dot118021XGrpPrivacy = _NO_PRIVACY_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled;
- break;
- case WPA_CIPHER_WEP40:
- padapter->securitypriv.dot118021XGrpPrivacy = _WEP40_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
- break;
- case WPA_CIPHER_TKIP:
- padapter->securitypriv.dot118021XGrpPrivacy = _TKIP_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption2Enabled;
- break;
- case WPA_CIPHER_CCMP:
- padapter->securitypriv.dot118021XGrpPrivacy = _AES_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption3Enabled;
- break;
- case WPA_CIPHER_WEP104:
- padapter->securitypriv.dot118021XGrpPrivacy = _WEP104_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
- break;
+ case WPA_CIPHER_NONE:
+ padapter->securitypriv.dot118021XGrpPrivacy = _NO_PRIVACY_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled;
+ break;
+ case WPA_CIPHER_WEP40:
+ padapter->securitypriv.dot118021XGrpPrivacy = _WEP40_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
+ break;
+ case WPA_CIPHER_TKIP:
+ padapter->securitypriv.dot118021XGrpPrivacy = _TKIP_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption2Enabled;
+ break;
+ case WPA_CIPHER_CCMP:
+ padapter->securitypriv.dot118021XGrpPrivacy = _AES_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption3Enabled;
+ break;
+ case WPA_CIPHER_WEP104:
+ padapter->securitypriv.dot118021XGrpPrivacy = _WEP104_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
+ break;
}
switch (pairwise_cipher) {
- case WPA_CIPHER_NONE:
- padapter->securitypriv.dot11PrivacyAlgrthm = _NO_PRIVACY_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled;
- break;
- case WPA_CIPHER_WEP40:
- padapter->securitypriv.dot11PrivacyAlgrthm = _WEP40_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
- break;
- case WPA_CIPHER_TKIP:
- padapter->securitypriv.dot11PrivacyAlgrthm = _TKIP_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption2Enabled;
- break;
- case WPA_CIPHER_CCMP:
- padapter->securitypriv.dot11PrivacyAlgrthm = _AES_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption3Enabled;
- break;
- case WPA_CIPHER_WEP104:
- padapter->securitypriv.dot11PrivacyAlgrthm = _WEP104_;
- padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
- break;
+ case WPA_CIPHER_NONE:
+ padapter->securitypriv.dot11PrivacyAlgrthm = _NO_PRIVACY_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled;
+ break;
+ case WPA_CIPHER_WEP40:
+ padapter->securitypriv.dot11PrivacyAlgrthm = _WEP40_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
+ break;
+ case WPA_CIPHER_TKIP:
+ padapter->securitypriv.dot11PrivacyAlgrthm = _TKIP_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption2Enabled;
+ break;
+ case WPA_CIPHER_CCMP:
+ padapter->securitypriv.dot11PrivacyAlgrthm = _AES_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption3Enabled;
+ break;
+ case WPA_CIPHER_WEP104:
+ padapter->securitypriv.dot11PrivacyAlgrthm = _WEP104_;
+ padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
+ break;
}
{/* handle wps_ie */
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] staging: rtl8723bs: Add a blank line after declarations
2022-09-22 12:23 [PATCH 0/4] staging: rtl8723bs: cleanups for checkpatch fixes Kang Minchul
` (2 preceding siblings ...)
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 ` Kang Minchul
3 siblings, 0 replies; 5+ messages in thread
From: Kang Minchul @ 2022-09-22 12:23 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Johannes Berg, Veerendranath Jakkam, GUO Zihua, Hannes Braun,
linux-staging, linux-kernel, Kang Minchul
This patch adds a blank line in order to fix checkpatch warning
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 57a68f9edec7..6aeb169c6ebf 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1849,6 +1849,7 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
inline bool rtw_cfg80211_pwr_mgmt(struct adapter *adapter)
{
struct rtw_wdev_priv *rtw_wdev_priv = adapter_wdev_data(adapter);
+
return rtw_wdev_priv->power_mgmt;
}
@@ -1954,6 +1955,7 @@ void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, u8 *pmgmt_frame,
{
struct station_info sinfo = {};
u8 ie_offset;
+
if (GetFrameSubType(pmgmt_frame) == WIFI_ASSOCREQ)
ie_offset = _ASOCREQ_IE_OFFSET_;
else /* WIFI_REASSOCREQ */
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-22 12:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/4] staging: rtl8723bs: Relocate constant on the right side of test Kang Minchul
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
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).