staging: r8188eu: clean up spacing style issues in core/rtw_cmd.c
authorMichael Straube <straube.linux@gmail.com>
Mon, 16 Aug 2021 15:57:59 +0000 (17:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Aug 2021 17:56:04 +0000 (19:56 +0200)
Clean up spacing style issues in core/rtw_cmd.c reported by checkpatch.

CHECK: spaces preferred around that ...
CHECK: No space is necessary after a cast
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210816155818.24005-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_cmd.c

index 65ca4a2..7c640c8 100644 (file)
@@ -16,7 +16,7 @@ Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
 No irqsave is necessary.
 */
 
-int    _rtw_init_cmd_priv (struct      cmd_priv *pcmdpriv)
+int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 {
        int res = _SUCCESS;
 
@@ -38,7 +38,7 @@ int   _rtw_init_cmd_priv (struct      cmd_priv *pcmdpriv)
                goto exit;
        }
 
-       pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf  +  CMDBUFF_ALIGN_SZ - ((size_t)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ-1));
+       pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf  +  CMDBUFF_ALIGN_SZ - ((size_t)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ - 1));
 
        pcmdpriv->rsp_allocated_buf = kzalloc(MAX_RSPSZ + 4, GFP_KERNEL);
 
@@ -69,7 +69,7 @@ int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
 
        _init_workitem(&pevtpriv->c2h_wk, c2h_wk_callback, NULL);
        pevtpriv->c2h_wk_alive = false;
-       pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1);
+       pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
 
        return res;
 }
@@ -87,7 +87,7 @@ void rtw_free_evt_priv(struct evt_priv *pevtpriv)
        }
 }
 
-void _rtw_free_cmd_priv (struct        cmd_priv *pcmdpriv)
+void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
 {
 
        if (pcmdpriv) {
@@ -149,12 +149,12 @@ u32       rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 {
        u32     res;
 
-       res = _rtw_init_cmd_priv (pcmdpriv);
+       res = _rtw_init_cmd_priv(pcmdpriv);
 
        return res;
 }
 
-u32    rtw_init_evt_priv (struct       evt_priv *pevtpriv)
+u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
 {
        int     res;
 
@@ -801,7 +801,7 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
        t_len = sizeof(struct wlan_bssid_ex);
 
        /* for hidden ap to set fw_state here */
-       if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE)) {
+       if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE)) {
                switch (ndis_network_mode) {
                case Ndis802_11IBSS:
                        set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
@@ -832,8 +832,8 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
 
        psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength;
 
-       if (psecnetwork->IELength-12 < 255) {
-               memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength-12);
+       if (psecnetwork->IELength - 12 < 255) {
+               memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength - 12);
        } else {
                memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], 255);
        }
@@ -1010,7 +1010,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key)
        memcpy(psetstakey_para->addr, sta->hwaddr, ETH_ALEN);
 
        if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
-               psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
+               psetstakey_para->algorithm = (unsigned char)psecuritypriv->dot11PrivacyAlgrthm;
        else
                GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false);