staging: rtl8712: rename bDriverStopped to driver_stopped
PATCH v2 1/3 staging: rtl8712: rename bDriverStopped to driver_stopped
Fix checkpatch warning: Avoid CameCase for struct variable bDriverStopped by renaming it to driver_stopped.
--- drivers/staging/rtl8712/drv_types.h | 3 +-- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_io.c | 4 ++-- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 ++++++++-------- drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 2 +- drivers/staging/rtl8712/usb_ops_linux.c | 18 +++++++++--------- 11 files changed, 37 insertions(+), 38 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -2
@@ -145,7 +145,7 @@ struct _adapter {struct hal_priv halpriv;struct led_priv ledpriv;struct mp_priv mppriv; -s32 bDriverStopped; +s32 driver_stopped;s32 bSurpriseRemoved;s32 bSuspended;u32 IsrContent;
@@ -180,4 +180,3 @@ static inline u8 *myid(struct eeprom_priv *peepriv)u8 r8712_usb_hal_bus_init (struct _adapter *adapter);#endif /*__DRV_TYPES_H__*/ -
drivers/staging/rtl8712/os_intfs.c +1 -1
@@ -374,7 +374,7 @@ static int netdev_open(struct net_device *pnetdev)mutex_lock (&padapter->mutex_start);if (!padapter->bup) { - padapter->bDriverStopped = false; + padapter->driver_stopped = false; padapter->bSurpriseRemoved = false; padapter->bup = true;if (rtl871x_hal_init (padapter) != _SUCCESS)
drivers/staging/rtl8712/rtl8712_cmd.c +2 -2
@@ -317,7 +317,7 @@ int r8712_cmd_thread(void *context)while (1 ) {if (wait_for_completion_interruptible (cmd_queue_comp))break ; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)break ;if (r8712_register_cmd_alive (padapter) != _SUCCESS)continue ;
@@ -368,7 +368,7 @@ int r8712_cmd_thread(void *context) pcmdbuf +=2 ;/* 8 bytes alignment */ memcpy ((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);while (check_cmd_fifo (padapter, wr_sz) == _FAIL) { -if (padapter->bDriverStopped || +if (padapter->driver_stopped || padapter->bSurpriseRemoved)break ;msleep (100 );
drivers/staging/rtl8712/rtl8712_io.c +2 -2
@@ -68,7 +68,7 @@ void r8712_read_mem(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; hdl->io_ops._read_mem (hdl, addr, cnt, pmem);
@@ -85,7 +85,7 @@ void r8712_read_port(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; hdl->io_ops._read_port (hdl, addr, cnt, pmem);
drivers/staging/rtl8712/rtl8712_led.c +3 -3
@@ -109,7 +109,7 @@ static void SwLedOn(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {
@@ -137,7 +137,7 @@ static void SwLedOff(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {
@@ -816,7 +816,7 @@ static void BlinkTimerCallback(struct timer_list *t)/* This fixed the crash problem on Fedora 12 when trying to do the * insmod;ifconfig up;rmmod commands. */ -if (pLed->padapter->bSurpriseRemoved || pLed->padapter->bDriverStopped) +if (pLed->padapter->bSurpriseRemoved || pLed->padapter->driver_stopped)return ;schedule_work (&pLed->BlinkWorkItem); }
drivers/staging/rtl8712/rtl8712_recv.c +5 -5
@@ -541,7 +541,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter, (preorder_ctrl->indicate_seq +1 ) %4096 ;/*indicate this recv_frame*/ if (!pattrib->amsdu) { -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {/* indicate this recv_frame */ r8712_recv_indicatepkt(padapter,
@@ -576,7 +576,7 @@ static int recv_indicatepkt_reorder(struct _adapter *padapter,/* s1. */ r8712_wlanhdr_to_ethhdr (prframe);if (pattrib->qos !=1 ) { -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {r8712_recv_indicatepkt (padapter, prframe);return _SUCCESS;
@@ -626,7 +626,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext)struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ;spin_lock_irqsave (&ppending_recvframe_queue->lock, irql);r8712_recv_indicatepkts_in_order (padapter, preorder_ctrl, true);
@@ -643,7 +643,7 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter,if (phtpriv->ht_option ==1 ) {/*B/G/N Mode*/ if (recv_indicatepkt_reorder (padapter, prframe) != _SUCCESS) {/* including perform A-MPDU Rx Ordering Buffer Control*/ -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved)return _FAIL; }
@@ -651,7 +651,7 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter, retval =r8712_wlanhdr_to_ethhdr (prframe);if (retval != _SUCCESS)return retval; -if (!padapter->bDriverStopped && !padapter->bSurpriseRemoved) { +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {/* indicate this recv_frame */ r8712_recv_indicatepkt (padapter, prframe); }else {
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +8 -8
@@ -1118,9 +1118,9 @@ static int r8711_wx_set_scan(struct net_device *dev,struct mlme_priv *pmlmepriv = &padapter->mlmepriv;u8 status = true; -if (padapter->bDriverStopped) { -netdev_info (dev,"In %s: bDriverStopped=%d\n" , - __func__, padapter->bDriverStopped); +if (padapter->driver_stopped) { +netdev_info (dev,"In %s: driver_stopped=%d\n" , + __func__, padapter->driver_stopped);return -1 ; }if (!padapter->bup)
@@ -1175,7 +1175,7 @@ static int r8711_wx_get_scan(struct net_device *dev,char *stop = ev + wrqu->data.length;u32 ret =0 , cnt =0 ; -if (padapter->bDriverStopped) +if (padapter->driver_stopped)return -EINVAL ;while (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) {
@@ -1938,7 +1938,7 @@ static int r871x_get_ap_info(struct net_device *dev,u8 bssid[ETH_ALEN ];char data[33 ]; -if (padapter->bDriverStopped || (pdata ==NULL )) +if (padapter->driver_stopped || (pdata ==NULL ))return -EINVAL ;while (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) {
@@ -2002,7 +2002,7 @@ static int r871x_set_pid(struct net_device *dev,struct _adapter *padapter =netdev_priv (dev);struct iw_point *pdata = &wrqu->data; -if ((padapter->bDriverStopped) || (pdata ==NULL )) +if ((padapter->driver_stopped) || (pdata ==NULL ))return -EINVAL ;if (copy_from_user (&padapter->pid, pdata->pointer,sizeof (int )))return -EINVAL ;
@@ -2018,7 +2018,7 @@ static int r871x_set_chplan(struct net_device *dev,struct iw_point *pdata = &wrqu->data;int ch_plan =-1 ; -if ((padapter->bDriverStopped) || (pdata ==NULL )) { +if ((padapter->driver_stopped) || (pdata ==NULL )) { ret = -EINVAL ; goto exit; }
@@ -2038,7 +2038,7 @@ static int r871x_wps_start(struct net_device *dev,struct iw_point *pdata = &wrqu->data;u32 u32wps_start =0 ; -if ((padapter->bDriverStopped) || (pdata ==NULL )) +if ((padapter->driver_stopped) || (pdata ==NULL ))return -EINVAL ;if (copy_from_user ((void *)&u32wps_start, pdata->pointer,4 ))return -EFAULT ;
drivers/staging/rtl8712/rtl871x_mlme.c +3 -3
@@ -174,7 +174,7 @@ sint r8712_if_up(struct _adapter *padapter) {sint res; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved || +if (padapter->driver_stopped || padapter->bSurpriseRemoved || !check_fwstate (&padapter->mlmepriv, _FW_LINKED)) { res = false; }else {
@@ -1055,7 +1055,7 @@ void _r8712_join_timeout_handler(struct _adapter *adapter)unsigned long irqL;struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ;spin_lock_irqsave (&pmlmepriv->lock, irqL);_clr_fwstate_ (pmlmepriv, _FW_UNDER_LINKING);
@@ -1084,7 +1084,7 @@ void r8712_scan_timeout_handler (struct _adapter *adapter)void _r8712_dhcp_timeout_handler (struct _adapter *adapter) { -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ;if (adapter->pwrctrlpriv.pwr_mode != adapter->registrypriv.power_mgnt) r8712_set_ps_mode(adapter, adapter->registrypriv.power_mgnt,
drivers/staging/rtl8712/rtl871x_pwrctrl.c +2 -2
@@ -32,7 +32,7 @@ void r8712_set_rpwm(struct _adapter *padapter, u8 val8)if (pwrpriv->rpwm_retry ==0 )return ; } -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ; rpwm = val8 | pwrpriv->tog;switch (val8) {
@@ -117,7 +117,7 @@ static void _rpwm_check_handler (struct _adapter *padapter) {struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ;if (pwrpriv->cpwm != pwrpriv->rpwm)schedule_work (&pwrpriv->rpwm_workitem);
drivers/staging/rtl8712/usb_intf.c +1 -1
@@ -289,7 +289,7 @@ void r871x_dev_unload(struct _adapter *padapter) {if (padapter->bup) {/*s1.*/ - padapter->bDriverStopped = true; + padapter->driver_stopped = true;/*s3.*/ rtl871x_intf_stop (padapter);
drivers/staging/rtl8712/usb_ops_linux.c +9 -9
@@ -147,7 +147,7 @@ static void usb_write_mem_complete(struct urb *purb)if (purb->status !=0 ) {if (purb->status == (-ESHUTDOWN )) - padapter->bDriverStopped = true; + padapter->driver_stopped = true;else padapter->bSurpriseRemoved = true; }
@@ -164,7 +164,7 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct urb *piorw_urb = pintfpriv->piorw_urb; -if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || (padapter->pwrctrlpriv.pnp_bstop_trx))return ;/* translate DMA FIFO addr to pipehandle */
@@ -186,7 +186,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)struct _adapter *padapter = (struct _adapter *)precvbuf->adapter;struct recv_priv *precvpriv = &padapter->recvpriv; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ;if (purb->status ==0 ) {/* SUCCESS */ if ((purb->actual_length > (MAX_RECVBUF_SZ)) ||
@@ -218,11 +218,11 @@ static void r8712_usb_read_port_complete(struct urb *purb)case -EPIPE :case -ENODEV :case -ESHUTDOWN : - padapter->bDriverStopped = true; + padapter->driver_stopped = true;break ;case -ENOENT :if (!padapter->bSuspended) { - padapter->bDriverStopped = true; + padapter->driver_stopped = true;break ; }/* Fall through. */
@@ -254,7 +254,7 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)struct recv_priv *precvpriv = &adapter->recvpriv;struct usb_device *pusbd = pdvobj->pusbdev; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved || +if (adapter->driver_stopped || adapter->bSurpriseRemoved || adapter->pwrctrlpriv.pnp_bstop_trx || !precvbuf)return _FAIL;r8712_init_recvbuf (adapter, precvbuf);
@@ -314,9 +314,9 @@ void r8712_xmit_bh(void *priv)struct _adapter *padapter = priv;struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -if (padapter->bDriverStopped || +if (padapter->driver_stopped || padapter->bSurpriseRemoved) { -netdev_err (padapter->pnetdev,"xmit_bh => bDriverStopped or bSurpriseRemoved\n" ); +netdev_err (padapter->pnetdev,"xmit_bh => driver_stopped or bSurpriseRemoved\n" );return ; } ret =r8712_xmitframe_complete (padapter, pxmitpriv,NULL );
@@ -390,7 +390,7 @@ u32 r8712_usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct pkt_attrib *pattrib = &pxmitframe->attrib; -if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || (padapter->pwrctrlpriv.pnp_bstop_trx))return _FAIL;for (i =0 ; i <8 ; i++) {
Signature · 1 line
2.17.1
PATCH v2 2/3 staging: rtl8712: rename bSurpriseRemoved to surprise_removed
Fix checkpatch.pl warning: Avoid CamelCase by renaming struct variable bSurpriseRemoved to surprise_removed.
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_io.c | 4 ++-- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_eeprom.c | 23 +++++++++++------------ drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 6 +++--- drivers/staging/rtl8712/usb_ops_linux.c | 16 ++++++++-------- 11 files changed, 41 insertions(+), 42 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -146,7 +146,7 @@ struct _adapter {struct led_priv ledpriv;struct mp_priv mppriv;s32 driver_stopped; -s32 bSurpriseRemoved; +s32 surprise_removed;s32 bSuspended;u32 IsrContent;u32 ImrContent;
drivers/staging/rtl8712/os_intfs.c +1 -1
@@ -375,7 +375,7 @@ static int netdev_open(struct net_device *pnetdev)mutex_lock (&padapter->mutex_start);if (!padapter->bup) { padapter->driver_stopped = false; - padapter->bSurpriseRemoved = false; + padapter->surprise_removed = false; padapter->bup = true;if (rtl871x_hal_init (padapter) != _SUCCESS) goto netdev_open_error;
drivers/staging/rtl8712/rtl8712_cmd.c +2 -2
@@ -317,7 +317,7 @@ int r8712_cmd_thread(void *context)while (1 ) {if (wait_for_completion_interruptible (cmd_queue_comp))break ; -if (padapter->driver_stopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->surprise_removed)break ;if (r8712_register_cmd_alive (padapter) != _SUCCESS)continue ;
@@ -369,7 +369,7 @@ int r8712_cmd_thread(void *context)memcpy ((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);while (check_cmd_fifo (padapter, wr_sz) == _FAIL) {if (padapter->driver_stopped || - padapter->bSurpriseRemoved) + padapter->surprise_removed)break ;msleep (100 );continue ;
drivers/staging/rtl8712/rtl8712_io.c +2 -2
@@ -68,7 +68,7 @@ void r8712_read_mem(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->driver_stopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->surprise_removed)return ; hdl->io_ops._read_mem (hdl, addr, cnt, pmem);
@@ -85,7 +85,7 @@ void r8712_read_port(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->driver_stopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->surprise_removed)return ; hdl->io_ops._read_port (hdl, addr, cnt, pmem);
drivers/staging/rtl8712/rtl8712_led.c +3 -3
@@ -109,7 +109,7 @@ static void SwLedOn(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->driver_stopped) +if (padapter->surprise_removed || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {
@@ -137,7 +137,7 @@ static void SwLedOff(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->driver_stopped) +if (padapter->surprise_removed || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {
@@ -816,7 +816,7 @@ static void BlinkTimerCallback(struct timer_list *t)/* This fixed the crash problem on Fedora 12 when trying to do the * insmod;ifconfig up;rmmod commands. */ -if (pLed->padapter->bSurpriseRemoved || pLed->padapter->driver_stopped) +if (pLed->padapter->surprise_removed || pLed->padapter->driver_stopped)return ;schedule_work (&pLed->BlinkWorkItem); }
drivers/staging/rtl8712/rtl8712_recv.c +5 -5
@@ -542,7 +542,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,/*indicate this recv_frame*/ if (!pattrib->amsdu) {if (!padapter->driver_stopped && - !padapter->bSurpriseRemoved) { + !padapter->surprise_removed) {/* indicate this recv_frame */ r8712_recv_indicatepkt (padapter, prframe);
@@ -577,7 +577,7 @@ static int recv_indicatepkt_reorder(struct _adapter *padapter,r8712_wlanhdr_to_ethhdr (prframe);if (pattrib->qos !=1 ) {if (!padapter->driver_stopped && - !padapter->bSurpriseRemoved) { + !padapter->surprise_removed) {r8712_recv_indicatepkt (padapter, prframe);return _SUCCESS; }else {
@@ -626,7 +626,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext)struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -if (padapter->driver_stopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->surprise_removed)return ;spin_lock_irqsave (&ppending_recvframe_queue->lock, irql);r8712_recv_indicatepkts_in_order (padapter, preorder_ctrl, true);
@@ -644,14 +644,14 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter,if (recv_indicatepkt_reorder (padapter, prframe) != _SUCCESS) {/* including perform A-MPDU Rx Ordering Buffer Control*/ if (!padapter->driver_stopped && - !padapter->bSurpriseRemoved) + !padapter->surprise_removed)return _FAIL; } }else {/*B/G mode*/ retval =r8712_wlanhdr_to_ethhdr (prframe);if (retval != _SUCCESS)return retval; -if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) { +if (!padapter->driver_stopped && !padapter->surprise_removed) {/* indicate this recv_frame */ r8712_recv_indicatepkt (padapter, prframe); }else {
drivers/staging/rtl8712/rtl871x_eeprom.c +11 -12
@@ -37,7 +37,7 @@ static void shift_out_bits(struct _adapter *padapter, u16 data, u16 count) {u16 x, mask; -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; mask =0x01 << (count -1 ); x =r8712_read8 (padapter,EE_9346CR );
@@ -46,7 +46,7 @@ static void shift_out_bits(struct _adapter *padapter, u16 data, u16 count) x &= ~_EEDI;if (data & mask) x |= _EEDI; -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out;r8712_write8 (padapter,EE_9346CR , (u8 )x);udelay (CLOCK_RATE );
@@ -54,7 +54,7 @@ static void shift_out_bits(struct _adapter *padapter, u16 data, u16 count)down_clk (padapter, &x); mask >>=1 ; }while (mask); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; x &= ~_EEDI;r8712_write8 (padapter,EE_9346CR , (u8 )x);
@@ -65,7 +65,7 @@ static u16 shift_in_bits(struct _adapter *padapter) {u16 x, d =0 , i; -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; x =r8712_read8 (padapter,EE_9346CR ); x &= ~(_EEDO | _EEDI);
@@ -73,7 +73,7 @@ static u16 shift_in_bits(struct _adapter *padapter)for (i =0 ; i <16 ; i++) { d <<=1 ;up_clk (padapter, &x); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; x =r8712_read8 (padapter,EE_9346CR ); x &= ~(_EEDI);
@@ -117,17 +117,17 @@ static void eeprom_clean(struct _adapter *padapter) {u16 x; -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ; x =r8712_read8 (padapter,EE_9346CR ); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ; x &= ~(_EECS | _EEDI);r8712_write8 (padapter,EE_9346CR , (u8 )x); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ;up_clk (padapter, &x); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ;down_clk (padapter, &x); }
@@ -194,11 +194,11 @@ u16 r8712_eeprom_read16(struct _adapter *padapter, u16 reg) /*ReadEEprom*/ tmp8_clk_new = tmp8_clk_ori |0x20 ;if (tmp8_clk_new != tmp8_clk_ori)r8712_write8 (padapter,0x10250003 , tmp8_clk_new); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out;/* select EEPROM, reset bits, set _EECS */ x =r8712_read8 (padapter,EE_9346CR ); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; x &= ~(_EEDI | _EEDO | _EESK | _EEM0); x |= _EEM1 | _EECS;
@@ -218,4 +218,3 @@ u16 r8712_eeprom_read16(struct _adapter *padapter, u16 reg) /*ReadEEprom*/r8712_write8 (padapter,0x102502f1 , tmp8_ori);return data; } -
drivers/staging/rtl8712/rtl871x_mlme.c +3 -3
@@ -174,7 +174,7 @@ sint r8712_if_up(struct _adapter *padapter) {sint res; -if (padapter->driver_stopped || padapter->bSurpriseRemoved || +if (padapter->driver_stopped || padapter->surprise_removed || !check_fwstate (&padapter->mlmepriv, _FW_LINKED)) { res = false; }else {
@@ -1055,7 +1055,7 @@ void _r8712_join_timeout_handler(struct _adapter *adapter)unsigned long irqL;struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -if (adapter->driver_stopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->surprise_removed)return ;spin_lock_irqsave (&pmlmepriv->lock, irqL);_clr_fwstate_ (pmlmepriv, _FW_UNDER_LINKING);
@@ -1084,7 +1084,7 @@ void r8712_scan_timeout_handler (struct _adapter *adapter)void _r8712_dhcp_timeout_handler (struct _adapter *adapter) { -if (adapter->driver_stopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->surprise_removed)return ;if (adapter->pwrctrlpriv.pwr_mode != adapter->registrypriv.power_mgnt) r8712_set_ps_mode(adapter, adapter->registrypriv.power_mgnt,
drivers/staging/rtl8712/rtl871x_pwrctrl.c +2 -2
@@ -32,7 +32,7 @@ void r8712_set_rpwm(struct _adapter *padapter, u8 val8)if (pwrpriv->rpwm_retry ==0 )return ; } -if (padapter->driver_stopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->surprise_removed)return ; rpwm = val8 | pwrpriv->tog;switch (val8) {
@@ -117,7 +117,7 @@ static void _rpwm_check_handler (struct _adapter *padapter) {struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -if (padapter->driver_stopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->surprise_removed)return ;if (pwrpriv->cpwm != pwrpriv->rpwm)schedule_work (&pwrpriv->rpwm_workitem);
drivers/staging/rtl8712/usb_intf.c +3 -3
@@ -271,7 +271,7 @@ static void r8712_usb_dvobj_deinit(struct _adapter *padapter)void rtl871x_intf_stop (struct _adapter *padapter) {/*disable_hw_interrupt*/ -if (!padapter->bSurpriseRemoved) { +if (!padapter->surprise_removed) {/*device still exists, so driver can do i/o operation * TODO: */
@@ -298,7 +298,7 @@ void r871x_dev_unload(struct _adapter *padapter)r8712_stop_drv_threads (padapter);/*s5.*/ -if (!padapter->bSurpriseRemoved) { +if (!padapter->surprise_removed) { padapter->hw_init_completed = false;rtl8712_hal_deinit (padapter); }
@@ -600,7 +600,7 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)/* never exit with a firmware callback pending */ wait_for_completion (&padapter->rtl8712_fw_ready);if (drvpriv.drv_registered) - padapter->bSurpriseRemoved = true; + padapter->surprise_removed = true;unregister_netdev (pnetdev);/* will call netdev_close() */ flush_scheduled_work ();udelay (1 );
drivers/staging/rtl8712/usb_ops_linux.c +8 -8
@@ -149,7 +149,7 @@ static void usb_write_mem_complete(struct urb *purb)if (purb->status == (-ESHUTDOWN )) padapter->driver_stopped = true;else - padapter->bSurpriseRemoved = true; + padapter->surprise_removed = true; }complete (&pintfpriv->io_retevt_comp); }
@@ -164,7 +164,7 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct urb *piorw_urb = pintfpriv->piorw_urb; -if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->surprise_removed) || (padapter->pwrctrlpriv.pnp_bstop_trx))return ;/* translate DMA FIFO addr to pipehandle */
@@ -186,7 +186,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)struct _adapter *padapter = (struct _adapter *)precvbuf->adapter;struct recv_priv *precvpriv = &padapter->recvpriv; -if (padapter->bSurpriseRemoved || padapter->driver_stopped) +if (padapter->surprise_removed || padapter->driver_stopped)return ;if (purb->status ==0 ) {/* SUCCESS */ if ((purb->actual_length > (MAX_RECVBUF_SZ)) ||
@@ -254,7 +254,7 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)struct recv_priv *precvpriv = &adapter->recvpriv;struct usb_device *pusbd = pdvobj->pusbdev; -if (adapter->driver_stopped || adapter->bSurpriseRemoved || +if (adapter->driver_stopped || adapter->surprise_removed || adapter->pwrctrlpriv.pnp_bstop_trx || !precvbuf)return _FAIL;r8712_init_recvbuf (adapter, precvbuf);
@@ -315,8 +315,8 @@ void r8712_xmit_bh(void *priv)struct xmit_priv *pxmitpriv = &padapter->xmitpriv;if (padapter->driver_stopped || - padapter->bSurpriseRemoved) { -netdev_err (padapter->pnetdev,"xmit_bh => driver_stopped or bSurpriseRemoved\n" ); + padapter->surprise_removed) { +netdev_err (padapter->pnetdev,"xmit_bh => driver_stopped or surprise_removed\n" );return ; } ret =r8712_xmitframe_complete (padapter, pxmitpriv,NULL );
@@ -360,7 +360,7 @@ static void usb_write_port_complete(struct urb *purb)break ; } } -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ;switch (purb->status) {case 0 :
@@ -390,7 +390,7 @@ u32 r8712_usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct pkt_attrib *pattrib = &pxmitframe->attrib; -if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->surprise_removed) || (padapter->pwrctrlpriv.pnp_bstop_trx))return _FAIL;for (i =0 ; i <8 ; i++) {
Signature · 1 line
2.17.1
Greg KH
maintainerRe: [PATCH 2/3] staging: rtl8712: rename bSurpriseRemoved to surprise_removed
Quoted 23 lines · Himadri Pandya
Fix checkpatch.pl warning: Avoid CamelCase by renaming struct variable bSurpriseRemoved to
surprise_removed.Signed-off-by Himadri Pandya <[email protected]>--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_io.c | 4 ++-- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_eeprom.c | 23 +++++++++++------------ drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 6 +++--- drivers/staging/rtl8712/usb_ops_linux.c | 16 ++++++++-------- 11 files changed, 41 insertions(+), 42 deletions(-)drivers/staging/rtl8712/drv_types.h +0
-0
drivers/staging/rtl8712/drv_types.h struct _adapter { · line 149
Quoted 5 lines
drivers/staging/rtl8712/drv_types.h +1
-1@@ -146,7 +146,7 @@ struct _adapter {struct led_priv ledpriv;struct mp_priv mppriv;s32 driver_stopped; -s32 bSurpriseRemoved; +s32 surprise_removed;
Same as before 'bool' please.
thanks,
greg k-h
PATCH v2 3/3 staging: rtl8712: rename bSuspended to suspended
In reply to Himadri PandyaFix checkpatch.pl warning: Avoid CamelCase by renaming struct variable bSuspended to suspended.
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/usb_intf.c | 4 ++-- drivers/staging/rtl8712/usb_ops_linux.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -147,7 +147,7 @@ struct _adapter {struct mp_priv mppriv;s32 driver_stopped;s32 surprise_removed; -s32 bSuspended; +s32 suspended;u32 IsrContent;u32 ImrContent;u8 EepromAddressSize;
drivers/staging/rtl8712/usb_intf.c +2 -2
@@ -196,7 +196,7 @@ static int r871x_suspend(struct usb_interface *pusb_intf, pm_message_t state)struct _adapter *padapter =netdev_priv (pnetdev);netdev_info (pnetdev,"Suspending...\n" ); - padapter->bSuspended = true; + padapter->suspended = true;rtl871x_intf_stop (padapter);if (pnetdev->netdev_ops->ndo_stop) pnetdev->netdev_ops->ndo_stop (pnetdev);
@@ -220,7 +220,7 @@ static int r871x_resume(struct usb_interface *pusb_intf)netif_device_attach (pnetdev);if (pnetdev->netdev_ops->ndo_open) pnetdev->netdev_ops->ndo_open (pnetdev); - padapter->bSuspended = false; + padapter->suspended = false;rtl871x_intf_resume (padapter);return 0 ; }
drivers/staging/rtl8712/usb_ops_linux.c +1 -1
@@ -221,7 +221,7 @@ static void r8712_usb_read_port_complete(struct urb *purb) padapter->driver_stopped = true;break ;case -ENOENT : -if (!padapter->bSuspended) { +if (!padapter->suspended) { padapter->driver_stopped = true;break ; }
Signature · 1 line
2.17.1
Greg KH
maintainerRe: [PATCH 3/3] staging: rtl8712: rename bSuspended to suspended
Quoted 15 lines · Himadri Pandya
Fix checkpatch.pl warning: Avoid CamelCase by renaming struct variable bSuspended to suspended.
Signed-off-by Himadri Pandya <[email protected]>--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/usb_intf.c | 4 ++-- drivers/staging/rtl8712/usb_ops_linux.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/staging/rtl8712/drv_types.h +0
-0
drivers/staging/rtl8712/drv_types.h struct _adapter { · line 150
Quoted 5 lines
drivers/staging/rtl8712/drv_types.h +1
-1@@ -147,7 +147,7 @@ struct _adapter {struct mp_priv mppriv;s32 driver_stopped;s32 surprise_removed; -s32 bSuspended; +s32 suspended;
And here as well, 'bool'.
thanks,
greg k-h
Quoted 2 lines · Himadri Pandya
Fix checkpatch warning: Avoid CameCase for struct variable bDriverStopped by renaming it to
driver_stopped.
A series should have a cover letter (0/3).
julia
Quoted 384 lines
Signed-off-by Himadri Pandya <[email protected]>--- drivers/staging/rtl8712/drv_types.h | 3 +-- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_io.c | 4 ++-- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 ++++++++-------- drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 2 +- drivers/staging/rtl8712/usb_ops_linux.c | 18 +++++++++--------- 11 files changed, 37 insertions(+), 38 deletions(-)drivers/staging/rtl8712/drv_types.h +1
-2@@ -145,7 +145,7 @@ struct _adapter {struct hal_priv halpriv;struct led_priv ledpriv;struct mp_priv mppriv; -s32 bDriverStopped; +s32 driver_stopped;s32 bSurpriseRemoved;s32 bSuspended;u32 IsrContent;@@ -180,4 +180,3 @@ static inline u8 *myid(struct eeprom_priv *peepriv)u8 r8712_usb_hal_bus_init (struct _adapter *adapter);#endif /*__DRV_TYPES_H__*/ -drivers/staging/rtl8712/os_intfs.c +1
-1@@ -374,7 +374,7 @@ static int netdev_open(struct net_device *pnetdev)mutex_lock (&padapter->mutex_start);if (!padapter->bup) { - padapter->bDriverStopped = false; + padapter->driver_stopped = false; padapter->bSurpriseRemoved = false; padapter->bup = true;if (rtl871x_hal_init (padapter) != _SUCCESS)drivers/staging/rtl8712/rtl8712_cmd.c +2
-2@@ -317,7 +317,7 @@ int r8712_cmd_thread(void *context)while (1 ) {if (wait_for_completion_interruptible (cmd_queue_comp))break ; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)break ;if (r8712_register_cmd_alive (padapter) != _SUCCESS)continue ;@@ -368,7 +368,7 @@ int r8712_cmd_thread(void *context) pcmdbuf +=2 ;/* 8 bytes alignment */ memcpy ((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);while (check_cmd_fifo (padapter, wr_sz) == _FAIL) { -if (padapter->bDriverStopped || +if (padapter->driver_stopped || padapter->bSurpriseRemoved)break ;msleep (100 );drivers/staging/rtl8712/rtl8712_io.c +2
-2@@ -68,7 +68,7 @@ void r8712_read_mem(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; hdl->io_ops._read_mem (hdl, addr, cnt, pmem);@@ -85,7 +85,7 @@ void r8712_read_port(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; hdl->io_ops._read_port (hdl, addr, cnt, pmem);drivers/staging/rtl8712/rtl8712_led.c +3
-3@@ -109,7 +109,7 @@ static void SwLedOn(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {@@ -137,7 +137,7 @@ static void SwLedOff(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {@@ -816,7 +816,7 @@ static void BlinkTimerCallback(struct timer_list *t)/* This fixed the crash problem on Fedora 12 when trying to do the * insmod;ifconfig up;rmmod commands. */ -if (pLed->padapter->bSurpriseRemoved || pLed->padapter->bDriverStopped) +if (pLed->padapter->bSurpriseRemoved || pLed->padapter->driver_stopped)return ;schedule_work (&pLed->BlinkWorkItem); }drivers/staging/rtl8712/rtl8712_recv.c +5
-5@@ -541,7 +541,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter, (preorder_ctrl->indicate_seq +1 ) %4096 ;/*indicate this recv_frame*/ if (!pattrib->amsdu) { -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {/* indicate this recv_frame */ r8712_recv_indicatepkt(padapter,@@ -576,7 +576,7 @@ static int recv_indicatepkt_reorder(struct _adapter *padapter,/* s1. */ r8712_wlanhdr_to_ethhdr (prframe);if (pattrib->qos !=1 ) { -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {r8712_recv_indicatepkt (padapter, prframe);return _SUCCESS;@@ -626,7 +626,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext)struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ;spin_lock_irqsave (&ppending_recvframe_queue->lock, irql);r8712_recv_indicatepkts_in_order (padapter, preorder_ctrl, true);@@ -643,7 +643,7 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter,if (phtpriv->ht_option ==1 ) {/*B/G/N Mode*/ if (recv_indicatepkt_reorder (padapter, prframe) != _SUCCESS) {/* including perform A-MPDU Rx Ordering Buffer Control*/ -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved)return _FAIL; }@@ -651,7 +651,7 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter, retval =r8712_wlanhdr_to_ethhdr (prframe);if (retval != _SUCCESS)return retval; -if (!padapter->bDriverStopped && !padapter->bSurpriseRemoved) { +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {/* indicate this recv_frame */ r8712_recv_indicatepkt (padapter, prframe); }else {drivers/staging/rtl8712/rtl871x_ioctl_linux.c +8
-8@@ -1118,9 +1118,9 @@ static int r8711_wx_set_scan(struct net_device *dev,struct mlme_priv *pmlmepriv = &padapter->mlmepriv;u8 status = true; -if (padapter->bDriverStopped) { -netdev_info (dev,"In %s: bDriverStopped=%d\n" , - __func__, padapter->bDriverStopped); +if (padapter->driver_stopped) { +netdev_info (dev,"In %s: driver_stopped=%d\n" , + __func__, padapter->driver_stopped);return -1 ; }if (!padapter->bup)@@ -1175,7 +1175,7 @@ static int r8711_wx_get_scan(struct net_device *dev,char *stop = ev + wrqu->data.length;u32 ret =0 , cnt =0 ; -if (padapter->bDriverStopped) +if (padapter->driver_stopped)return -EINVAL ;while (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) {@@ -1938,7 +1938,7 @@ static int r871x_get_ap_info(struct net_device *dev,u8 bssid[ETH_ALEN ];char data[33 ]; -if (padapter->bDriverStopped || (pdata ==NULL )) +if (padapter->driver_stopped || (pdata ==NULL ))return -EINVAL ;while (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) {@@ -2002,7 +2002,7 @@ static int r871x_set_pid(struct net_device *dev,struct _adapter *padapter =netdev_priv (dev);struct iw_point *pdata = &wrqu->data; -if ((padapter->bDriverStopped) || (pdata ==NULL )) +if ((padapter->driver_stopped) || (pdata ==NULL ))return -EINVAL ;if (copy_from_user (&padapter->pid, pdata->pointer,sizeof (int )))return -EINVAL ;@@ -2018,7 +2018,7 @@ static int r871x_set_chplan(struct net_device *dev,struct iw_point *pdata = &wrqu->data;int ch_plan =-1 ; -if ((padapter->bDriverStopped) || (pdata ==NULL )) { +if ((padapter->driver_stopped) || (pdata ==NULL )) { ret = -EINVAL ; goto exit; }@@ -2038,7 +2038,7 @@ static int r871x_wps_start(struct net_device *dev,struct iw_point *pdata = &wrqu->data;u32 u32wps_start =0 ; -if ((padapter->bDriverStopped) || (pdata ==NULL )) +if ((padapter->driver_stopped) || (pdata ==NULL ))return -EINVAL ;if (copy_from_user ((void *)&u32wps_start, pdata->pointer,4 ))return -EFAULT ;drivers/staging/rtl8712/rtl871x_mlme.c +3
-3@@ -174,7 +174,7 @@ sint r8712_if_up(struct _adapter *padapter) {sint res; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved || +if (padapter->driver_stopped || padapter->bSurpriseRemoved || !check_fwstate (&padapter->mlmepriv, _FW_LINKED)) { res = false; }else {@@ -1055,7 +1055,7 @@ void _r8712_join_timeout_handler(struct _adapter *adapter)unsigned long irqL;struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ;spin_lock_irqsave (&pmlmepriv->lock, irqL);_clr_fwstate_ (pmlmepriv, _FW_UNDER_LINKING);@@ -1084,7 +1084,7 @@ void r8712_scan_timeout_handler (struct _adapter *adapter)void _r8712_dhcp_timeout_handler (struct _adapter *adapter) { -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ;if (adapter->pwrctrlpriv.pwr_mode != adapter->registrypriv.power_mgnt) r8712_set_ps_mode(adapter, adapter->registrypriv.power_mgnt,drivers/staging/rtl8712/rtl871x_pwrctrl.c +2
-2@@ -32,7 +32,7 @@ void r8712_set_rpwm(struct _adapter *padapter, u8 val8)if (pwrpriv->rpwm_retry ==0 )return ; } -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ; rpwm = val8 | pwrpriv->tog;switch (val8) {@@ -117,7 +117,7 @@ static void _rpwm_check_handler (struct _adapter *padapter) {struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ;if (pwrpriv->cpwm != pwrpriv->rpwm)schedule_work (&pwrpriv->rpwm_workitem);drivers/staging/rtl8712/usb_intf.c +1
-1@@ -289,7 +289,7 @@ void r871x_dev_unload(struct _adapter *padapter) {if (padapter->bup) {/*s1.*/ - padapter->bDriverStopped = true; + padapter->driver_stopped = true;/*s3.*/ rtl871x_intf_stop (padapter);drivers/staging/rtl8712/usb_ops_linux.c +9
-10@@ -147,7 +147,7 @@ static void usb_write_mem_complete(struct urb *purb)if (purb->status !=0 ) {if (purb->status == (-ESHUTDOWN )) - padapter->bDriverStopped = true; + padapter->driver_stopped = true;else padapter->bSurpriseRemoved = true; }@@ -164,7 +164,7 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct urb *piorw_urb = pintfpriv->piorw_urb; -if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || (padapter->pwrctrlpriv.pnp_bstop_trx))return ;/* translate DMA FIFO addr to pipehandle */ @@ -186,7 +186,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)struct _adapter *padapter = (struct _adapter *)precvbuf->adapter;struct recv_priv *precvpriv = &padapter->recvpriv; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ;if (purb->status ==0 ) {/* SUCCESS */ if ((purb->actual_length > (MAX_RECVBUF_SZ)) ||@@ -218,11 +218,11 @@ static void r8712_usb_read_port_complete(struct urb *purb)case -EPIPE :case -ENODEV :case -ESHUTDOWN : - padapter->bDriverStopped = true; + padapter->driver_stopped = true;break ;case -ENOENT :if (!padapter->bSuspended) { - padapter->bDriverStopped = true; + padapter->driver_stopped = true;break ; }/* Fall through. */ @@ -254,7 +254,7 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)struct recv_priv *precvpriv = &adapter->recvpriv;struct usb_device *pusbd = pdvobj->pusbdev; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved || +if (adapter->driver_stopped || adapter->bSurpriseRemoved || adapter->pwrctrlpriv.pnp_bstop_trx || !precvbuf)return _FAIL;r8712_init_recvbuf (adapter, precvbuf);@@ -314,9 +314,9 @@ void r8712_xmit_bh(void *priv)struct _adapter *padapter = priv;struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -if (padapter->bDriverStopped || +if (padapter->driver_stopped || padapter->bSurpriseRemoved) { -netdev_err (padapter->pnetdev,"xmit_bh => bDriverStopped or bSurpriseRemoved\n" ); +netdev_err (padapter->pnetdev,"xmit_bh => driver_stopped or bSurpriseRemoved\n" );return ; } ret =r8712_xmitframe_complete (padapter, pxmitpriv,NULL );@@ -390,7 +390,7 @@ u32 r8712_usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct pkt_attrib *pattrib = &pxmitframe->attrib; -if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || (padapter->pwrctrlpriv.pnp_bstop_trx))return _FAIL;for (i =0 ; i <8 ; i++) { --2.17.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190301051505.55407-1-himadri18.07%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 9 lines · Julia Lawall,
Quoted 2 lines · Himadri Pandya
Fix checkpatch warning: Avoid CameCase for struct variable bDriverStopped by renaming it to
driver_stopped.A series should have a cover letter (0/3).
Yes. Including it in the next version.
Thank you.
- Himadri
Quoted 433 lines
julia
Quoted 16 lines
Signed-off-by Himadri Pandya <[email protected]>--- drivers/staging/rtl8712/drv_types.h | 3 +-- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_io.c | 4 ++-- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 ++++++++-------- drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 2 +- drivers/staging/rtl8712/usb_ops_linux.c | 18 +++++++++--------- 11 files changed, 37 insertions(+), 38 deletions(-)Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/staging/rtl8712/drv_types.hReview
Quoted 18 lines
index
48d62fe6c8d4..60c5ed55ab04100644drivers/staging/rtl8712/drv_types.h +1
-2@@ -145,7 +145,7 @@ struct _adapter {struct hal_priv halpriv;struct led_priv ledpriv;struct mp_priv mppriv; -s32 bDriverStopped; +s32 driver_stopped;s32 bSurpriseRemoved;s32 bSuspended;u32 IsrContent;@@ -180,4 +180,3 @@ static inline u8 *myid(struct eeprom_priv *peepriv)u8 r8712_usb_hal_bus_init (struct _adapter *adapter);#endif /*__DRV_TYPES_H__*/ -(quoted diff) +0
-0
b/drivers/staging/rtl8712/os_intfs.cReview
Quoted 13 lines
index
2d3f38007299..bd2ffd0ebde9100644drivers/staging/rtl8712/os_intfs.c +1
-1@@ -374,7 +374,7 @@ static int netdev_open(struct net_device *pnetdev)mutex_lock (&padapter->mutex_start);if (!padapter->bup) { - padapter->bDriverStopped = false; + padapter->driver_stopped = false; padapter->bSurpriseRemoved = false; padapter->bup = true;if (rtl871x_hal_init (padapter) != _SUCCESS)(quoted diff) +0
-0
b/drivers/staging/rtl8712/rtl8712_cmd.cReview
Quoted 22 lines
index
1920d02f7c9f..c7437f979252100644drivers/staging/rtl8712/rtl8712_cmd.c +2
-2@@ -317,7 +317,7 @@ int r8712_cmd_thread(void *context)while (1 ) {if (wait_for_completion_interruptible (cmd_queue_comp))break ; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)break ;if (r8712_register_cmd_alive (padapter) != _SUCCESS)continue ;@@ -368,7 +368,7 @@ int r8712_cmd_thread(void *context) pcmdbuf +=2 ;/* 8 bytes alignment */ memcpy ((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);while (check_cmd_fifo (padapter, wr_sz) == _FAIL) { -if (padapter->bDriverStopped || +if (padapter->driver_stopped || padapter->bSurpriseRemoved)break ;msleep (100 );(quoted diff) +0
-0
b/drivers/staging/rtl8712/rtl8712_io.cdrivers/staging/rtl8712/rtl8712_io.c void r8712_read_mem(struct _adapter *adapter, u32
Quoted 4 lines
index
8eb79f73c014..ab775e721bf2100644drivers/staging/rtl8712/rtl8712_io.c +0
-0@@ -68,7 +68,7 @@ void r8712_read_mem(struct _adapter *adapter, u32addr, u32 cnt, u8 *pmem)
drivers/staging/rtl8712/rtl8712_io.c void r8712_read_port(struct _adapter *adapter, u32
Quoted 9 lines
drivers/staging/rtl8712/rtl8712_io.c +1
-1{struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; hdl->io_ops._read_mem (hdl, addr, cnt, pmem);@@ -85,7 +85,7 @@ void r8712_read_port(struct _adapter *adapter, u32addr, u32 cnt, u8 *pmem)
Review
Quoted 9 lines
drivers/staging/rtl8712/rtl8712_io.c +1
-1{struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; hdl->io_ops._read_port (hdl, addr, cnt, pmem);(quoted diff) +0
-0
b/drivers/staging/rtl8712/rtl8712_led.cdrivers/staging/rtl8712/rtl8712_led.c static void SwLedOn(struct _adapter *padapter,
Quoted 4 lines
index
07fcf9b9b811..deceef345056100644drivers/staging/rtl8712/rtl8712_led.c +0
-0@@ -109,7 +109,7 @@ static void SwLedOn(struct _adapter *padapter,struct
LED_871x*pLed)drivers/staging/rtl8712/rtl8712_led.c static void SwLedOff(struct _adapter *padapter,
Quoted 9 lines
drivers/staging/rtl8712/rtl8712_led.c +1
-1{u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {@@ -137,7 +137,7 @@ static void SwLedOff(struct _adapter *padapter,struct
LED_871x*pLed)drivers/staging/rtl8712/rtl8712_led.c static void BlinkTimerCallback(struct timer_list *t) · line 819
Quoted 13 lines
drivers/staging/rtl8712/rtl8712_led.c +1
-2{u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {@@ -816,7 +816,7 @@ static void BlinkTimerCallback(struct timer_list *t)/* This fixed the crash problem on Fedora 12 when trying to do the * insmod;ifconfig up;rmmod commands. */ - if (pLed->padapter->bSurpriseRemoved ||
pLed->padapter->bDriverStopped)drivers/staging/rtl8712/rtl8712_led.c static void BlinkTimerCallback(struct timer_list *t) · line 819
Quoted 1 line
drivers/staging/rtl8712/rtl8712_led.c +1
-0+ if (pLed->padapter->bSurpriseRemoved ||
pLed->padapter->driver_stopped)Review
Quoted 4 lines
drivers/staging/rtl8712/rtl8712_led.c +0
-0return ;schedule_work (&pLed->BlinkWorkItem); }(quoted diff) +0
-0
b/drivers/staging/rtl8712/rtl8712_recv.cdrivers/staging/rtl8712/rtl8712_recv.c int r8712_recv_indicatepkts_in_order(struct _adapter
Quoted 4 lines
index
5bf9070b7a28..bca4edde18b4100644drivers/staging/rtl8712/rtl8712_recv.c +0
-0@@ -541,7 +541,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter*padapter,
drivers/staging/rtl8712/rtl8712_recv.c static int recv_indicatepkt_reorder(struct _adapter
Quoted 9 lines
drivers/staging/rtl8712/rtl8712_recv.c +1
-1(preorder_ctrl->indicate_seq +1 ) %4096 ;/*indicate this recv_frame*/ if (!pattrib->amsdu) { -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {/* indicate this recv_frame */ r8712_recv_indicatepkt(padapter,@@ -576,7 +576,7 @@ static int recv_indicatepkt_reorder(struct _adapter*padapter,
drivers/staging/rtl8712/rtl8712_recv.c void r8712_reordering_ctrl_timeout_handler(void
Quoted 9 lines
drivers/staging/rtl8712/rtl8712_recv.c +1
-1/* s1. */ r8712_wlanhdr_to_ethhdr (prframe);if (pattrib->qos !=1 ) { -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {r8712_recv_indicatepkt (padapter, prframe);return _SUCCESS;@@ -626,7 +626,7 @@ void r8712_reordering_ctrl_timeout_handler(void*pcontext)
drivers/staging/rtl8712/rtl8712_recv.c static int r8712_process_recv_indicatepkts(struct
Quoted 9 lines
drivers/staging/rtl8712/rtl8712_recv.c +1
-1struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ;spin_lock_irqsave (&ppending_recvframe_queue->lock, irql);r8712_recv_indicatepkts_in_order (padapter, preorder_ctrl, true);@@ -643,7 +643,7 @@ static int r8712_process_recv_indicatepkts(struct
_adapter*padapter,drivers/staging/rtl8712/rtl8712_recv.c static int r8712_process_recv_indicatepkts(struct · line 644
Quoted 2 lines
drivers/staging/rtl8712/rtl8712_recv.c +0
-0if (phtpriv->ht_option ==1 ) {/*B/G/N Mode*/ if (recv_indicatepkt_reorder(padapter, prframe) !=
_SUCCESS) {drivers/staging/rtl8712/rtl8712_recv.c static int r8712_process_recv_indicatepkts(struct · line 645
Quoted 1 line
drivers/staging/rtl8712/rtl8712_recv.c +0
-0/* including perform A-MPDU Rx Ordering Buffer Control*/
drivers/staging/rtl8712/rtl8712_recv.c static int r8712_process_recv_indicatepkts(struct
Quoted 6 lines
drivers/staging/rtl8712/rtl8712_recv.c +1
-1-if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved)return _FAIL; }@@ -651,7 +651,7 @@ static int r8712_process_recv_indicatepkts(struct
_adapter*padapter,drivers/staging/rtl8712/rtl8712_recv.c static int r8712_process_recv_indicatepkts(struct _adapter *padapter,
Quoted 4 lines
drivers/staging/rtl8712/rtl8712_recv.c +0
-1retval =r8712_wlanhdr_to_ethhdr (prframe);if (retval != _SUCCESS)return retval; - if (!padapter->bDriverStopped &&!padapter->bSurpriseRemoved) {
drivers/staging/rtl8712/rtl8712_recv.c static int r8712_process_recv_indicatepkts(struct · line 654
Quoted 1 line
drivers/staging/rtl8712/rtl8712_recv.c +1
-0+ if (!padapter->driver_stopped &&!padapter->bSurpriseRemoved) {
Review
Quoted 4 lines
drivers/staging/rtl8712/rtl8712_recv.c +0
-0/* indicate this recv_frame */ r8712_recv_indicatepkt (padapter, prframe); }else {(quoted diff) +0
-0
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.cdrivers/staging/rtl8712/rtl871x_ioctl_linux.c static int r8711_wx_set_scan(struct net_device
Quoted 4 lines
index
e723357ac8c0..ad9b2f76d04a100644drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0
-0@@ -1118,9 +1118,9 @@ static int r8711_wx_set_scan(struct net_device*dev,
drivers/staging/rtl8712/rtl871x_ioctl_linux.c static int r8711_wx_get_scan(struct net_device
Quoted 13 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +3
-3struct mlme_priv *pmlmepriv = &padapter->mlmepriv;u8 status = true; -if (padapter->bDriverStopped) { -netdev_info (dev,"In %s: bDriverStopped=%d\n" , - __func__, padapter->bDriverStopped); +if (padapter->driver_stopped) { +netdev_info (dev,"In %s: driver_stopped=%d\n" , + __func__, padapter->driver_stopped);return -1 ; }if (!padapter->bup)@@ -1175,7 +1175,7 @@ static int r8711_wx_get_scan(struct net_device*dev,
drivers/staging/rtl8712/rtl871x_ioctl_linux.c static int r871x_get_ap_info(struct net_device
Quoted 9 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1
-1char *stop = ev + wrqu->data.length;u32 ret =0 , cnt =0 ; -if (padapter->bDriverStopped) +if (padapter->driver_stopped)return -EINVAL ;while (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) {@@ -1938,7 +1938,7 @@ static int r871x_get_ap_info(struct net_device*dev,
Review
Quoted 36 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +4
-4u8 bssid[ETH_ALEN ];char data[33 ]; -if (padapter->bDriverStopped || (pdata ==NULL )) +if (padapter->driver_stopped || (pdata ==NULL ))return -EINVAL ;while (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) {@@ -2002,7 +2002,7 @@ static int r871x_set_pid(struct net_device *dev,struct _adapter *padapter =netdev_priv (dev);struct iw_point *pdata = &wrqu->data; -if ((padapter->bDriverStopped) || (pdata ==NULL )) +if ((padapter->driver_stopped) || (pdata ==NULL ))return -EINVAL ;if (copy_from_user (&padapter->pid, pdata->pointer,sizeof (int )))return -EINVAL ;@@ -2018,7 +2018,7 @@ static int r871x_set_chplan(struct net_device *dev,struct iw_point *pdata = &wrqu->data;int ch_plan =-1 ; -if ((padapter->bDriverStopped) || (pdata ==NULL )) { +if ((padapter->driver_stopped) || (pdata ==NULL )) { ret = -EINVAL ; goto exit; }@@ -2038,7 +2038,7 @@ static int r871x_wps_start(struct net_device *dev,struct iw_point *pdata = &wrqu->data;u32 u32wps_start =0 ; -if ((padapter->bDriverStopped) || (pdata ==NULL )) +if ((padapter->driver_stopped) || (pdata ==NULL ))return -EINVAL ;if (copy_from_user ((void *)&u32wps_start, pdata->pointer,4 ))return -EFAULT ;(quoted diff) +0
-0
b/drivers/staging/rtl8712/rtl871x_mlme.cdrivers/staging/rtl8712/rtl871x_mlme.c void _r8712_join_timeout_handler(struct _adapter
Quoted 13 lines
index
3f17ef6f7e39..a10a5fbabb33100644drivers/staging/rtl8712/rtl871x_mlme.c +1
-1@@ -174,7 +174,7 @@ sint r8712_if_up(struct _adapter *padapter) {sint res; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved || +if (padapter->driver_stopped || padapter->bSurpriseRemoved || !check_fwstate (&padapter->mlmepriv, _FW_LINKED)) { res = false; }else {@@ -1055,7 +1055,7 @@ void _r8712_join_timeout_handler(struct _adapter*adapter)
drivers/staging/rtl8712/rtl871x_mlme.c void r8712_scan_timeout_handler (struct _adapter
Quoted 9 lines
drivers/staging/rtl8712/rtl871x_mlme.c +1
-1unsigned long irqL;struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ;spin_lock_irqsave (&pmlmepriv->lock, irqL);_clr_fwstate_ (pmlmepriv, _FW_UNDER_LINKING);@@ -1084,7 +1084,7 @@ void r8712_scan_timeout_handler (struct _adapter*adapter)
drivers/staging/rtl8712/rtl871x_mlme.c void r8712_scan_timeout_handler (struct _adapter *adapter)
Quoted 7 lines
drivers/staging/rtl8712/rtl871x_mlme.c +1
-1void _r8712_dhcp_timeout_handler (struct _adapter *adapter) { -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; if (adapter->pwrctrlpriv.pwr_mode !=
adapter->registrypriv.power_mgnt)drivers/staging/rtl8712/rtl871x_mlme.c void r8712_scan_timeout_handler (struct _adapter · line 1089
Quoted 1 line
drivers/staging/rtl8712/rtl871x_mlme.c +0
-0r8712_set_ps_mode(adapter,
adapter->registrypriv.power_mgnt,Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/staging/rtl8712/rtl871x_pwrctrl.cdrivers/staging/rtl8712/rtl871x_pwrctrl.c static void _rpwm_check_handler (struct _adapter
Quoted 13 lines
index
351984fe254e..ab2be8507941100644drivers/staging/rtl8712/rtl871x_pwrctrl.c +1
-1@@ -32,7 +32,7 @@ void r8712_set_rpwm(struct _adapter *padapter, u8 val8)if (pwrpriv->rpwm_retry ==0 )return ; } -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ; rpwm = val8 | pwrpriv->tog;switch (val8) {@@ -117,7 +117,7 @@ static void _rpwm_check_handler (struct _adapter*padapter)
Review
Quoted 9 lines
drivers/staging/rtl8712/rtl871x_pwrctrl.c +1
-1{struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ;if (pwrpriv->cpwm != pwrpriv->rpwm)schedule_work (&pwrpriv->rpwm_workitem);(quoted diff) +0
-0
b/drivers/staging/rtl8712/usb_intf.cReview
Quoted 13 lines
index
005010de9997..cb66ed4bbeac100644drivers/staging/rtl8712/usb_intf.c +1
-1@@ -289,7 +289,7 @@ void r871x_dev_unload(struct _adapter *padapter) {if (padapter->bup) {/*s1.*/ - padapter->bDriverStopped = true; + padapter->driver_stopped = true;/*s3.*/ rtl871x_intf_stop (padapter);(quoted diff) +0
-0
b/drivers/staging/rtl8712/usb_ops_linux.cdrivers/staging/rtl8712/usb_ops_linux.c void r8712_usb_write_mem(struct intf_hdl *pintfhdl,
Quoted 13 lines
index
ee5968808332..c4e66f19349e100644drivers/staging/rtl8712/usb_ops_linux.c +1
-1@@ -147,7 +147,7 @@ static void usb_write_mem_complete(struct urb *purb)if (purb->status !=0 ) {if (purb->status == (-ESHUTDOWN )) - padapter->bDriverStopped = true; + padapter->driver_stopped = true;else padapter->bSurpriseRemoved = true; }@@ -164,7 +164,7 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl,u32 addr, u32 cnt, u8 *wmem)
drivers/staging/rtl8712/usb_ops_linux.c static void r8712_usb_read_port_complete(struct urb
Quoted 9 lines
drivers/staging/rtl8712/usb_ops_linux.c +1
-1struct usb_device *pusbd = pdvobj->pusbdev;struct urb *piorw_urb = pintfpriv->piorw_urb; -if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || (padapter->pwrctrlpriv.pnp_bstop_trx))return ;/* translate DMA FIFO addr to pipehandle */ @@ -186,7 +186,7 @@ static void r8712_usb_read_port_complete(struct urb*purb)
drivers/staging/rtl8712/usb_ops_linux.c static void r8712_usb_read_port_complete(struct
Quoted 9 lines
drivers/staging/rtl8712/usb_ops_linux.c +1
-1struct _adapter *padapter = (struct _adapter *)precvbuf->adapter;struct recv_priv *precvpriv = &padapter->recvpriv; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ;if (purb->status ==0 ) {/* SUCCESS */ if ((purb->actual_length > (MAX_RECVBUF_SZ)) ||@@ -218,11 +218,11 @@ static void r8712_usb_read_port_complete(structurb *purb)
drivers/staging/rtl8712/usb_ops_linux.c u32 r8712_usb_read_port(struct intf_hdl *pintfhdl,
Quoted 14 lines
drivers/staging/rtl8712/usb_ops_linux.c +2
-2case -EPIPE :case -ENODEV :case -ESHUTDOWN : - padapter->bDriverStopped = true; + padapter->driver_stopped = true;break ;case -ENOENT :if (!padapter->bSuspended) { - padapter->bDriverStopped = true; + padapter->driver_stopped = true;break ; }/* Fall through. */ @@ -254,7 +254,7 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl,u32 addr, u32 cnt, u8 *rmem)
Quoted 9 lines
drivers/staging/rtl8712/usb_ops_linux.c +1
-1struct recv_priv *precvpriv = &adapter->recvpriv;struct usb_device *pusbd = pdvobj->pusbdev; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved || +if (adapter->driver_stopped || adapter->bSurpriseRemoved || adapter->pwrctrlpriv.pnp_bstop_trx || !precvbuf)return _FAIL;r8712_init_recvbuf (adapter, precvbuf);drivers/staging/rtl8712/usb_ops_linux.c void r8712_xmit_bh(void *priv) · line 319
Quoted 7 lines
drivers/staging/rtl8712/usb_ops_linux.c +1
-2@@ -314,9 +314,9 @@ void r8712_xmit_bh(void *priv)struct _adapter *padapter = priv;struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -if (padapter->bDriverStopped || +if (padapter->driver_stopped || padapter->bSurpriseRemoved) { - netdev_err(padapter->pnetdev, "xmit_bh => bDriverStoppedor bSurpriseRemoved\n");
drivers/staging/rtl8712/usb_ops_linux.c void r8712_xmit_bh(void *priv) · line 319
Quoted 1 line
drivers/staging/rtl8712/usb_ops_linux.c +1
-0+ netdev_err(padapter->pnetdev, "xmit_bh => driver_stoppedor bSurpriseRemoved\n");
drivers/staging/rtl8712/usb_ops_linux.c u32 r8712_usb_write_port(struct intf_hdl *pintfhdl,
Quoted 4 lines
drivers/staging/rtl8712/usb_ops_linux.c +0
-0return ; } ret =r8712_xmitframe_complete (padapter, pxmitpriv,NULL );@@ -390,7 +390,7 @@ u32 r8712_usb_write_port(struct intf_hdl *pintfhdl,u32 addr, u32 cnt, u8 *wmem)
Quoted 11 lines
drivers/staging/rtl8712/usb_ops_linux.c +1
-2struct usb_device *pusbd = pdvobj->pusbdev;struct pkt_attrib *pattrib = &pxmitframe->attrib; -if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || (padapter->pwrctrlpriv.pnp_bstop_trx))return _FAIL;for (i =0 ; i <8 ; i++) { --2.17.1
Quoted 2 lines
--
You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 2 lines
To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20190301051505.55407-1-himadri18.07%40gmail.com
.Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Greg KH
maintainerQuoted 23 lines · Himadri Pandya
Fix checkpatch warning: Avoid CameCase for struct variable bDriverStopped by renaming it to
driver_stopped.Signed-off-by Himadri Pandya <[email protected]>--- drivers/staging/rtl8712/drv_types.h | 3 +-- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_io.c | 4 ++-- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 ++++++++-------- drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 2 +- drivers/staging/rtl8712/usb_ops_linux.c | 18 +++++++++--------- 11 files changed, 37 insertions(+), 38 deletions(-)drivers/staging/rtl8712/drv_types.h +0
-0
drivers/staging/rtl8712/drv_types.h struct _adapter { · line 148
Quoted 5 lines
drivers/staging/rtl8712/drv_types.h +1
-1@@ -145,7 +145,7 @@ struct _adapter {struct hal_priv halpriv;struct led_priv ledpriv;struct mp_priv mppriv; -s32 bDriverStopped; +s32 driver_stopped;
This is odd. The "b" implies that this is a "boolean" flag, not a s32 value. Why not also change this to 'bool' at the same time to preserve that type information.
drivers/staging/rtl8712/drv_types.h static inline u8 *myid(struct eeprom_priv *peepriv) · line 183
Quoted 8 lines
drivers/staging/rtl8712/drv_types.h +0
-1s32 bSurpriseRemoved;s32 bSuspended;u32 IsrContent;@@ -180,4 +180,3 @@ static inline u8 *myid(struct eeprom_priv *peepriv)u8 r8712_usb_hal_bus_init (struct _adapter *adapter);#endif /*__DRV_TYPES_H__*/ -
No need to delete this line in the same patch :(
drivers/staging/rtl8712/os_intfs.c static int netdev_open(struct net_device *pnetdev) · line 377
Quoted 10 lines
drivers/staging/rtl8712/os_intfs.c +1
-1@@ -374,7 +374,7 @@ static int netdev_open(struct net_device *pnetdev)mutex_lock (&padapter->mutex_start);if (!padapter->bup) { - padapter->bDriverStopped = false; + padapter->driver_stopped = false;
See you are using it as a boolean, might as well have it be a real boolean.
thanks,
greg k-h
v2 cover rename variables of struct _adapter and change
In reply to Himadri PandyaThis patchset renames following three variables of struct _adapter to fix checkpatch warning: Avoid CamelCase
- bDriverStopped -> driver_stopped
- bSurpriseRemoved -> surprise_removed
- bSuspended -> suspended
v2:
- Change types of these variable to bool as they are used as boolean
- Change the patch subject lines accordingly
*** BLURB HERE ***
Himadri Pandya (3):
staging: rtl8712: rename bDriverStopped to driver_stopped and change
type to bool
staging: rtl8712: rename bSurpriseRemoved to surprise_removed and
change type to bool
staging: rtl8712: rename bSuspended to suspended and change type to
bool
drivers/staging/rtl8712/drv_types.h | 6 ++--- drivers/staging/rtl8712/os_intfs.c | 4 +-- drivers/staging/rtl8712/rtl8712_cmd.c | 6 ++--- drivers/staging/rtl8712/rtl8712_io.c | 4 +-- drivers/staging/rtl8712/rtl8712_led.c | 6 ++--- drivers/staging/rtl8712/rtl8712_recv.c | 16 ++++++------ drivers/staging/rtl8712/rtl871x_eeprom.c | 23 ++++++++-------- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 ++++++------ drivers/staging/rtl8712/rtl871x_mlme.c | 6 ++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 +-- drivers/staging/rtl8712/usb_intf.c | 12 ++++----- drivers/staging/rtl8712/usb_ops_linux.c | 26 +++++++++---------- 12 files changed, 64 insertions(+), 65 deletions(-)
Signature · 1 line
2.17.1
v2 cover fix checkpatch warning: Avoid CamelCase
In reply to Himadri PandyaThis patchset renames following three variables of struct _adapter to fix checkpatch warning: Avoid CamelCase
- bDriverStopped -> driver_stopped
- bSurpriseRemoved -> surprise_removed
- bSuspended -> suspended
v2:
- Change types of these variable to bool as they are used as boolean
*** BLURB HERE ***
Himadri Pandya (3):
staging: rtl8712: rename bDriverStopped to driver_stopped
staging: rtl8712: rename bSurpriseRemoved to surprise_removed
staging: rtl8712: rename bSuspended to suspended
drivers/staging/rtl8712/drv_types.h | 6 ++--- drivers/staging/rtl8712/os_intfs.c | 4 +-- drivers/staging/rtl8712/rtl8712_cmd.c | 6 ++--- drivers/staging/rtl8712/rtl8712_io.c | 4 +-- drivers/staging/rtl8712/rtl8712_led.c | 6 ++--- drivers/staging/rtl8712/rtl8712_recv.c | 16 ++++++------ drivers/staging/rtl8712/rtl871x_eeprom.c | 23 ++++++++-------- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 ++++++------ drivers/staging/rtl8712/rtl871x_mlme.c | 6 ++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 +-- drivers/staging/rtl8712/usb_intf.c | 12 ++++----- drivers/staging/rtl8712/usb_ops_linux.c | 26 +++++++++---------- 12 files changed, 64 insertions(+), 65 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/3 staging: rtl8712: rename bDriverStopped to driver_stopped
Fix checkpatch warning: Avoid CameCase for struct variable bDriverStopped by renaming it to driver_stopped.
---
Changes in V2:
- Change type to bool as the variable is being used as boolean.
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_io.c | 4 ++-- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 ++++++++-------- drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 2 +- drivers/staging/rtl8712/usb_ops_linux.c | 18 +++++++++--------- 11 files changed, 37 insertions(+), 37 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -145,7 +145,7 @@ struct _adapter {struct hal_priv halpriv;struct led_priv ledpriv;struct mp_priv mppriv; -s32 bDriverStopped; +bool driver_stopped;s32 bSurpriseRemoved;s32 bSuspended;u32 IsrContent;
drivers/staging/rtl8712/os_intfs.c +1 -1
@@ -374,7 +374,7 @@ static int netdev_open(struct net_device *pnetdev)mutex_lock (&padapter->mutex_start);if (!padapter->bup) { - padapter->bDriverStopped = false; + padapter->driver_stopped = false; padapter->bSurpriseRemoved = false; padapter->bup = true;if (rtl871x_hal_init (padapter) != _SUCCESS)
drivers/staging/rtl8712/rtl8712_cmd.c +2 -2
@@ -317,7 +317,7 @@ int r8712_cmd_thread(void *context)while (1 ) {if (wait_for_completion_interruptible (cmd_queue_comp))break ; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)break ;if (r8712_register_cmd_alive (padapter) != _SUCCESS)continue ;
@@ -368,7 +368,7 @@ int r8712_cmd_thread(void *context) pcmdbuf +=2 ;/* 8 bytes alignment */ memcpy ((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);while (check_cmd_fifo (padapter, wr_sz) == _FAIL) { -if (padapter->bDriverStopped || +if (padapter->driver_stopped || padapter->bSurpriseRemoved)break ;msleep (100 );
drivers/staging/rtl8712/rtl8712_io.c +2 -2
@@ -68,7 +68,7 @@ void r8712_read_mem(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; hdl->io_ops._read_mem (hdl, addr, cnt, pmem);
@@ -85,7 +85,7 @@ void r8712_read_port(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ; hdl->io_ops._read_port (hdl, addr, cnt, pmem);
drivers/staging/rtl8712/rtl8712_led.c +3 -3
@@ -109,7 +109,7 @@ static void SwLedOn(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {
@@ -137,7 +137,7 @@ static void SwLedOff(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {
@@ -816,7 +816,7 @@ static void BlinkTimerCallback(struct timer_list *t)/* This fixed the crash problem on Fedora 12 when trying to do the * insmod;ifconfig up;rmmod commands. */ -if (pLed->padapter->bSurpriseRemoved || pLed->padapter->bDriverStopped) +if (pLed->padapter->bSurpriseRemoved || pLed->padapter->driver_stopped)return ;schedule_work (&pLed->BlinkWorkItem); }
drivers/staging/rtl8712/rtl8712_recv.c +5 -5
@@ -541,7 +541,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter, (preorder_ctrl->indicate_seq +1 ) %4096 ;/*indicate this recv_frame*/ if (!pattrib->amsdu) { -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {/* indicate this recv_frame */ r8712_recv_indicatepkt(padapter,
@@ -576,7 +576,7 @@ static int recv_indicatepkt_reorder(struct _adapter *padapter,/* s1. */ r8712_wlanhdr_to_ethhdr (prframe);if (pattrib->qos !=1 ) { -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {r8712_recv_indicatepkt (padapter, prframe);return _SUCCESS;
@@ -626,7 +626,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext)struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ;spin_lock_irqsave (&ppending_recvframe_queue->lock, irql);r8712_recv_indicatepkts_in_order (padapter, preorder_ctrl, true);
@@ -643,7 +643,7 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter,if (phtpriv->ht_option ==1 ) {/*B/G/N Mode*/ if (recv_indicatepkt_reorder (padapter, prframe) != _SUCCESS) {/* including perform A-MPDU Rx Ordering Buffer Control*/ -if (!padapter->bDriverStopped && +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved)return _FAIL; }
@@ -651,7 +651,7 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter, retval =r8712_wlanhdr_to_ethhdr (prframe);if (retval != _SUCCESS)return retval; -if (!padapter->bDriverStopped && !padapter->bSurpriseRemoved) { +if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {/* indicate this recv_frame */ r8712_recv_indicatepkt (padapter, prframe); }else {
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +8 -8
@@ -1118,9 +1118,9 @@ static int r8711_wx_set_scan(struct net_device *dev,struct mlme_priv *pmlmepriv = &padapter->mlmepriv;u8 status = true; -if (padapter->bDriverStopped) { -netdev_info (dev,"In %s: bDriverStopped=%d\n" , - __func__, padapter->bDriverStopped); +if (padapter->driver_stopped) { +netdev_info (dev,"In %s: driver_stopped=%d\n" , + __func__, padapter->driver_stopped);return -1 ; }if (!padapter->bup)
@@ -1175,7 +1175,7 @@ static int r8711_wx_get_scan(struct net_device *dev,char *stop = ev + wrqu->data.length;u32 ret =0 , cnt =0 ; -if (padapter->bDriverStopped) +if (padapter->driver_stopped)return -EINVAL ;while (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) {
@@ -1938,7 +1938,7 @@ static int r871x_get_ap_info(struct net_device *dev,u8 bssid[ETH_ALEN ];char data[33 ]; -if (padapter->bDriverStopped || (pdata ==NULL )) +if (padapter->driver_stopped || (pdata ==NULL ))return -EINVAL ;while (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) {
@@ -2002,7 +2002,7 @@ static int r871x_set_pid(struct net_device *dev,struct _adapter *padapter =netdev_priv (dev);struct iw_point *pdata = &wrqu->data; -if ((padapter->bDriverStopped) || (pdata ==NULL )) +if ((padapter->driver_stopped) || (pdata ==NULL ))return -EINVAL ;if (copy_from_user (&padapter->pid, pdata->pointer,sizeof (int )))return -EINVAL ;
@@ -2018,7 +2018,7 @@ static int r871x_set_chplan(struct net_device *dev,struct iw_point *pdata = &wrqu->data;int ch_plan =-1 ; -if ((padapter->bDriverStopped) || (pdata ==NULL )) { +if ((padapter->driver_stopped) || (pdata ==NULL )) { ret = -EINVAL ; goto exit; }
@@ -2038,7 +2038,7 @@ static int r871x_wps_start(struct net_device *dev,struct iw_point *pdata = &wrqu->data;u32 u32wps_start =0 ; -if ((padapter->bDriverStopped) || (pdata ==NULL )) +if ((padapter->driver_stopped) || (pdata ==NULL ))return -EINVAL ;if (copy_from_user ((void *)&u32wps_start, pdata->pointer,4 ))return -EFAULT ;
drivers/staging/rtl8712/rtl871x_mlme.c +3 -3
@@ -174,7 +174,7 @@ sint r8712_if_up(struct _adapter *padapter) {sint res; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved || +if (padapter->driver_stopped || padapter->bSurpriseRemoved || !check_fwstate (&padapter->mlmepriv, _FW_LINKED)) { res = false; }else {
@@ -1055,7 +1055,7 @@ void _r8712_join_timeout_handler(struct _adapter *adapter)unsigned long irqL;struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ;spin_lock_irqsave (&pmlmepriv->lock, irqL);_clr_fwstate_ (pmlmepriv, _FW_UNDER_LINKING);
@@ -1084,7 +1084,7 @@ void r8712_scan_timeout_handler (struct _adapter *adapter)void _r8712_dhcp_timeout_handler (struct _adapter *adapter) { -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->bSurpriseRemoved)return ;if (adapter->pwrctrlpriv.pwr_mode != adapter->registrypriv.power_mgnt) r8712_set_ps_mode(adapter, adapter->registrypriv.power_mgnt,
drivers/staging/rtl8712/rtl871x_pwrctrl.c +2 -2
@@ -32,7 +32,7 @@ void r8712_set_rpwm(struct _adapter *padapter, u8 val8)if (pwrpriv->rpwm_retry ==0 )return ; } -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ; rpwm = val8 | pwrpriv->tog;switch (val8) {
@@ -117,7 +117,7 @@ static void _rpwm_check_handler (struct _adapter *padapter) {struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -if (padapter->bDriverStopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->bSurpriseRemoved)return ;if (pwrpriv->cpwm != pwrpriv->rpwm)schedule_work (&pwrpriv->rpwm_workitem);
drivers/staging/rtl8712/usb_intf.c +1 -1
@@ -289,7 +289,7 @@ void r871x_dev_unload(struct _adapter *padapter) {if (padapter->bup) {/*s1.*/ - padapter->bDriverStopped = true; + padapter->driver_stopped = true;/*s3.*/ rtl871x_intf_stop (padapter);
drivers/staging/rtl8712/usb_ops_linux.c +9 -9
@@ -147,7 +147,7 @@ static void usb_write_mem_complete(struct urb *purb)if (purb->status !=0 ) {if (purb->status == (-ESHUTDOWN )) - padapter->bDriverStopped = true; + padapter->driver_stopped = true;else padapter->bSurpriseRemoved = true; }
@@ -164,7 +164,7 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct urb *piorw_urb = pintfpriv->piorw_urb; -if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || (padapter->pwrctrlpriv.pnp_bstop_trx))return ;/* translate DMA FIFO addr to pipehandle */
@@ -186,7 +186,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)struct _adapter *padapter = (struct _adapter *)precvbuf->adapter;struct recv_priv *precvpriv = &padapter->recvpriv; -if (padapter->bSurpriseRemoved || padapter->bDriverStopped) +if (padapter->bSurpriseRemoved || padapter->driver_stopped)return ;if (purb->status ==0 ) {/* SUCCESS */ if ((purb->actual_length > (MAX_RECVBUF_SZ)) ||
@@ -218,11 +218,11 @@ static void r8712_usb_read_port_complete(struct urb *purb)case -EPIPE :case -ENODEV :case -ESHUTDOWN : - padapter->bDriverStopped = true; + padapter->driver_stopped = true;break ;case -ENOENT :if (!padapter->bSuspended) { - padapter->bDriverStopped = true; + padapter->driver_stopped = true;break ; }/* Fall through. */
@@ -254,7 +254,7 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)struct recv_priv *precvpriv = &adapter->recvpriv;struct usb_device *pusbd = pdvobj->pusbdev; -if (adapter->bDriverStopped || adapter->bSurpriseRemoved || +if (adapter->driver_stopped || adapter->bSurpriseRemoved || adapter->pwrctrlpriv.pnp_bstop_trx || !precvbuf)return _FAIL;r8712_init_recvbuf (adapter, precvbuf);
@@ -314,9 +314,9 @@ void r8712_xmit_bh(void *priv)struct _adapter *padapter = priv;struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -if (padapter->bDriverStopped || +if (padapter->driver_stopped || padapter->bSurpriseRemoved) { -netdev_err (padapter->pnetdev,"xmit_bh => bDriverStopped or bSurpriseRemoved\n" ); +netdev_err (padapter->pnetdev,"xmit_bh => driver_stopped or bSurpriseRemoved\n" );return ; } ret =r8712_xmitframe_complete (padapter, pxmitpriv,NULL );
@@ -390,7 +390,7 @@ u32 r8712_usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct pkt_attrib *pattrib = &pxmitframe->attrib; -if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || (padapter->pwrctrlpriv.pnp_bstop_trx))return _FAIL;for (i =0 ; i <8 ; i++) {
Signature · 1 line
2.17.1
PATCH v2 2/3 staging: rtl8712: rename bSurpriseRemoved to surprise_removed
In reply to Himadri PandyaFix checkpatch warning: Avoid Camelcase by renaming struct variable bSurpriseRemoved to surprise_removed.
---
Changes in V2:
- Change type to bool as the variable is used as a boolean.
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_io.c | 4 ++-- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++----- drivers/staging/rtl8712/rtl871x_eeprom.c | 23 +++++++++++------------ drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 6 +++--- drivers/staging/rtl8712/usb_ops_linux.c | 16 ++++++++-------- 11 files changed, 41 insertions(+), 42 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -146,7 +146,7 @@ struct _adapter {struct led_priv ledpriv;struct mp_priv mppriv;bool driver_stopped; -s32 bSurpriseRemoved; +bool surprise_removed;s32 bSuspended;u32 IsrContent;u32 ImrContent;
drivers/staging/rtl8712/os_intfs.c +1 -1
@@ -375,7 +375,7 @@ static int netdev_open(struct net_device *pnetdev)mutex_lock (&padapter->mutex_start);if (!padapter->bup) { padapter->driver_stopped = false; - padapter->bSurpriseRemoved = false; + padapter->surprise_removed = false; padapter->bup = true;if (rtl871x_hal_init (padapter) != _SUCCESS) goto netdev_open_error;
drivers/staging/rtl8712/rtl8712_cmd.c +2 -2
@@ -317,7 +317,7 @@ int r8712_cmd_thread(void *context)while (1 ) {if (wait_for_completion_interruptible (cmd_queue_comp))break ; -if (padapter->driver_stopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->surprise_removed)break ;if (r8712_register_cmd_alive (padapter) != _SUCCESS)continue ;
@@ -369,7 +369,7 @@ int r8712_cmd_thread(void *context)memcpy ((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);while (check_cmd_fifo (padapter, wr_sz) == _FAIL) {if (padapter->driver_stopped || - padapter->bSurpriseRemoved) + padapter->surprise_removed)break ;msleep (100 );continue ;
drivers/staging/rtl8712/rtl8712_io.c +2 -2
@@ -68,7 +68,7 @@ void r8712_read_mem(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->driver_stopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->surprise_removed)return ; hdl->io_ops._read_mem (hdl, addr, cnt, pmem);
@@ -85,7 +85,7 @@ void r8712_read_port(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem) {struct intf_hdl *hdl = &adapter->pio_queue->intf; -if (adapter->driver_stopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->surprise_removed)return ; hdl->io_ops._read_port (hdl, addr, cnt, pmem);
drivers/staging/rtl8712/rtl8712_led.c +3 -3
@@ -109,7 +109,7 @@ static void SwLedOn(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->driver_stopped) +if (padapter->surprise_removed || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {
@@ -137,7 +137,7 @@ static void SwLedOff(struct _adapter *padapter, struct LED_871x *pLed) {u8 LedCfg; -if (padapter->bSurpriseRemoved || padapter->driver_stopped) +if (padapter->surprise_removed || padapter->driver_stopped)return ; LedCfg =r8712_read8 (padapter,LEDCFG );switch (pLed->LedPin) {
@@ -816,7 +816,7 @@ static void BlinkTimerCallback(struct timer_list *t)/* This fixed the crash problem on Fedora 12 when trying to do the * insmod;ifconfig up;rmmod commands. */ -if (pLed->padapter->bSurpriseRemoved || pLed->padapter->driver_stopped) +if (pLed->padapter->surprise_removed || pLed->padapter->driver_stopped)return ;schedule_work (&pLed->BlinkWorkItem); }
drivers/staging/rtl8712/rtl8712_recv.c +5 -5
@@ -542,7 +542,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,/*indicate this recv_frame*/ if (!pattrib->amsdu) {if (!padapter->driver_stopped && - !padapter->bSurpriseRemoved) { + !padapter->surprise_removed) {/* indicate this recv_frame */ r8712_recv_indicatepkt (padapter, prframe);
@@ -577,7 +577,7 @@ static int recv_indicatepkt_reorder(struct _adapter *padapter,r8712_wlanhdr_to_ethhdr (prframe);if (pattrib->qos !=1 ) {if (!padapter->driver_stopped && - !padapter->bSurpriseRemoved) { + !padapter->surprise_removed) {r8712_recv_indicatepkt (padapter, prframe);return _SUCCESS; }else {
@@ -626,7 +626,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext)struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -if (padapter->driver_stopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->surprise_removed)return ;spin_lock_irqsave (&ppending_recvframe_queue->lock, irql);r8712_recv_indicatepkts_in_order (padapter, preorder_ctrl, true);
@@ -644,14 +644,14 @@ static int r8712_process_recv_indicatepkts(struct _adapter *padapter,if (recv_indicatepkt_reorder (padapter, prframe) != _SUCCESS) {/* including perform A-MPDU Rx Ordering Buffer Control*/ if (!padapter->driver_stopped && - !padapter->bSurpriseRemoved) + !padapter->surprise_removed)return _FAIL; } }else {/*B/G mode*/ retval =r8712_wlanhdr_to_ethhdr (prframe);if (retval != _SUCCESS)return retval; -if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) { +if (!padapter->driver_stopped && !padapter->surprise_removed) {/* indicate this recv_frame */ r8712_recv_indicatepkt (padapter, prframe); }else {
drivers/staging/rtl8712/rtl871x_eeprom.c +11 -12
@@ -37,7 +37,7 @@ static void shift_out_bits(struct _adapter *padapter, u16 data, u16 count) {u16 x, mask; -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; mask =0x01 << (count -1 ); x =r8712_read8 (padapter,EE_9346CR );
@@ -46,7 +46,7 @@ static void shift_out_bits(struct _adapter *padapter, u16 data, u16 count) x &= ~_EEDI;if (data & mask) x |= _EEDI; -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out;r8712_write8 (padapter,EE_9346CR , (u8 )x);udelay (CLOCK_RATE );
@@ -54,7 +54,7 @@ static void shift_out_bits(struct _adapter *padapter, u16 data, u16 count)down_clk (padapter, &x); mask >>=1 ; }while (mask); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; x &= ~_EEDI;r8712_write8 (padapter,EE_9346CR , (u8 )x);
@@ -65,7 +65,7 @@ static u16 shift_in_bits(struct _adapter *padapter) {u16 x, d =0 , i; -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; x =r8712_read8 (padapter,EE_9346CR ); x &= ~(_EEDO | _EEDI);
@@ -73,7 +73,7 @@ static u16 shift_in_bits(struct _adapter *padapter)for (i =0 ; i <16 ; i++) { d <<=1 ;up_clk (padapter, &x); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; x =r8712_read8 (padapter,EE_9346CR ); x &= ~(_EEDI);
@@ -117,17 +117,17 @@ static void eeprom_clean(struct _adapter *padapter) {u16 x; -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ; x =r8712_read8 (padapter,EE_9346CR ); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ; x &= ~(_EECS | _EEDI);r8712_write8 (padapter,EE_9346CR , (u8 )x); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ;up_clk (padapter, &x); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ;down_clk (padapter, &x); }
@@ -194,11 +194,11 @@ u16 r8712_eeprom_read16(struct _adapter *padapter, u16 reg) /*ReadEEprom*/ tmp8_clk_new = tmp8_clk_ori |0x20 ;if (tmp8_clk_new != tmp8_clk_ori)r8712_write8 (padapter,0x10250003 , tmp8_clk_new); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out;/* select EEPROM, reset bits, set _EECS */ x =r8712_read8 (padapter,EE_9346CR ); -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed) goto out; x &= ~(_EEDI | _EEDO | _EESK | _EEM0); x |= _EEM1 | _EECS;
@@ -218,4 +218,3 @@ u16 r8712_eeprom_read16(struct _adapter *padapter, u16 reg) /*ReadEEprom*/r8712_write8 (padapter,0x102502f1 , tmp8_ori);return data; } -
drivers/staging/rtl8712/rtl871x_mlme.c +3 -3
@@ -174,7 +174,7 @@ sint r8712_if_up(struct _adapter *padapter) {sint res; -if (padapter->driver_stopped || padapter->bSurpriseRemoved || +if (padapter->driver_stopped || padapter->surprise_removed || !check_fwstate (&padapter->mlmepriv, _FW_LINKED)) { res = false; }else {
@@ -1055,7 +1055,7 @@ void _r8712_join_timeout_handler(struct _adapter *adapter)unsigned long irqL;struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -if (adapter->driver_stopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->surprise_removed)return ;spin_lock_irqsave (&pmlmepriv->lock, irqL);_clr_fwstate_ (pmlmepriv, _FW_UNDER_LINKING);
@@ -1084,7 +1084,7 @@ void r8712_scan_timeout_handler (struct _adapter *adapter)void _r8712_dhcp_timeout_handler (struct _adapter *adapter) { -if (adapter->driver_stopped || adapter->bSurpriseRemoved) +if (adapter->driver_stopped || adapter->surprise_removed)return ;if (adapter->pwrctrlpriv.pwr_mode != adapter->registrypriv.power_mgnt) r8712_set_ps_mode(adapter, adapter->registrypriv.power_mgnt,
drivers/staging/rtl8712/rtl871x_pwrctrl.c +2 -2
@@ -32,7 +32,7 @@ void r8712_set_rpwm(struct _adapter *padapter, u8 val8)if (pwrpriv->rpwm_retry ==0 )return ; } -if (padapter->driver_stopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->surprise_removed)return ; rpwm = val8 | pwrpriv->tog;switch (val8) {
@@ -117,7 +117,7 @@ static void _rpwm_check_handler (struct _adapter *padapter) {struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -if (padapter->driver_stopped || padapter->bSurpriseRemoved) +if (padapter->driver_stopped || padapter->surprise_removed)return ;if (pwrpriv->cpwm != pwrpriv->rpwm)schedule_work (&pwrpriv->rpwm_workitem);
drivers/staging/rtl8712/usb_intf.c +3 -3
@@ -271,7 +271,7 @@ static void r8712_usb_dvobj_deinit(struct _adapter *padapter)void rtl871x_intf_stop (struct _adapter *padapter) {/*disable_hw_interrupt*/ -if (!padapter->bSurpriseRemoved) { +if (!padapter->surprise_removed) {/*device still exists, so driver can do i/o operation * TODO: */
@@ -298,7 +298,7 @@ void r871x_dev_unload(struct _adapter *padapter)r8712_stop_drv_threads (padapter);/*s5.*/ -if (!padapter->bSurpriseRemoved) { +if (!padapter->surprise_removed) { padapter->hw_init_completed = false;rtl8712_hal_deinit (padapter); }
@@ -600,7 +600,7 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)/* never exit with a firmware callback pending */ wait_for_completion (&padapter->rtl8712_fw_ready);if (drvpriv.drv_registered) - padapter->bSurpriseRemoved = true; + padapter->surprise_removed = true;unregister_netdev (pnetdev);/* will call netdev_close() */ flush_scheduled_work ();udelay (1 );
drivers/staging/rtl8712/usb_ops_linux.c +8 -8
@@ -149,7 +149,7 @@ static void usb_write_mem_complete(struct urb *purb)if (purb->status == (-ESHUTDOWN )) padapter->driver_stopped = true;else - padapter->bSurpriseRemoved = true; + padapter->surprise_removed = true; }complete (&pintfpriv->io_retevt_comp); }
@@ -164,7 +164,7 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct urb *piorw_urb = pintfpriv->piorw_urb; -if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->surprise_removed) || (padapter->pwrctrlpriv.pnp_bstop_trx))return ;/* translate DMA FIFO addr to pipehandle */
@@ -186,7 +186,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)struct _adapter *padapter = (struct _adapter *)precvbuf->adapter;struct recv_priv *precvpriv = &padapter->recvpriv; -if (padapter->bSurpriseRemoved || padapter->driver_stopped) +if (padapter->surprise_removed || padapter->driver_stopped)return ;if (purb->status ==0 ) {/* SUCCESS */ if ((purb->actual_length > (MAX_RECVBUF_SZ)) ||
@@ -254,7 +254,7 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)struct recv_priv *precvpriv = &adapter->recvpriv;struct usb_device *pusbd = pdvobj->pusbdev; -if (adapter->driver_stopped || adapter->bSurpriseRemoved || +if (adapter->driver_stopped || adapter->surprise_removed || adapter->pwrctrlpriv.pnp_bstop_trx || !precvbuf)return _FAIL;r8712_init_recvbuf (adapter, precvbuf);
@@ -315,8 +315,8 @@ void r8712_xmit_bh(void *priv)struct xmit_priv *pxmitpriv = &padapter->xmitpriv;if (padapter->driver_stopped || - padapter->bSurpriseRemoved) { -netdev_err (padapter->pnetdev,"xmit_bh => driver_stopped or bSurpriseRemoved\n" ); + padapter->surprise_removed) { +netdev_err (padapter->pnetdev,"xmit_bh => driver_stopped or surprise_removed\n" );return ; } ret =r8712_xmitframe_complete (padapter, pxmitpriv,NULL );
@@ -360,7 +360,7 @@ static void usb_write_port_complete(struct urb *purb)break ; } } -if (padapter->bSurpriseRemoved) +if (padapter->surprise_removed)return ;switch (purb->status) {case 0 :
@@ -390,7 +390,7 @@ u32 r8712_usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)struct usb_device *pusbd = pdvobj->pusbdev;struct pkt_attrib *pattrib = &pxmitframe->attrib; -if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) || +if ((padapter->driver_stopped) || (padapter->surprise_removed) || (padapter->pwrctrlpriv.pnp_bstop_trx))return _FAIL;for (i =0 ; i <8 ; i++) {
Signature · 1 line
2.17.1
PATCH v2 3/3 staging: rtl8712: rename bSuspended to suspended
In reply to Himadri PandyaFix checkpatch warning: Avoid CamelCase by renaming struct variable bSuspended to suspended.
---
Changes in V2:
- Change type to bool as the varibale is used as a boolean.
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/usb_intf.c | 4 ++-- drivers/staging/rtl8712/usb_ops_linux.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -147,7 +147,7 @@ struct _adapter {struct mp_priv mppriv;bool driver_stopped;bool surprise_removed; -s32 bSuspended; +bool suspended;u32 IsrContent;u32 ImrContent;u8 EepromAddressSize;
drivers/staging/rtl8712/usb_intf.c +2 -2
@@ -196,7 +196,7 @@ static int r871x_suspend(struct usb_interface *pusb_intf, pm_message_t state)struct _adapter *padapter =netdev_priv (pnetdev);netdev_info (pnetdev,"Suspending...\n" ); - padapter->bSuspended = true; + padapter->suspended = true;rtl871x_intf_stop (padapter);if (pnetdev->netdev_ops->ndo_stop) pnetdev->netdev_ops->ndo_stop (pnetdev);
@@ -220,7 +220,7 @@ static int r871x_resume(struct usb_interface *pusb_intf)netif_device_attach (pnetdev);if (pnetdev->netdev_ops->ndo_open) pnetdev->netdev_ops->ndo_open (pnetdev); - padapter->bSuspended = false; + padapter->suspended = false;rtl871x_intf_resume (padapter);return 0 ; }
drivers/staging/rtl8712/usb_ops_linux.c +1 -1
@@ -221,7 +221,7 @@ static void r8712_usb_read_port_complete(struct urb *purb) padapter->driver_stopped = true;break ;case -ENOENT : -if (!padapter->bSuspended) { +if (!padapter->suspended) { padapter->driver_stopped = true;break ; }
Signature · 1 line
2.17.1
Re: [Outreachy kernel] [PATCH v2 3/3] staging: rtl8712: rename bSuspended to suspended
Quoted 7 lines · Himadri Pandya
Fix checkpatch warning: Avoid CamelCase by renaming struct variable bSuspended to suspended.
Signed-off-by Himadri Pandya <[email protected]>---
Changes in V2:
- Change type to bool as the varibale is used as a boolean.
The change of type should be mentioned above the ---. That is something that people could be interested in seeing in the future. Below the ---, you can make the point that you have added this change as compared to the initial version. That is not interesting in the future, because no one will have seen the initial version.
julia
Quoted 64 lines
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/usb_intf.c | 4 ++-- drivers/staging/rtl8712/usb_ops_linux.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/staging/rtl8712/drv_types.h +1
-1@@ -147,7 +147,7 @@ struct _adapter {struct mp_priv mppriv;bool driver_stopped;bool surprise_removed; -s32 bSuspended; +bool suspended;u32 IsrContent;u32 ImrContent;u8 EepromAddressSize;drivers/staging/rtl8712/usb_intf.c +2
-2@@ -196,7 +196,7 @@ static int r871x_suspend(struct usb_interface *pusb_intf, pm_message_t state)struct _adapter *padapter =netdev_priv (pnetdev);netdev_info (pnetdev,"Suspending...\n" ); - padapter->bSuspended = true; + padapter->suspended = true;rtl871x_intf_stop (padapter);if (pnetdev->netdev_ops->ndo_stop) pnetdev->netdev_ops->ndo_stop (pnetdev);@@ -220,7 +220,7 @@ static int r871x_resume(struct usb_interface *pusb_intf)netif_device_attach (pnetdev);if (pnetdev->netdev_ops->ndo_open) pnetdev->netdev_ops->ndo_open (pnetdev); - padapter->bSuspended = false; + padapter->suspended = false;rtl871x_intf_resume (padapter);return 0 ; }drivers/staging/rtl8712/usb_ops_linux.c +1
-2@@ -221,7 +221,7 @@ static void r8712_usb_read_port_complete(struct urb *purb) padapter->driver_stopped = true;break ;case -ENOENT : -if (!padapter->bSuspended) { +if (!padapter->suspended) { padapter->driver_stopped = true;break ; } --2.17.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190301104842.75482-4-himadri18.07%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH v2 0/3] fix checkpatch warning: Avoid CamelCase
In reply to Himadri PandyaQuoted 10 lines · Himadri Pandya
This patchset renames following three variables of struct
_adapterto fix checkpatch warning: Avoid CamelCase
- bDriverStopped ->driver_stopped
- bSurpriseRemoved ->surprise_removed
- bSuspended -> suspendedv2:
- Change types of these variable to bool as they are used as boolean*** BLURB HERE ***
You could remove the *** BLURB HERE *** :)
julia
Quoted 30 lines
Himadri Pandya (3):
staging: rtl8712: rename bDriverStopped todriver_stopped
staging: rtl8712: rename bSurpriseRemoved tosurprise_removed
staging: rtl8712: rename bSuspended to suspendeddrivers/staging/rtl8712/drv_types.h | 6 ++--- drivers/staging/rtl8712/os_intfs.c | 4 +-- drivers/staging/rtl8712/rtl8712_cmd.c | 6 ++--- drivers/staging/rtl8712/rtl8712_io.c | 4 +-- drivers/staging/rtl8712/rtl8712_led.c | 6 ++--- drivers/staging/rtl8712/rtl8712_recv.c | 16 ++++++------ drivers/staging/rtl8712/rtl871x_eeprom.c | 23 ++++++++-------- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 ++++++------ drivers/staging/rtl8712/rtl871x_mlme.c | 6 ++--- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 4 +-- drivers/staging/rtl8712/usb_intf.c | 12 ++++----- drivers/staging/rtl8712/usb_ops_linux.c | 26 +++++++++---------- 12 files changed, 64 insertions(+), 65 deletions(-)--
2.17.1--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190301104842.75482-1-himadri18.07%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
v2 cover fix checkpatch warning: Avoid CamelCase
In reply to Himadri PandyaThis patchset renames following three variables of struct _adapter to fix checkpatch warning: Avoid CamelCase
- bDriverStopped -> driver_stopped
- bSurpriseRemoved -> surprise_removed
- bSuspended -> suspended
v2:
- Change types of these variable to bool as they are used as boolean
Himadri Pandya (3):
arch: powerpc/kexec: Add missing of_node-put() in
default_machine_kexec_prepare()
arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe()
arch: powerpc: add missing of_node_put for device_node "cc"
arch/powerpc/kernel/machine_kexec_64.c | 4 +++- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 3 ++- arch/powerpc/platforms/powermac/smp.c | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.1