staging: r8188eu: correct long line warnings near prior DBG_88E calls
authorPhillip Potter <phil@philpotter.co.uk>
Wed, 16 Feb 2022 01:07:09 +0000 (01:07 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Feb 2022 15:00:36 +0000 (16:00 +0100)
Where it is possible (without out-of-patch-series-scope large scale
refactoring), correct code to remove checkpatch warnings about lines
that are too long, also correcting operator spacing where appropriate
for these lines as well. These warnings occur mostly due to so many
DBG_88E removals and parentheses tweaks etc. being adjacent to such
long lines, which are therefore included in the resultant diff.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-16-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_br_ext.c
drivers/staging/r8188eu/core/rtw_mlme_ext.c
drivers/staging/r8188eu/core/rtw_p2p.c
drivers/staging/r8188eu/core/rtw_pwrctrl.c
drivers/staging/r8188eu/core/rtw_wlan_util.c

index ddc3a2c8aaca17576edb7d6114947d77165f48bd..d68611ef22f80f07d9f0a6dc18b4efcb927b6ac5 100644 (file)
@@ -382,7 +382,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
        if (protocol == ETH_P_IP) {
                struct iphdr *iph = (struct iphdr *)(skb->data + ETH_HLEN);
 
-               if (((unsigned char *)(iph) + (iph->ihl<<2)) >= (skb->data + ETH_HLEN + skb->len))
+               if (((unsigned char *)(iph) + (iph->ihl << 2)) >= (skb->data + ETH_HLEN + skb->len))
                        return -1;
 
                switch (method) {
@@ -451,7 +451,11 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
                                                pOldTag = (struct pppoe_tag *)__nat25_find_pppoe_tag(ph, ntohs(PTT_RELAY_SID));
                                                if (pOldTag) { /*  if SID existed, copy old value and delete it */
                                                        old_tag_len = ntohs(pOldTag->tag_len);
-                                                       if (old_tag_len+TAG_HDR_LEN+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN > sizeof(tag_buf))
+                                                       if (old_tag_len +
+                                                           TAG_HDR_LEN +
+                                                           MAGIC_CODE_LEN +
+                                                           RTL_RELAY_TAG_LEN >
+                                                           sizeof(tag_buf))
                                                                return -1;
 
                                                        memcpy(tag->tag_data+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN,
@@ -476,7 +480,9 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
                                                        return -1;
                                        } else { /*  not add relay tag */
                                                if (priv->pppoe_connection_in_progress &&
-                                                               memcmp(skb->data+ETH_ALEN, priv->pppoe_addr, ETH_ALEN))
+                                                   memcmp(skb->data + ETH_ALEN,
+                                                          priv->pppoe_addr,
+                                                          ETH_ALEN))
                                                        return -2;
 
                                                if (priv->pppoe_connection_in_progress == 0)
index 785eda58a5e5405cd1c9c577a04a3b8e28e63e4e..0b77ddde6ce296de6cbf7f1068e1b80efedcd75b 100644 (file)
@@ -3583,7 +3583,8 @@ static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
 
        if (GetRetry(frame)) {
                if (token >= 0) {
-                       if ((seq_ctrl == mlmeext->action_public_rxseq) && (token == mlmeext->action_public_dialog_token))
+                       if ((seq_ctrl == mlmeext->action_public_rxseq) &&
+                           (token == mlmeext->action_public_dialog_token))
                                return _FAIL;
                } else {
                        if (seq_ctrl == mlmeext->action_public_rxseq)
index 9467a5dcc9900a38ffb18b4ed6677da66a28f47a..48500fb82250e85d8ed44ec893eaef6f4a786ed2 100644 (file)
@@ -1154,7 +1154,8 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
                                                peer_operating_ch = operatingch_info[4];
 
                                        if (rtw_p2p_is_channel_list_ok(peer_operating_ch,
-                                                              ch_list_inclusioned, ch_num_inclusioned))
+                                                                      ch_list_inclusioned,
+                                                                      ch_num_inclusioned))
                                                /**
                                                 *      Change our operating channel as peer's for compatibility.
                                                 */
@@ -1270,7 +1271,11 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
                        /*      Try to get the operation channel information */
 
                        attr_contentlen = 0;
-                       if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen))
+                       if (rtw_get_p2p_attr_content(p2p_ie,
+                                                    p2p_ielen,
+                                                    P2P_ATTR_OPERATING_CH,
+                                                    operatingch_info,
+                                                    &attr_contentlen))
                                pwdinfo->peer_operating_ch = operatingch_info[4];
 
                        /*      Try to get the channel list information */
@@ -1377,7 +1382,11 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
                }
 
                attr_contentlen = 0;
-               if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen))
+               if (rtw_get_p2p_attr_content(p2p_ie,
+                                            p2p_ielen,
+                                            P2P_ATTR_OPERATING_CH,
+                                            operatingch_info,
+                                            &attr_contentlen))
                        pwdinfo->peer_operating_ch = operatingch_info[4];
 
                /* Get the next P2P IE */
index c7c79cd9e2139bf1b517322a6ab363f36a1db9d9..b20436f754598be35abf30396cf582b1382abe72 100644 (file)
@@ -171,7 +171,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
                return false;
        if (pwrpriv->bInSuspend)
                return false;
-       if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X && !padapter->securitypriv.binstallGrpkey)
+       if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X &&
+           !padapter->securitypriv.binstallGrpkey)
                return false;
        return true;
 }
index e8bf5672ff6cf90f8077ecffa4a65be61825c933..33c0228204ad324b313d8fd2fde8ec8f3be17615 100644 (file)
@@ -926,7 +926,8 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
 
        if (memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) ||
            bssid->Ssid.SsidLength != cur_network->network.Ssid.SsidLength) {
-               if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) /* not hidden ssid */
+               /* not hidden ssid */
+               if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0)
                        goto _mismatch;
        }
 
@@ -966,7 +967,8 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
                                rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher, &pairwise_cipher, &is_8021x);
                }
 
-               if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher)
+               if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher ||
+                   group_cipher != cur_network->BcnInfo.group_cipher)
                        goto _mismatch;
 
                if (is_8021x != cur_network->BcnInfo.is_8021x)