Skip to contentSkip to conversation

staging: r8188eu: various space fixes

PATCH In review Marco Lavagnino 4 participants 6 messages Nov 11, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: r8188eu: various space fixes

Fixes various warnings from empty spaces in the file 'rtw_cmd.c'.

I hope I got it right now.

(quoted diff) +0 -0

b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index f45f4ed..850dcbf 100644

drivers/staging/rtl8188eu/core/rtw_cmd.c +4 -4
@@ -32,7 +32,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;
 
@@ -116,7 +116,7 @@ _func_enter_;
 _func_exit_;
 }
 
-void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv)
+void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
 {
 _func_enter_;
 
@@ -196,12 +196,12 @@ u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 {
  u32 res;
 _func_enter_;
- res = _rtw_init_cmd_priv (pcmdpriv);
+ res = _rtw_init_cmd_priv(pcmdpriv);
 _func_exit_;
  return res;
 }
 
-u32 rtw_init_evt_priv (struct evt_priv *pevtpriv)
+u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
 {
  int res;
 _func_enter_;
@@ -474,13 +474,11 @@ u8 rtw_sitesurvey_cmd(struct adapter  *padapter,

struct ndis_802_11_ssid *ssid,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

_func_enter_;
- if (check_fwstate(pmlmepriv, _FW_LINKED) = true) {
+ if (check_fwstate(pmlmepriv, _FW_LINKED) = true) rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
- }

- if (check_fwstate(pmlmepriv, _FW_LINKED) = true) {
+ if (check_fwstate(pmlmepriv, _FW_LINKED) = true) p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
- }

ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); if (ph2c = NULL)
@@ -800,7 +798,7 @@ _func_exit_;

void rtw_getbbrfreg_cmdrsp_callback(struct adapter *padapter, struct
cmd_obj *pcmd)
{
- _func_enter_;
+_func_enter_;

kfree(pcmd->parmbuf);
kfree(pcmd);
@@ -812,7 +810,7 @@ _func_exit_;

void rtw_readtssi_cmdrsp_callback(struct adapter *padapter, struct
cmd_obj *pcmd)
{
- _func_enter_;
+_func_enter_;

kfree(pcmd->parmbuf);
kfree(pcmd);
@@ -910,11 +908,10 @@ _func_enter_;

  rtw_led_control(padapter, LED_CTL_START_TO_LINK);

- if (pmlmepriv->assoc_ssid.SsidLength = 0) {
+ if (pmlmepriv->assoc_ssid.SsidLength = 0) RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+Join cmd: Any SSid\n"));
- } else {
+ else
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid
=[%s]\n", pmlmepriv->assoc_ssid.Ssid));
- }

pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); if (pcmd = NULL) {
@@ -995,9 +992,9 @@ _func_enter_;

phtpriv->ht_option = false;
if (pregistrypriv->ht_enable) {
- /* Added by Albert 2010/06/23 */
- /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
- /* Especially for Realtek 8192u SoftAP. */
+ /* Added by Albert 2010/06/23 */
+ /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
+ /* Especially for Realtek 8192u SoftAP. */
if ((padapter->securitypriv.dot11PrivacyAlgrthm != _WEP40_) &&

     (padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) &&
     (padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {

@@ -1280,7 +1277,7 @@ _func_enter_;
goto exit;
}

-/* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable)); */
+/* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable)); */

_rtw_init_listhead(&ph2c->list);
ph2c->cmdcode = GEN_CMD_CODE(_GetRaTable);
@@ -1341,7 +1338,7 @@ exit:
_func_exit_;

return res;
- }
+}

u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr) {
@@ -1746,7 +1743,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
_func_enter_;

/* if (!pwrctrlpriv->bLeisurePs) */
- /* return res; */
+ /* return res; */

if (enqueue) {
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
@@ -1900,8 +1897,8 @@ _func_enter_;
}

pdrvextra_cmd_parm->ec_id = P2P_PROTO_WK_CID;
- pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
- pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
+ pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
+ pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */

init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm,
GEN_CMD_CODE(_Set_Drv_Extra));

@@ -2155,8 +2152,8 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size);
break;
case P2P_PROTO_WK_CID:
- /* Commented by Albert 2011/07/01 */
- /* I used the type_size as the type command */
+ /* Commented by Albert 2011/07/01 */
+ /* I used the type_size as the type command */ p2p_protocol_wk_hdl(padapter, pdrvextra_cmd->type_size); break;
#endif
@@ -2271,7 +2268,7 @@ _func_enter_;
psta = rtw_alloc_stainfo(&padapter->stapriv, pnetwork->MacAddress); if (psta = NULL) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nCan't alloc sta_info
when createbss_cmd_callback\n"));
- goto createbss_cmd_fail ;
+ goto createbss_cmd_fail;
}
}

#1 lore raw
Quoted 5 lines · Marco Lavagnino

Fixes various warnings from empty spaces in the file 'rtw_cmd.c'.

I hope I got it right now.

It is better.

The "I hope I got it right now." comment is bad. Anything before a line with 3 dashes (---) will end up in the git log. I doubt that you want that.

One other thing is that your mailer is mangling the patch by wrapping the long lines. An example is with

@@ -2155,8 +2152,8 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)

Larry

Quoted 170 lines
drivers/staging/rtl8188eu/core/rtw_cmd.c +6 -8
index f45f4ed..850dcbf 100644
@@ -32,7 +32,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;
 
@@ -116,7 +116,7 @@ _func_enter_;
  _func_exit_;
  }
 
-void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv)
+void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
  {
  _func_enter_;
 
@@ -196,12 +196,12 @@ u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
  {
   u32 res;
  _func_enter_;
- res = _rtw_init_cmd_priv (pcmdpriv);
+ res = _rtw_init_cmd_priv(pcmdpriv);
  _func_exit_;
   return res;
  }
 
-u32 rtw_init_evt_priv (struct evt_priv *pevtpriv)
+u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
  {
   int res;
  _func_enter_;
@@ -474,13 +474,11 @@ u8 rtw_sitesurvey_cmd(struct adapter  *padapter,
 struct ndis_802_11_ssid *ssid,
   struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
  _func_enter_;
- if (check_fwstate(pmlmepriv, _FW_LINKED) = true) {
+ if (check_fwstate(pmlmepriv, _FW_LINKED) = true)
   rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
- }
 
- if (check_fwstate(pmlmepriv, _FW_LINKED) = true) {
+ if (check_fwstate(pmlmepriv, _FW_LINKED) = true)
   p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
- }
 
   ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));

if (ph2c = NULL)

drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -1
@@ -800,7 +798,7 @@ _func_exit_;
 
  void rtw_getbbrfreg_cmdrsp_callback(struct adapter *padapter,  struct
 cmd_obj *pcmd)
  {
- _func_enter_;
+_func_enter_;
 
   kfree(pcmd->parmbuf);
   kfree(pcmd);
drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -1
@@ -812,7 +810,7 @@ _func_exit_;
 
  void rtw_readtssi_cmdrsp_callback(struct adapter *padapter,  struct
 cmd_obj *pcmd)
  {
- _func_enter_;
+_func_enter_;
 
   kfree(pcmd->parmbuf);
   kfree(pcmd);
drivers/staging/rtl8188eu/core/rtw_cmd.c +2 -3
@@ -910,11 +908,10 @@ _func_enter_;
 
   rtw_led_control(padapter, LED_CTL_START_TO_LINK);
 
- if (pmlmepriv->assoc_ssid.SsidLength = 0) {
+ if (pmlmepriv->assoc_ssid.SsidLength = 0)
   RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+Join cmd: Any SSid\n"));
- } else {
+ else
   RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid
 =[%s]\n", pmlmepriv->assoc_ssid.Ssid));
- }
 
   pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
   if (pcmd = NULL) {
drivers/staging/rtl8188eu/core/rtw_cmd.c +0 -2
@@ -995,9 +992,9 @@ _func_enter_;
 
   phtpriv->ht_option = false;
   if (pregistrypriv->ht_enable) {
- /* Added by Albert 2010/06/23 */
- /* For the WEP mode, we will use the bg mode to do the connection to

avoid some IOT issue. */
- /* Especially for Realtek 8192u SoftAP. */
+ /* Added by Albert 2010/06/23 */
+ /* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
+ /* Especially for Realtek 8192u SoftAP. */
if ((padapter->securitypriv.dot11PrivacyAlgrthm != _WEP40_) &&

      (padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) &&
      (padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {
drivers/staging/rtl8188eu/core/rtw_cmd.c +0 -1
@@ -1280,7 +1277,7 @@ _func_enter_;
   goto exit;
   }
 
-/* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm,

GEN_CMD_CODE(_SetRaTable)); */
+/* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable)); */

   _rtw_init_listhead(&ph2c->list);
   ph2c->cmdcode = GEN_CMD_CODE(_GetRaTable);
drivers/staging/rtl8188eu/core/rtw_cmd.c +2 -2
@@ -1341,7 +1338,7 @@ exit:
  _func_exit_;
 
   return res;
- }
+}
 
  u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr)
  {
@@ -1746,7 +1743,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter,
 u8 lps_ctrl_type, u8 enqueue)
  _func_enter_;
 
   /* if (!pwrctrlpriv->bLeisurePs) */
- /* return res; */
+ /* return res; */
 
   if (enqueue) {
   ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
drivers/staging/rtl8188eu/core/rtw_cmd.c +4 -4
@@ -1900,8 +1897,8 @@ _func_enter_;
   }
 
   pdrvextra_cmd_parm->ec_id = P2P_PROTO_WK_CID;
- pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
- pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
+ pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
+ pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
 
   init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm,
 GEN_CMD_CODE(_Set_Drv_Extra));
@@ -2155,8 +2152,8 @@ u8 rtw_drvextra_cmd_hdl(struct adapter
 *padapter, unsigned char *pbuf)
   p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size);
   break;
   case P2P_PROTO_WK_CID:
- /* Commented by Albert 2011/07/01 */
- /* I used the type_size as the type command */
+ /* Commented by Albert 2011/07/01 */
+ /* I used the type_size as the type command */
   p2p_protocol_wk_hdl(padapter, pdrvextra_cmd->type_size);
   break;
  #endif
drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -1
@@ -2271,7 +2268,7 @@ _func_enter_;
   psta = rtw_alloc_stainfo(&padapter->stapriv, pnetwork->MacAddress);
   if (psta = NULL) {
   RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nCan't alloc sta_info
 when createbss_cmd_callback\n"));
- goto createbss_cmd_fail ;
+ goto createbss_cmd_fail;
   }
   }
maintainer
#2 lore raw
In reply to Marco Lavagnino
Quoted 12 lines · Marco Lavagnino

Fixes various warnings from empty spaces in the file 'rtw_cmd.c'.

I hope I got it right now.

drivers/staging/rtl8188eu/core/rtw_cmd.c +0 -0
index f45f4ed..850dcbf 100644

drivers/staging/rtl8188eu/core/rtw_cmd.c Caller and the rtw_cmd_thread can protect cmd_q by spin_lock. · line 37

Quoted 7 lines
drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -1
@@ -32,7 +32,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;

Whitespace is all corrupted, you can't send patches directly from gmail, you have to use it as a SMTP server, not through the web interface, sorry.

greg k-h

#3 lore raw

PATCH 1/1 staging: r8188eu: various space fixes

In reply to Marco Lavagnino

Fixes various space errors.

---
 drivers/staging/rtl8188eu/core/rtw_cmd.c |   45
++++++++++++++----------------
 1 file changed, 21 insertions(+), 24 deletions(-)
(quoted diff) +0 -0

b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index f45f4ed..850dcbf 100644

drivers/staging/rtl8188eu/core/rtw_cmd.c +0 -0
@@ -32,7 +32,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;

@@ -116,7 +116,7 @@ _func_enter_;
_func_exit_;
}

-void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv)
+void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
{
_func_enter_;

@@ -196,12 +196,12 @@ u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
{
u32 res;
_func_enter_;
- res = _rtw_init_cmd_priv (pcmdpriv);
+ res = _rtw_init_cmd_priv(pcmdpriv);
_func_exit_;
return res;
}

-u32 rtw_init_evt_priv (struct evt_priv *pevtpriv)
+u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
{
int res;
_func_enter_;
@@ -474,13 +474,11 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

_func_enter_;
- if (check_fwstate(pmlmepriv, _FW_LINKED) = true) {
+ if (check_fwstate(pmlmepriv, _FW_LINKED) = true)
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
- }

- if (check_fwstate(pmlmepriv, _FW_LINKED) = true) {
+ if (check_fwstate(pmlmepriv, _FW_LINKED) = true)
p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
- }

ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); if (ph2c = NULL)
@@ -800,7 +798,7 @@ _func_exit_;

void rtw_getbbrfreg_cmdrsp_callback(struct adapter *padapter, struct
cmd_obj *pcmd)
{
- _func_enter_;
+_func_enter_;

kfree(pcmd->parmbuf);
kfree(pcmd);
@@ -812,7 +810,7 @@ _func_exit_;

void rtw_readtssi_cmdrsp_callback(struct adapter *padapter, struct
cmd_obj *pcmd)
{
- _func_enter_;
+_func_enter_;

kfree(pcmd->parmbuf);
kfree(pcmd);
@@ -910,11 +908,10 @@ _func_enter_;

rtw_led_control(padapter, LED_CTL_START_TO_LINK);

- if (pmlmepriv->assoc_ssid.SsidLength = 0) {
+ if (pmlmepriv->assoc_ssid.SsidLength = 0)
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+Join cmd: Any SSid
\n"));
- } else {
+ else
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%
s]\n", pmlmepriv->assoc_ssid.Ssid));
- }

pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); if (pcmd = NULL) {
@@ -995,9 +992,9 @@ _func_enter_;

phtpriv->ht_option = false;
if (pregistrypriv->ht_enable) {
- /* Added by Albert 2010/06/23 */
- /* For the WEP mode, we will use the bg mode to do the connection to
avoid some IOT issue. */
- /* Especially for Realtek 8192u SoftAP. */
+ /* Added by Albert 2010/06/23 */
+ /* For the WEP mode, we will use the bg mode to do the connection to
avoid some IOT issue. */
+ /* Especially for Realtek 8192u SoftAP. */
if ((padapter->securitypriv.dot11PrivacyAlgrthm != _WEP40_) &&
(padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) && (padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {
@@ -1280,7 +1277,7 @@ _func_enter_;
goto exit;
}

-/* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm,
GEN_CMD_CODE(_SetRaTable)); */
+/* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm,
GEN_CMD_CODE(_SetRaTable)); */

_rtw_init_listhead(&ph2c->list); ph2c->cmdcode = GEN_CMD_CODE(_GetRaTable);
@@ -1341,7 +1338,7 @@ exit:
_func_exit_;

return res;
- }
+}

u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr) {
@@ -1746,7 +1743,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
_func_enter_;

/* if (!pwrctrlpriv->bLeisurePs) */
- /* return res; */
+ /* return res; */

if (enqueue) {
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
@@ -1900,8 +1897,8 @@ _func_enter_;
}

pdrvextra_cmd_parm->ec_id = P2P_PROTO_WK_CID;
- pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe.
*/
- pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */
+ pdrvextra_cmd_parm->type_size = intCmdType; /* As the command tppe. */
+ pdrvextra_cmd_parm->pbuf = NULL; /* Must be NULL here */

init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm,
GEN_CMD_CODE(_Set_Drv_Extra));

@@ -2155,8 +2152,8 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size);
break;
case P2P_PROTO_WK_CID:
- /* Commented by Albert 2011/07/01 */
- /* I used the type_size as the type command */
+ /* Commented by Albert 2011/07/01 */
+ /* I used the type_size as the type command */
p2p_protocol_wk_hdl(padapter, pdrvextra_cmd->type_size); break;
#endif
@@ -2271,7 +2268,7 @@ _func_enter_;
psta = rtw_alloc_stainfo(&padapter->stapriv, pnetwork->MacAddress); if (psta = NULL) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nCan't alloc
sta_info when createbss_cmd_callback\n"));
- goto createbss_cmd_fail ;
+ goto createbss_cmd_fail;
}
}

Signature · 1 line
1.7.10.4
#4 lore raw
In reply to Marco Lavagnino
Quoted 173 lines · Marco Lavagnino

Fixes various space errors.

---
  drivers/staging/rtl8188eu/core/rtw_cmd.c |   45
++++++++++++++----------------
  1 file changed, 21 insertions(+), 24 deletions(-)
drivers/staging/rtl8188eu/core/rtw_cmd.c +0 -0
index f45f4ed..850dcbf 100644
@@ -32,7 +32,7 @@ Caller and the rtw_cmd_thread can protect cmd_q by

spin_lock.
No irqsave is necessary.
*/

drivers/staging/rtl8188eu/core/rtw_cmd.c +6 -8
-int	_rtw_init_cmd_priv (struct	cmd_priv *pcmdpriv)
+int	_rtw_init_cmd_priv(struct	cmd_priv *pcmdpriv)
  {
  	int res = _SUCCESS;
@@ -116,7 +116,7 @@ _func_enter_;
  _func_exit_;
  }
 
-void _rtw_free_cmd_priv (struct	cmd_priv *pcmdpriv)
+void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
  {
  _func_enter_;
 
@@ -196,12 +196,12 @@ u32	rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
  {
  	u32	res;
  _func_enter_;
-	res = _rtw_init_cmd_priv (pcmdpriv);
+	res = _rtw_init_cmd_priv(pcmdpriv);
  _func_exit_;
  	return res;
  }
 
-u32	rtw_init_evt_priv (struct	evt_priv *pevtpriv)
+u32	rtw_init_evt_priv(struct	evt_priv *pevtpriv)
  {
  	int	res;
  _func_enter_;
@@ -474,13 +474,11 @@ u8 rtw_sitesurvey_cmd(struct adapter  *padapter,
 struct ndis_802_11_ssid *ssid,
  	struct mlme_priv	*pmlmepriv = &padapter->mlmepriv;
 
  _func_enter_;
-	if (check_fwstate(pmlmepriv, _FW_LINKED) = true) {
+	if (check_fwstate(pmlmepriv, _FW_LINKED) = true)
  		rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
-	}
 
-	if (check_fwstate(pmlmepriv, _FW_LINKED) = true) {
+	if (check_fwstate(pmlmepriv, _FW_LINKED) = true)
  		p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
-	}
 
  	ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));

if (ph2c = NULL)

drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -1
@@ -800,7 +798,7 @@ _func_exit_;
 
  void rtw_getbbrfreg_cmdrsp_callback(struct adapter *padapter,  struct
 cmd_obj *pcmd)
  {
- _func_enter_;
+_func_enter_;
 
  	kfree(pcmd->parmbuf);
  	kfree(pcmd);
drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -1
@@ -812,7 +810,7 @@ _func_exit_;
 
  void rtw_readtssi_cmdrsp_callback(struct adapter *padapter,  struct
 cmd_obj *pcmd)
  {
- _func_enter_;
+_func_enter_;
 
  	kfree(pcmd->parmbuf);
  	kfree(pcmd);
drivers/staging/rtl8188eu/core/rtw_cmd.c +2 -3
@@ -910,11 +908,10 @@ _func_enter_;
 
  	rtw_led_control(padapter, LED_CTL_START_TO_LINK);
 
-	if (pmlmepriv->assoc_ssid.SsidLength = 0) {
+	if (pmlmepriv->assoc_ssid.SsidLength = 0)
  		RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+Join cmd: Any SSid
 \n"));
-	} else {
+	else
  		RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%
 s]\n", pmlmepriv->assoc_ssid.Ssid));
-	}
 
  	pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
  	if (pcmd = NULL) {
drivers/staging/rtl8188eu/core/rtw_cmd.c +0 -2
@@ -995,9 +992,9 @@ _func_enter_;
 
  	phtpriv->ht_option = false;
  	if (pregistrypriv->ht_enable) {
-		/* 	Added by Albert 2010/06/23 */
-		/* 	For the WEP mode, we will use the bg mode to do the connection to

avoid some IOT issue. */

drivers/staging/rtl8188eu/core/rtw_cmd.c +2 -1
-		/* 	Especially for Realtek 8192u SoftAP. */
+		/*	Added by Albert 2010/06/23 */
+		/*	For the WEP mode, we will use the bg mode to do the connection to

avoid some IOT issue. */

drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -1
+		/*	Especially for Realtek 8192u SoftAP. */
  		if ((padapter->securitypriv.dot11PrivacyAlgrthm != _WEP40_) &&
  		    (padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) &&
  		    (padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {
@@ -1280,7 +1277,7 @@ _func_enter_;
  		goto exit;
  	}
 
-/* 	init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm,

GEN_CMD_CODE(_SetRaTable)); */
+/* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm,
GEN_CMD_CODE(_SetRaTable)); */

  	_rtw_init_listhead(&ph2c->list);
  	ph2c->cmdcode = GEN_CMD_CODE(_GetRaTable);
drivers/staging/rtl8188eu/core/rtw_cmd.c +2 -2
@@ -1341,7 +1338,7 @@ exit:
  _func_exit_;
 
  	return res;
- }
+}
 
  u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr)
  {
@@ -1746,7 +1743,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter,
 u8 lps_ctrl_type, u8 enqueue)
  _func_enter_;
 
  	/* if (!pwrctrlpriv->bLeisurePs) */
-	/* 	return res; */
+	/*	return res; */
 
  	if (enqueue) {
  		ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
drivers/staging/rtl8188eu/core/rtw_cmd.c +2 -2
@@ -1900,8 +1897,8 @@ _func_enter_;
  	}
 
  	pdrvextra_cmd_parm->ec_id = P2P_PROTO_WK_CID;
-	pdrvextra_cmd_parm->type_size = intCmdType;	/* 	As the command tppe.
 */
-	pdrvextra_cmd_parm->pbuf = NULL;		/* 	Must be NULL here */
+	pdrvextra_cmd_parm->type_size = intCmdType;	/*	As the command tppe. */
+	pdrvextra_cmd_parm->pbuf = NULL;		/*	Must be NULL here */
 
  	init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm,

GEN_CMD_CODE(_Set_Drv_Extra));

drivers/staging/rtl8188eu/core/rtw_cmd.c +2 -2
@@ -2155,8 +2152,8 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter,
 unsigned char *pbuf)
  		p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size);
  		break;
  	case P2P_PROTO_WK_CID:
-		/* 	Commented by Albert 2011/07/01 */
-		/* 	I used the type_size as the type command */
+		/*	Commented by Albert 2011/07/01 */
+		/*	I used the type_size as the type command */
  		p2p_protocol_wk_hdl(padapter, pdrvextra_cmd->type_size);
  		break;
  #endif

drivers/staging/rtl8188eu/core/rtw_cmd.c _func_enter_; · line 2274

Quoted 8 lines
drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -1
@@ -2271,7 +2268,7 @@ _func_enter_;
  			psta = rtw_alloc_stainfo(&padapter->stapriv, pnetwork->MacAddress);
  			if (psta = NULL) {
  				RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nCan't alloc
 sta_info when createbss_cmd_callback\n"));
-				goto createbss_cmd_fail ;
+				goto createbss_cmd_fail;
  			}
  		}

Sorry. Trying to apply the patch results in:

finger@larrylap:~/staging> git am \[PATCH\]\ staging\:\ r8188eu\:\ various\
space\ fixes.eml
Applying: staging: r8188eu: various space fixes
fatal: corrupt patch at line 13
Patch failed at 0001 staging: r8188eu: various space fixes
The copy of the patch that failed is found in:
/home/finger/staging/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". finger@larrylap:~/staging>

The bad line is wrapped.

You really do need to email the patch to yourself, extract the message from your mailer, and try using "git am" to test the message.

Larry

#5 lore raw
In reply to Marco Lavagnino
Quoted 1 line · Marco Lavagnino

Fixes various space errors.

What space errors?

Quoted 6 lines
---
 drivers/staging/rtl8188eu/core/rtw_cmd.c |   45
++++++++++++++----------------
 1 file changed, 21 insertions(+), 24 deletions(-)

Your patch is line-wrapped and can not be applied :(

Care to try again?

thanks,

greg k-h