Commit 4d50f763 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: Fix Smatch warnings for core/*.c



Smatch reports the following problems:
drivers/staging/r8188eu/core/rtw_br_ext.c:655 nat25_db_handle() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_cmd.c:436 rtw_sitesurvey_cmd() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_cmd.c:450 rtw_sitesurvey_cmd() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_led.c:330 SwLedBlink2() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:359 SwLedBlink2() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:538 SwLedBlink4() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:567 SwLedBlink4() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:685 SwLedBlink5() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:771 SwLedControlMode1() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:819 SwLedControlMode1() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:845 SwLedControlMode1() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:1574 LedControl8188eu() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme.c:420 is_same_network() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme.c:986 rtw_joinbss_update_stainfo() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme.c:1162 rtw_joinbss_event_prehandle() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme.c:1858 rtw_restruct_sec_ie() error: uninitialized symbol 'authmode'.
drivers/staging/r8188eu/core/rtw_mlme.c:1869 rtw_restruct_sec_ie() error: uninitialized symbol 'authmode'.
drivers/staging/r8188eu/core/rtw_mlme_ext.c:401 _mgt_dispatcher() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme_ext.c:3210 is_matched_in_profilelist() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme_ext.c:4351 dump_mgntframe_and_wait() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme_ext.c:4374 dump_mgntframe_and_wait_ack() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme_ext.c:7378 _linked_rx_signal_strehgth_display() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mp.c:694 SetPacketTx() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mp.c:900 _rtw_mp_xmit_priv() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_p2p.c:1130 process_p2p_group_negotation_req() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_recv.c:188 rtw_free_recvframe() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_recv.c:499 portctrl() error: uninitialized symbol 'ether_type'.
drivers/staging/r8188eu/core/rtw_recv.c:507 portctrl() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_recv.c:722 sta2sta_data_frame() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_recv.c:1601 amsdu_to_msdu() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_security.c:283 rtw_seccalctkipmic() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_security.c:1116 aes_cipher() warn: for statement not indented
drivers/staging/r8188eu/core/rtw_security.c:1213 rtw_aes_encrypt() warn: inconsistent indenting
rivers/staging/r8188eu/core/rtw_sta_mgt.c:18 _rtw_init_stainfo() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_sta_mgt.c:475 rtw_get_bcmc_stainfo() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_wlan_util.c:65 cckratesonly_included() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_wlan_util.c:1150 should_forbid_n_rate() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_wlan_util.c:1401 check_assoc_AP() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_wlan_util.c:1403 check_assoc_AP() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_xmit.c:805 rtw_make_wlanhdr() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_xmit.c:1691 rtw_br_client_tx() warn: inconsistent indenting
drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c:199 ODM_ReadAndConfig_RadioA_1T_8188E() warn: inconsistent indenting

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/r/20210812015232.23784-2-Larry.Finger@lwfinger.net


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 221abd4d
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -433,9 +433,6 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
			if (ssid[i].SsidLength) {
				memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(struct ndis_802_11_ssid));
				psurveyPara->ssid_num++;
				if (0)
				DBG_88E(FUNC_ADPT_FMT" ssid:(%s, %d)\n", FUNC_ADPT_ARG(padapter),
					psurveyPara->ssid[i].Ssid, psurveyPara->ssid[i].SsidLength);
			}
		}
	}
@@ -447,9 +444,6 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
			if (ch[i].hw_value && !(ch[i].flags & RTW_IEEE80211_CHAN_DISABLED)) {
				memcpy(&psurveyPara->ch[i], &ch[i], sizeof(struct rtw_ieee80211_channel));
				psurveyPara->ch_num++;
				if (0)
				DBG_88E(FUNC_ADPT_FMT" ch:%u\n", FUNC_ADPT_ARG(padapter),
					psurveyPara->ch[i].hw_value);
			}
		}
	}
+7 −9
Original line number Diff line number Diff line
@@ -1738,7 +1738,6 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
	INIT_LIST_HEAD(&pcmd->list);
	res = rtw_enqueue_cmd(pcmdpriv, pcmd);
exit:

	return res;
}

@@ -1833,10 +1832,9 @@ static int rtw_append_pmkid(struct adapter *Adapter, int iEntry, u8 *ie, uint ie

int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len)
{
	u8 authmode;
	u8 authmode = 0;
	uint	ielength;
	int iEntry;

	struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
	struct security_priv *psecuritypriv = &adapter->securitypriv;
	uint	ndisauthmode = psecuritypriv->ndisauthtype;
+9 −7
Original line number Diff line number Diff line
@@ -3204,7 +3204,8 @@ static u8 is_matched_in_profilelist(u8 *peermacaddr, struct profile_info *profil

	for (i = 0; i < P2P_MAX_PERSISTENT_GROUP_NUM; i++, profileinfo++) {
		DBG_88E("[%s] profileinfo_mac=%.2X %.2X %.2X %.2X %.2X %.2X\n", __func__,
			    profileinfo->peermac[0], profileinfo->peermac[1], profileinfo->peermac[2], profileinfo->peermac[3], profileinfo->peermac[4], profileinfo->peermac[5]);
			profileinfo->peermac[0], profileinfo->peermac[1], profileinfo->peermac[2],
			profileinfo->peermac[3], profileinfo->peermac[4], profileinfo->peermac[5]);
		if (!memcmp(peermacaddr, profileinfo->peermac, ETH_ALEN)) {
			match_result = 1;
			DBG_88E("[%s] Match!\n", __func__);
@@ -7370,6 +7371,7 @@ void _linked_rx_signal_strehgth_display(struct adapter *padapter)
	struct mlme_ext_info    *pmlmeinfo = &pmlmeext->mlmext_info;
	u8 mac_id;
	int UndecoratedSmoothedPWDB;

	if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
		mac_id = 0;
	else if ((pmlmeinfo->state&0x03) == _HW_STATE_AP_)
+3 −3
Original line number Diff line number Diff line
@@ -899,9 +899,9 @@ void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv)
	int i, res;
	struct adapter *padapter = pxmitpriv->adapter;
	struct xmit_buf *pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;

	u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
	u32 num_xmit_extbuf = NR_XMIT_EXTBUFF;

	if (padapter->registrypriv.mp_mode == 0) {
		max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
		num_xmit_extbuf = NR_XMIT_EXTBUFF;
+9 −9
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ static struct recv_frame *portctrl(struct adapter *adapter, struct recv_frame *p
	struct sta_info *psta;
	struct sta_priv *pstapriv;
	struct recv_frame *prtnframe;
	u16	ether_type;
	u16 ether_type = 0;
	u16  eapol_type = 0x888e;/* for Funia BD's WPA issue */
	struct rx_pkt_attrib *pattrib;
	__be16 be_tmp;
+2 −2

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+7 −7

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+10 −10

File changed.

Contains only whitespace changes.

Loading