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 <mar...@martinhomuth.de> --- drivers/staging/rtl8712/ieee80211.c | 6 ++++-- drivers/staging/rtl8712/os_intfs.c | 5 ++++- drivers/staging/rtl8712/rtl8712_cmd.c | 18 ++++++++++-------- drivers/staging/rtl8712/rtl8712_xmit.c | 3 ++- drivers/staging/rtl8712/rtl871x_mlme.c | 3 ++- drivers/staging/rtl8712/rtl871x_mlme.h | 3 ++- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c index 33e82a9dd462..1f1d6768f4b1 100644 --- a/drivers/staging/rtl8712/ieee80211.c +++ b/drivers/staging/rtl8712/ieee80211.c @@ -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 bp = (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(bp); 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)); diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index 95caf8df9a13..e7df5d7986fc 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -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; } diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c index 3c88994fdfcd..9c8e0c50a804 100644 --- a/drivers/staging/rtl8712/rtl8712_cmd.c +++ b/drivers/staging/rtl8712/rtl8712_cmd.c @@ -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 @@ int r8712_cmd_thread(void *context) 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 @@ int r8712_cmd_thread(void *context) 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); diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c index 42d014007764..fb64c2891e22 100644 --- a/drivers/staging/rtl8712/rtl8712_xmit.c +++ b/drivers/staging/rtl8712/rtl8712_xmit.c @@ -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 */ diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index 111c809afc51..af7cc00286f2 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -1653,7 +1653,8 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter) pdev_network->Configuration.DSConfig = pregistrypriv->channel; if (cur_network->network.InfrastructureMode == Ndis802_11IBSS) pdev_network->Configuration.ATIMWindow = 3; - pdev_network->InfrastructureMode = cur_network->network.InfrastructureMode; + pdev_network->InfrastructureMode = + cur_network->network.InfrastructureMode; /* 1. Supported rates * 2. IE */ diff --git a/drivers/staging/rtl8712/rtl871x_mlme.h b/drivers/staging/rtl8712/rtl871x_mlme.h index b21f28140f53..918947f38151 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.h +++ b/drivers/staging/rtl8712/rtl871x_mlme.h @@ -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 -- 2.15.1 _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel