[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2d2e09d5033bda1ceb77576e582ecf1dcfccf428.1618064274.git.fabioaiuto83@gmail.com>
Date: Sat, 10 Apr 2021 16:20:32 +0200
From: Fabio Aiuto <fabioaiuto83@...il.com>
To: gregkh@...uxfoundation.org
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH 19/25] staging: rtl8723bs: remove empty if and else blocks
remove if and else blocks after DBG_8192C removal
Signed-off-by: Fabio Aiuto <fabioaiuto83@...il.com>
---
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 1 -
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 7 -----
drivers/staging/rtl8723bs/hal/sdio_ops.c | 1 -
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 27 +++----------------
4 files changed, 3 insertions(+), 33 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index f5aa9a680446..2451875ab3c0 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -975,7 +975,6 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)
if (bcn_valid) {
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
pwrctl->fw_psmode_iface_id = padapter->iface_id;
- } else {
}
/* 2010.05.11. Added by tynli. */
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 54cb1ab8d4cf..6bf0cbb17b99 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -678,10 +678,6 @@ static void Hal_EfusePowerSwitch(
mdelay(10);
} while (1);
-
- if (count >= 100) {
- } else {
- }
}
rtw_write8(padapter, REG_EFUSE_ACCESS_8723, EFUSE_ACCESS_ON_8723);
@@ -3671,9 +3667,6 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)
break;
} while (--trycnt);
- if (trycnt == 0) {
- }
-
/* RQPN Load 0 */
rtw_write16(padapter, REG_RQPN_NPQ, 0);
rtw_write32(padapter, REG_RQPN, 0x80000000);
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index 98a74f6c6876..701f1abbd0f0 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -904,7 +904,6 @@ void sd_int_dpc(struct adapter *adapter)
_sd_read(intfhdl, addr, 4, status);
_sd_write(intfhdl, addr, 4, status);
kfree(status);
- } else {
}
}
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 54c65c125c8c..4014b692d954 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -851,10 +851,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == true) /* sta mode */
{
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
- if (psta == NULL) {
- }
- else
- {
+ if (psta != NULL) {
/* Jeff: don't disable ieee8021x_blocked while clearing key */
if (strcmp(param->u.crypt.alg, "none") != 0)
psta->ieee8021x_blocked = false;
@@ -1021,9 +1018,6 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
{
ret = rtw_cfg80211_set_encryption(ndev, param, param_len);
}
- else
- {
- }
addkey_end:
kfree(param);
@@ -1228,10 +1222,7 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted)
spin_lock_bh(&pwdev_priv->scan_req_lock);
if (pwdev_priv->scan_request) {
/* avoid WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); */
- if (pwdev_priv->scan_request->wiphy != pwdev_priv->rtw_wdev->wiphy)
- {
- }
- else
+ if (pwdev_priv->scan_request->wiphy == pwdev_priv->rtw_wdev->wiphy)
{
cfg80211_scan_done(pwdev_priv->scan_request, &info);
}
@@ -1365,10 +1356,6 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
{
if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS|_FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
{
- if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS))
- {
- }
-
need_indicate_scan_done = true;
goto check_need_indicate_scan_done;
}
@@ -1581,9 +1568,6 @@ static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv, u32 key
else if (key_mgt == WLAN_AKM_SUITE_PSK) {
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
}
- else {
- /* return -EINVAL; */
- }
return 0;
}
@@ -2232,10 +2216,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc
dump_mgntframe(padapter, pmgntframe);
- } else {
}
-
fail:
dev_kfree_skb_any(skb);
@@ -2512,8 +2494,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
plist = get_next(plist);
if (!memcmp((u8 *)mac, psta->hwaddr, ETH_ALEN)) {
- if (psta->dot8021xalg == 1 && psta->bpairwise_key_installed == false) {
- } else {
+ if (psta->dot8021xalg != 1 || psta->bpairwise_key_installed == true) {
list_del_init(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
@@ -2783,9 +2764,7 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum
ht_cap->mcs.rx_mask[4] = 0x01;
ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15);
- } else {
}
-
}
void rtw_cfg80211_init_wiphy(struct adapter *padapter)
--
2.20.1
Powered by blists - more mailing lists