staging: rtl8712: style fix over 80 characters warnings
authorMartin Homuth <martin@martinhomuth.de>
Mon, 18 Dec 2017 23:18:43 +0000 (00:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Dec 2017 14:23:19 +0000 (15:23 +0100)
This patch fixes various coding style issues in the rtl8712 module as
noted by checkpatch.pl by reducing the characters per line to under
80.

It fixes the following checkpatch.pl warning:

WARNING: line over 80 characters

Signed-off-by: Martin Homuth <martin@martinhomuth.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/ieee80211.c
drivers/staging/rtl8712/os_intfs.c
drivers/staging/rtl8712/rtl8712_cmd.c
drivers/staging/rtl8712/rtl8712_xmit.c
drivers/staging/rtl8712/rtl871x_mlme.h

index 33e82a9dd4627e8e7690b0fad453160c57f26ff5..987270395635907a78945c80ec429bb0b4be57fb 100644 (file)
@@ -169,12 +169,13 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
        int sz = 0, rate_len;
        struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network;
        u8 *ie = pdev_network->IEs;
+       u16 beaconPeriod = (u16)pdev_network->Configuration.BeaconPeriod;
 
        /*timestamp will be inserted by hardware*/
        sz += 8;
        ie += sz;
        /*beacon interval : 2bytes*/
-       *(__le16 *)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod);
+       *(__le16 *)ie = cpu_to_le16(beaconPeriod);
        sz += 2;
        ie += 2;
        /*capability info*/
@@ -221,7 +222,8 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
                pbuf = r8712_get_ie(pbuf, _WPA_IE_ID_, &len, limit);
                if (pbuf) {
                        /*check if oui matches...*/
-                       if (memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)))
+                       if (memcmp((pbuf + 2), wpa_oui_type,
+                                  sizeof(wpa_oui_type)))
                                goto check_next_ie;
                        /*check version...*/
                        memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16));
index 95caf8df9a1347d442353fb1e27479b078306a6f..e7df5d7986fc867101336a14b0a34914e4e8e832 100644 (file)
@@ -238,10 +238,13 @@ static u32 start_drv_threads(struct _adapter *padapter)
 
 void r8712_stop_drv_threads(struct _adapter *padapter)
 {
+       struct completion *completion =
+               &padapter->cmdpriv.terminate_cmdthread_comp;
+
        /*Below is to terminate r8712_cmd_thread & event_thread...*/
        complete(&padapter->cmdpriv.cmd_queue_comp);
        if (padapter->cmdThread)
-               wait_for_completion_interruptible(&padapter->cmdpriv.terminate_cmdthread_comp);
+               wait_for_completion_interruptible(completion);
        padapter->cmdpriv.cmd_seq = 1;
 }
 
index 3c88994fdfcd92f09fc2e84bc7dcf44f9da290cd..9c8e0c50a8047543bac8b9cdfb580ce57f632769 100644 (file)
@@ -321,10 +321,13 @@ int r8712_cmd_thread(void *context)
        void (*pcmd_callback)(struct _adapter *dev, struct cmd_obj *pcmd);
        struct _adapter *padapter = context;
        struct  cmd_priv        *pcmdpriv = &(padapter->cmdpriv);
+       struct completion *cmd_queue_comp =
+               &pcmdpriv->cmd_queue_comp;
+       struct mutex *pwctrl_lock = &padapter->pwrctrlpriv.mutex_lock;
 
        allow_signal(SIGTERM);
        while (1) {
-               if (wait_for_completion_interruptible(&pcmdpriv->cmd_queue_comp))
+               if (wait_for_completion_interruptible(cmd_queue_comp))
                        break;
                if (padapter->bDriverStopped || padapter->bSurpriseRemoved)
                        break;
@@ -343,6 +346,7 @@ _next:
                if (pcmd) { /* if pcmd != NULL, cmd will be handled by f/w */
                        struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
                        u8 blnPending = 0;
+                       u16 cmdcode = pcmd->cmdcode;
 
                        pcmdpriv->cmd_issued_cnt++;
                        cmdsz = round_up(pcmd->cmdsz, 8);
@@ -387,20 +391,18 @@ _next:
                        r8712_write_mem(padapter, RTL8712_DMA_H2CCMD, wr_sz,
                                        (u8 *)pdesc);
                        pcmdpriv->cmd_seq++;
-                       if (pcmd->cmdcode == GEN_CMD_CODE(_CreateBss)) {
+                       if (cmdcode == GEN_CMD_CODE(_CreateBss)) {
                                pcmd->res = H2C_SUCCESS;
-                               pcmd_callback = cmd_callback[pcmd->
-                                               cmdcode].callback;
+                               pcmd_callback = cmd_callback[cmdcode].callback;
                                if (pcmd_callback)
                                        pcmd_callback(padapter, pcmd);
                                continue;
                        }
-                       if (pcmd->cmdcode == GEN_CMD_CODE(_SetPwrMode)) {
+                       if (cmdcode == GEN_CMD_CODE(_SetPwrMode)) {
                                if (padapter->pwrctrlpriv.bSleep) {
-                                       mutex_lock(&padapter->
-                                                      pwrctrlpriv.mutex_lock);
+                                       mutex_lock(pwctrl_lock);
                                        r8712_set_rpwm(padapter, PS_STATE_S2);
-                                       mutex_unlock(&padapter->pwrctrlpriv.mutex_lock);
+                                       mutex_unlock(pwctrl_lock);
                                }
                        }
                        r8712_free_cmd_obj(pcmd);
index 42d014007764e4f61939c7dcc04ebb324fd2d82c..fb64c2891e22016164a606cb4aecd0cc5dd77cd8 100644 (file)
@@ -573,7 +573,8 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
                }
        } else if (pxmitframe->frame_tag == MGNT_FRAMETAG) {
                /* offset 4 */
-               ptxdesc->txdw1 |= cpu_to_le32((0x05) & 0x1f);/*CAM_ID(MAC_ID), default=5;*/
+               /* CAM_ID(MAC_ID), default=5; */
+               ptxdesc->txdw1 |= cpu_to_le32((0x05) & 0x1f);
                qsel = (uint)(pattrib->qsel & 0x0000001f);
                ptxdesc->txdw1 |= cpu_to_le32((qsel << QSEL_SHT) & 0x00001f00);
                ptxdesc->txdw1 |= cpu_to_le32(BIT(16));/* Non-QoS */
index b21f28140f532b12e47db753e7adc3086f8c6fa8..918947f3815167a2170c578b6711fd1da09c60e2 100644 (file)
@@ -55,7 +55,8 @@
                                                 * single-tone
                                                 */
 #define        WIFI_MP_CTX_BACKGROUND_PENDING  0x00080000 /* pending in cont, tx
-                                                   * background due to out of skb
+                                                   * background due
+                                                   * to out of skb
                                                    */
 #define        WIFI_MP_CTX_CCK_HW      0x00100000      /* in continuous tx*/
 #define        WIFI_MP_CTX_CCK_CS      0x00200000      /* in cont, tx with carrier