Commit 21e161c3 authored by Fabio Aiuto's avatar Fabio Aiuto Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: remove all if-else empty blocks left by DBG_871X removal



remove all if-else empty {} blocks left by spatch application.

removed unused variables and an unused static function definition
after if-else blocks removal, to suppress compiler warnings.

Signed-off-by: default avatarFabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/56055b20bc064d7ac1e8f14bd1ed42aba6b02c36.1617802415.git.fabioaiuto83@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5789f774
Loading
Loading
Loading
Loading
+5 −17
Original line number Diff line number Diff line
@@ -195,8 +195,6 @@ void expire_timeout_chk(struct adapter *padapter)

	/* check auth_queue */
	#ifdef DBG_EXPIRATION_CHK
	if (phead != plist) {
	}
	#endif
	while (phead != plist) {
		psta = container_of(plist, struct sta_info, auth_list);
@@ -228,8 +226,6 @@ void expire_timeout_chk(struct adapter *padapter)

	/* check asoc_queue */
	#ifdef DBG_EXPIRATION_CHK
	if (phead != plist) {
	}
	#endif
	while (phead != plist) {
		psta = container_of(plist, struct sta_info, asoc_list);
@@ -392,7 +388,6 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
		arg[3] = psta->init_rate;

		rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
	} else {
	}
}

@@ -468,7 +463,6 @@ void update_bmc_sta(struct adapter *padapter)
		psta->state = _FW_LINKED;
		spin_unlock_bh(&psta->lock);

	} else {
	}
}

@@ -662,8 +656,6 @@ static void update_hw_ht_param(struct adapter *padapter)
	pmlmeinfo->SM_PS = (le16_to_cpu(
		pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info
	) & 0x0C) >> 2;
	if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
		{}

	/*  */
	/*  Config current HT Protection mode. */
@@ -832,8 +824,7 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
		update_beacon(padapter, WLAN_EID_TIM, NULL, true);

		/* issue beacon frame */
		if (send_beacon(padapter) == _FAIL)
			{}
		send_beacon(padapter);
	}

	/* update bc/mc sta_info */
@@ -1573,9 +1564,6 @@ static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8 *oui)

	else if (!memcmp(P2P_OUI, oui, 4))
		update_bcn_p2p_ie(padapter);

	else
		{}
}

void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
@@ -1863,8 +1851,6 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
			psta->no_ht_set = 1;
			pmlmepriv->num_sta_no_ht++;
		}
		if (pmlmepriv->htpriv.ht_option == true) {
		}
	}

	if (rtw_ht_operation_update(padapter) > 0) {
@@ -2117,8 +2103,10 @@ void rtw_ap_restore_network(struct adapter *padapter)
	for (i = 0; i < chk_alive_num; i++) {
		psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);

		if (psta == NULL) {
		} else if (psta->state & _FW_LINKED) {
		if (psta == NULL)
			continue;

		if (psta->state & _FW_LINKED) {
			rtw_sta_media_status_rpt(padapter, psta, 1);
			Update_RA_Entry(padapter, psta);
			/* pairwise key */
+0 −5
Original line number Diff line number Diff line
@@ -388,7 +388,6 @@ int rtw_cmd_thread(void *context)
	struct cmd_obj *pcmd;
	u8 *pcmdbuf;
	unsigned long cmd_start_time;
	unsigned long cmd_process_time;
	u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf);
	void (*pcmd_callback)(struct adapter *dev, struct cmd_obj *pcmd);
	struct adapter *padapter = context;
@@ -483,10 +482,6 @@ int rtw_cmd_thread(void *context)
			mutex_unlock(&(pcmd->padapter->cmdpriv.sctx_mutex));
		}

		cmd_process_time = jiffies_to_msecs(jiffies - cmd_start_time);
		if (cmd_process_time > 1000) {
		}

		/* call callback function for post-processed */
		if (pcmd->cmdcode < ARRAY_SIZE(rtw_cmd_callback)) {
			pcmd_callback = rtw_cmd_callback[pcmd->cmdcode].callback;
+0 −4
Original line number Diff line number Diff line
@@ -819,8 +819,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
	 * OUI of the vendor. The following byte is used a vendor specific
	 * sub-type. */
	if (elen < 4) {
		if (show_errors) {
		}
		return -1;
	}

@@ -908,8 +906,6 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
		left -= 2;

		if (elen > left) {
			if (show_errors) {
			}
			return ParseFailed;
		}

+1 −1
Original line number Diff line number Diff line
@@ -174,8 +174,8 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
	int value = atomic_inc_return(&dvobj->continual_io_error);
	if (value > MAX_CONTINUAL_IO_ERR) {
		ret = true;
	} else {
	}

	return ret;
}

+1 −2
Original line number Diff line number Diff line
@@ -422,8 +422,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
		rtw_indicate_disconnect(padapter);
		/* modify for CONFIG_IEEE80211W, none 11w can use it */
		rtw_free_assoc_resources_cmd(padapter);
		if (_FAIL == rtw_pwr_wakeup(padapter))
			{}
		rtw_pwr_wakeup(padapter);
	}

	spin_unlock_bh(&pmlmepriv->lock);
Loading