linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 19/25] staging: rtl8723bs: remove empty if and else blocks
Date: Sat, 10 Apr 2021 16:20:32 +0200	[thread overview]
Message-ID: <2d2e09d5033bda1ceb77576e582ecf1dcfccf428.1618064274.git.fabioaiuto83@gmail.com> (raw)
In-Reply-To: <cover.1618064274.git.fabioaiuto83@gmail.com>

remove if and else blocks after DBG_8192C removal

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.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


  parent reply	other threads:[~2021-04-10 14:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10 14:20 [PATCH 00/25] staging: rtl8723bs: remove DBG_8192C tracing macro Fabio Aiuto
2021-04-10 14:20 ` [PATCH 01/25] staging: rtl8723bs: remove all DBG_8192C logs Fabio Aiuto
2021-04-10 14:20 ` [PATCH 02/25] staging: rtl8723bs: remove all commented out " Fabio Aiuto
2021-04-10 14:20 ` [PATCH 03/25] staging: rtl8723bs: remove DBG_8192C macro definitions Fabio Aiuto
2021-04-10 14:20 ` [PATCH 04/25] staging: rtl8723bs: remove all if-blocks left empty by DBG_8192C-remove coccinelle script Fabio Aiuto
2021-04-10 14:20 ` [PATCH 05/25] staging: rtl8723bs: put spaces around operators Fabio Aiuto
2021-04-10 14:20 ` [PATCH 06/25] staging: rtl8723bs: remove unused code blocks guarded by DEBUG_RTL871X Fabio Aiuto
2021-04-10 14:20 ` [PATCH 07/25] staging: rtl8723bs: remove commented out DEBUG_RTL871X definition Fabio Aiuto
2021-04-10 14:20 ` [PATCH 08/25] staging: rtl8723bs: remove code blocks guarded by DEBUG symbol Fabio Aiuto
2021-04-10 14:20 ` [PATCH 09/25] staging: rtl8723bs: remove empty code block guarded by DBG_CCX Fabio Aiuto
2021-04-10 14:20 ` [PATCH 10/25] staging: rtl8723bs: remove code block guarded by undefined SDIO_DEBUG_IO Fabio Aiuto
2021-04-10 14:20 ` [PATCH 11/25] staging: rtl8723bs: remove commented out SDIO_DEBUG_IO symbol definition Fabio Aiuto
2021-04-10 14:20 ` [PATCH 12/25] staging: rtl8723bs: remove empty ifdef blocks conditioned to DEBUG_CFG80211 definition Fabio Aiuto
2021-04-10 14:20 ` [PATCH 13/25] staging: rtl8723bs: remove commented out DEBUG_CFG80211 symbol definition Fabio Aiuto
2021-04-10 14:20 ` [PATCH 14/25] staging: rtl8723bs: remove unnecessary bracks Fabio Aiuto
2021-04-10 14:20 ` [PATCH 15/25] staging: rtl8723bs: fix comparison to null Fabio Aiuto
2021-04-10 14:20 ` [PATCH 16/25] staging: rtl8723bs: put spaces around operators Fabio Aiuto
2021-04-10 14:20 ` [PATCH 17/25] staging: rtl8723bs: split long line Fabio Aiuto
2021-04-10 14:20 ` [PATCH 18/25] staging: rtl8723bs: put constant on the right side of the test Fabio Aiuto
2021-04-10 14:20 ` Fabio Aiuto [this message]
2021-04-10 14:20 ` [PATCH 20/25] staging: rtl8723bs: put constant on the right side of a test in os_dep/ioctl_cfg80211.c Fabio Aiuto
2021-04-10 14:20 ` [PATCH 21/25] staging: rtl8723bs: remove unnecessary parentheses " Fabio Aiuto
2021-04-10 14:20 ` [PATCH 22/25] staging: rtl8723bs: remove empty else block " Fabio Aiuto
2021-04-10 14:20 ` [PATCH 23/25] staging: rtl8723bs: fix comparison to true issue Fabio Aiuto
2021-04-10 14:20 ` [PATCH 24/25] staging: rtl8723bs: remove more unnecessary parentheses Fabio Aiuto
2021-04-10 14:20 ` [PATCH 25/25] staging: rtl8723bs: remove more empty if blocks after DBG_8192C deletion Fabio Aiuto
2021-04-10 17:23   ` kernel test robot

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=2d2e09d5033bda1ceb77576e582ecf1dcfccf428.1618064274.git.fabioaiuto83@gmail.com \
    --to=fabioaiuto83@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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).