staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
cover staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
This patchset fixes CamelCase checks in struct _adapter in drv_types.h and in files where struct _adapter is used by renaming the variables without camel case.
These check were reported by checkpatch.pl
Deepak Mishra (8):
staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
drivers/staging/rtl8712/drv_types.h | 18 +++++++++--------- drivers/staging/rtl8712/os_intfs.c | 6 +++--- drivers/staging/rtl8712/rtl871x_cmd.c | 2 +- drivers/staging/rtl8712/rtl871x_eeprom.c | 6 +++--- drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 2 +- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 2 +- drivers/staging/rtl8712/rtl871x_xmit.c | 2 +- drivers/staging/rtl8712/usb_intf.c | 2 +- drivers/staging/rtl8712/xmit_linux.c | 6 +++--- 9 files changed, 23 insertions(+), 23 deletions(-)
Signature · 1 line
2.19.1
PATCH 1/8 staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
This patch fixes CamelCase ImrContent from struct _adapter and in related files drv_types.h, rtl871x_mp_ioctl.c, rtl871x_pwrctrl.h
CHECK: Avoid CamelCase: <ImrContent>
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 2 +- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -149,7 +149,7 @@ struct _adapter {bool surprise_removed;bool suspended;u32 IsrContent; -u32 ImrContent; +u32 imr_content;u8 EepromAddressSize;u8 hw_init_completed;struct task_struct *cmdThread;
drivers/staging/rtl8712/rtl871x_mp_ioctl.c +1 -1
@@ -665,7 +665,7 @@ uint oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)if ((status ==RNDIS_STATUS_SUCCESS ) && (RegRWStruct->offset ==HIMR ) && (RegRWStruct->width ==4 )) - Adapter->ImrContent = RegRWStruct->value; + Adapter->imr_content = RegRWStruct->value; }return status; }
drivers/staging/rtl8712/rtl871x_pwrctrl.h +1 -1
@@ -88,7 +88,7 @@ struct pwrctrl_priv {uint pwr_mode;uint smart_ps;uint alives; -uint ImrContent;/* used to store original imr. */ +uint imr_content;/* used to store original imr. */ uint bSleep;/* sleep -> active is different from active -> sleep. */ struct work_struct SetPSModeWorkItem;
Signature · 1 line
2.19.1
PATCH 2/8 staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
In reply to Deepak MishraThis patch fixes CamelCase ImrContent from struct _adapter and in related files drv_types.h, rtl871x_eeprom.c, usb_intf.c
CHECK: Avoid CamelCase: <EepromAddressSize>
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/rtl871x_eeprom.c | 6 +++--- drivers/staging/rtl8712/usb_intf.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -150,7 +150,7 @@ struct _adapter {bool suspended;u32 IsrContent;u32 imr_content; -u8 EepromAddressSize; +u8 eeprom_address_size;u8 hw_init_completed;struct task_struct *cmdThread;pid_t evtThread;
drivers/staging/rtl8712/rtl871x_eeprom.c +3 -3
@@ -150,7 +150,7 @@ void r8712_eeprom_write16(struct _adapter *padapter, u16 reg, u16 data) x |= _EEM1 | _EECS;r8712_write8 (padapter,EE_9346CR , x);shift_out_bits (padapter,EEPROM_EWEN_OPCODE ,5 ); -if (padapter->EepromAddressSize ==8 )/*CF+ and SDIO*/ +if (padapter->eeprom_address_size ==8 )/*CF+ and SDIO*/ shift_out_bits (padapter,0 ,6 );else /* USB */ shift_out_bits (padapter,0 ,4 );
@@ -165,7 +165,7 @@ void r8712_eeprom_write16(struct _adapter *padapter, u16 reg, u16 data)*/ shift_out_bits (padapter,EEPROM_WRITE_OPCODE ,3 );/* select which word in the EEPROM that we are writing to. */ -shift_out_bits (padapter, reg, padapter->EepromAddressSize); +shift_out_bits (padapter, reg, padapter->eeprom_address_size);/* write the data to the selected EEPROM word. */ shift_out_bits (padapter, data,16 );if (wait_eeprom_cmd_done (padapter)) {
@@ -207,7 +207,7 @@ u16 r8712_eeprom_read16(struct _adapter *padapter, u16 reg) /*ReadEEprom*/* The opcode is 3bits in length, reg is 6 bits long */ shift_out_bits (padapter,EEPROM_READ_OPCODE ,3 ); -shift_out_bits (padapter, reg, padapter->EepromAddressSize); +shift_out_bits (padapter, reg, padapter->eeprom_address_size);/* Now read the data (16 bits) in from the selected EEPROM word */ data =shift_in_bits (padapter);eeprom_clean (padapter);
drivers/staging/rtl8712/usb_intf.c +1 -1
@@ -246,7 +246,7 @@ static uint r8712_usb_dvobj_init(struct _adapter *padapter)struct usb_device *pusbd = pdvobjpriv->pusbdev; pdvobjpriv->padapter = padapter; - padapter->EepromAddressSize =6 ; + padapter->eeprom_address_size =6 ; phost_iface = &pintf->altsetting[0 ]; piface_desc = &phost_iface->desc; pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints;
Signature · 1 line
2.19.1
PATCH 3/8 staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
In reply to Deepak MishraThis patch fixes CamelCase cmdThread from struct _adapter and in related files drv_types.h,os_intfs.c
CHECK: Avoid CamelCase: <cmdThread>
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/os_intfs.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -152,7 +152,7 @@ struct _adapter {u32 imr_content;u8 eeprom_address_size;u8 hw_init_completed; -struct task_struct *cmdThread; +struct task_struct *cmd_thread;pid_t evtThread;struct task_struct *xmitThread;pid_t recvThread;
drivers/staging/rtl8712/os_intfs.c +3 -3
@@ -221,9 +221,9 @@ struct net_device *r8712_init_netdev(void)static u32 start_drv_threads (struct _adapter *padapter) { - padapter->cmdThread =kthread_run (r8712_cmd_thread, padapter,"%s" , + padapter->cmd_thread =kthread_run (r8712_cmd_thread, padapter,"%s" , padapter->pnetdev->name); -if (IS_ERR (padapter->cmdThread)) +if (IS_ERR (padapter->cmd_thread))return _FAIL;return _SUCCESS; }
@@ -235,7 +235,7 @@ void r8712_stop_drv_threads(struct _adapter *padapter)/*Below is to terminate r8712_cmd_thread & event_thread...*/ complete (&padapter->cmdpriv.cmd_queue_comp); -if (padapter->cmdThread) +if (padapter->cmd_thread)wait_for_completion_interruptible (completion); padapter->cmdpriv.cmd_seq =1 ; }
Signature · 1 line
2.19.1
PATCH 4/8 staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
In reply to Deepak MishraThis patch fixes CamelCase evtThread in struct _adapter as reported by checkpatch.pl
CHECK: Avoid CamelCase: <evtThread>
--- drivers/staging/rtl8712/drv_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -153,7 +153,7 @@ struct _adapter {u8 eeprom_address_size;u8 hw_init_completed;struct task_struct *cmd_thread; -pid_t evtThread; +pid_t evt_thread;struct task_struct *xmitThread;pid_t recvThread;uint (*dvobj_init)(struct _adapter *adapter);
Signature · 1 line
2.19.1
PATCH 5/8 staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
In reply to Deepak MishraThis patch fixes CamelCase IsrContent to isr_content as suggested by checkpatch.pl
--- drivers/staging/rtl8712/drv_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -148,7 +148,7 @@ struct _adapter {bool driver_stopped;bool surprise_removed;bool suspended; -u32 IsrContent; +u32 isr_content;u32 imr_content;u8 eeprom_address_size;u8 hw_init_completed;
Signature · 1 line
2.19.1
PATCH 6/8 staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
In reply to Deepak MishraThis patch fixes CamelCase as reported by checkpatch.pl xmitThread renamed to xmit_thread
recvThread renamed to recv_thread
--- drivers/staging/rtl8712/drv_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/drv_types.h +2 -2
@@ -154,8 +154,8 @@ struct _adapter {u8 hw_init_completed;struct task_struct *cmd_thread;pid_t evt_thread; -struct task_struct *xmitThread; -pid_t recvThread; +struct task_struct *xmit_thread; +pid_t recv_thread;uint (*dvobj_init)(struct _adapter *adapter);void (*dvobj_deinit)(struct _adapter *adapter);struct net_device *pnetdev;
Signature · 1 line
2.19.1
PATCH 7/8 staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
In reply to Deepak MishraThis patch renames CamelCase variable wkFilterRxFF0 to wk_filter_rx_ff0 in drv_types.h and related files rtl871x_xmit.c and xmit_linux.c as reported by checkpatch.pl
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/rtl871x_xmit.c | 2 +- drivers/staging/rtl8712/xmit_linux.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -163,7 +163,7 @@ struct _adapter {struct net_device_stats stats;struct iw_statistics iwstats;int pid;/*process id from UI*/ -struct work_struct wkFilterRxFF0; +struct work_struct wk_filter_rx_ff0;u8 blnEnableRxFF0Filter;spinlock_t lockRxFF0Filter;const struct firmware *fw;
drivers/staging/rtl8712/rtl871x_xmit.c +1 -1
@@ -139,7 +139,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv, pxmitbuf++; } pxmitpriv->free_xmitbuf_cnt =NR_XMITBUFF ; -INIT_WORK (&padapter->wkFilterRxFF0, r8712_SetFilter); +INIT_WORK (&padapter->wk_filter_rx_ff0, r8712_SetFilter);alloc_hwxmits (padapter);init_hwxmits (pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry); tasklet_init(&pxmitpriv->xmit_tasklet,
drivers/staging/rtl8712/xmit_linux.c +1 -1
@@ -94,7 +94,7 @@ void r8712_set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)void r8712_SetFilter (struct work_struct *work) { struct _adapter *padapter = container_of(work, struct _adapter, - wkFilterRxFF0); + wk_filter_rx_ff0);u8 oldvalue =0x00 , newvalue =0x00 ;unsigned long irqL;
Signature · 1 line
2.19.1
PATCH 8/8 staging: rtl8712: Fixed CamelCase in struct _adapter from drv_types.h
In reply to Deepak MishraThis patch fixes CamelCase blnEnableRxFF0Filter by renaming it to bln_enable_rx_ff0_filter in drv_types.h and related files rtl871x_cmd.c xmit_linux.c
It was reported by checkpatch.pl
--- drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 2 +- drivers/staging/rtl8712/xmit_linux.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/drv_types.h +1 -1
@@ -164,7 +164,7 @@ struct _adapter {struct iw_statistics iwstats;int pid;/*process id from UI*/ struct work_struct wk_filter_rx_ff0; -u8 blnEnableRxFF0Filter; +u8 bln_enable_rx_ff0_filter;spinlock_t lockRxFF0Filter;const struct firmware *fw;struct usb_interface *pusb_intf;
drivers/staging/rtl8712/rtl871x_cmd.c +1 -1
@@ -238,7 +238,7 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,mod_timer (&pmlmepriv->scan_to_timer, jiffies +msecs_to_jiffies (SCANNING_TIMEOUT )); padapter->ledpriv.LedControlHandler (padapter,LED_CTL_SITE_SURVEY ); - padapter->blnEnableRxFF0Filter =0 ; + padapter->bln_enable_rx_ff0_filter =0 ;return _SUCCESS; }
drivers/staging/rtl8712/xmit_linux.c +2 -2
@@ -103,11 +103,11 @@ void r8712_SetFilter(struct work_struct *work)r8712_write8 (padapter,0x117 , newvalue);spin_lock_irqsave (&padapter->lockRxFF0Filter, irqL); - padapter->blnEnableRxFF0Filter =1 ; + padapter->bln_enable_rx_ff0_filter =1 ;spin_unlock_irqrestore (&padapter->lockRxFF0Filter, irqL);do {msleep (100 ); - }while (padapter->blnEnableRxFF0Filter ==1 ); + }while (padapter->bln_enable_rx_ff0_filter ==1 );r8712_write8 (padapter,0x117 , oldvalue); }
Signature · 1 line
2.19.1
Quoted 3 lines · Deepak Mishra
This patch fixes CamelCase blnEnableRxFF0Filter by renaming it to
bln_enable_rx_ff0_filterindrv_types.hand related filesrtl871x_cmd.cxmit_linux.c
One could also improve this by removing the hungarian like bln_ prefix and simplify the name of the boolean variable.
drivers/staging/rtl8712/drv_types.h
Quoted 1 line
drivers/staging/rtl8712/drv_types.h +0
-0
[]
drivers/staging/rtl8712/drv_types.h struct _adapter { · line 167
Quoted 6 lines
drivers/staging/rtl8712/drv_types.h +1
-1@@ -164,7 +164,7 @@ struct _adapter {struct iw_statistics iwstats;int pid;/*process id from UI*/ struct work_struct wk_filter_rx_ff0; -u8 blnEnableRxFF0Filter; +u8 bln_enable_rx_ff0_filter;
e.g.:
bool enable_rx_ff0_filter;
drivers/staging/rtl8712/rtl871x_cmd.c
Quoted 1 line
drivers/staging/rtl8712/rtl871x_cmd.c +0
-0
[]
drivers/staging/rtl8712/rtl871x_cmd.c u8 r8712_sitesurvey_cmd(struct _adapter *padapter, · line 241
Quoted 6 lines
drivers/staging/rtl8712/rtl871x_cmd.c +1
-1@@ -238,7 +238,7 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,mod_timer (&pmlmepriv->scan_to_timer, jiffies +msecs_to_jiffies (SCANNING_TIMEOUT )); padapter->ledpriv.LedControlHandler (padapter,LED_CTL_SITE_SURVEY ); - padapter->blnEnableRxFF0Filter =0 ; + padapter->bln_enable_rx_ff0_filter =0 ;
padapter->enable_rx_ff0_filter = false;
drivers/staging/rtl8712/xmit_linux.c
Quoted 1 line
drivers/staging/rtl8712/xmit_linux.c +0
-0
[]
drivers/staging/rtl8712/xmit_linux.c void r8712_SetFilter(struct work_struct *work) · line 106
Quoted 6 lines
drivers/staging/rtl8712/xmit_linux.c +1
-1@@ -103,11 +103,11 @@ void r8712_SetFilter(struct work_struct *work)r8712_write8 (padapter,0x117 , newvalue);spin_lock_irqsave (&padapter->lockRxFF0Filter, irqL); - padapter->blnEnableRxFF0Filter =1 ; + padapter->bln_enable_rx_ff0_filter =1 ;
padapter->enable_rx_ff0_filter = true;
etc...
Then you could rename padapter to adapter, and maybe "struct _adapter" to something more sensible like "struct rtl8712dev" etc...
And one day, hopefully sooner than later, realtek will improve their driver software base and help eliminate all the duplicated non-style defects across the family of drivers for their hardware...
Quoted 9 lines · Joe Perches
Quoted 3 lines · Deepak Mishra
This patch fixes CamelCase blnEnableRxFF0Filter by renaming it to
bln_enable_rx_ff0_filterindrv_types.hand related filesrtl871x_cmd.cxmit_linux.cOne could also improve this by removing the hungarian like
bln_prefix and simplify the name of the boolean variable.
Thank you for your suggestion and I am modifying accordingly and sending a V2 patch.
Quoted 35 lines
drivers/staging/rtl8712/drv_types.h
Quoted 1 line
drivers/staging/rtl8712/drv_types.h +0
-0[]
drivers/staging/rtl8712/drv_types.h struct _adapter { · line 167
Quoted 6 lines
drivers/staging/rtl8712/drv_types.h +1
-1@@ -164,7 +164,7 @@ struct _adapter {struct iw_statistics iwstats;int pid;/*process id from UI*/ struct work_struct wk_filter_rx_ff0; -u8 blnEnableRxFF0Filter; +u8 bln_enable_rx_ff0_filter;e.g.:
bool enable_rx_ff0_filter;drivers/staging/rtl8712/rtl871x_cmd.c
Quoted 1 line
drivers/staging/rtl8712/rtl871x_cmd.c +0
-0[]
drivers/staging/rtl8712/rtl871x_cmd.c u8 r8712_sitesurvey_cmd(struct _adapter *padapter, · line 241
Quoted 6 lines
drivers/staging/rtl8712/rtl871x_cmd.c +1
-1@@ -238,7 +238,7 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,mod_timer (&pmlmepriv->scan_to_timer, jiffies +msecs_to_jiffies (SCANNING_TIMEOUT )); padapter->ledpriv.LedControlHandler (padapter,LED_CTL_SITE_SURVEY ); - padapter->blnEnableRxFF0Filter =0 ; + padapter->bln_enable_rx_ff0_filter =0 ;padapter->enable_rx_ff0_filter = false;drivers/staging/rtl8712/xmit_linux.c
Quoted 1 line
drivers/staging/rtl8712/xmit_linux.c +0
-0[]
drivers/staging/rtl8712/xmit_linux.c void r8712_SetFilter(struct work_struct *work) · line 106
Quoted 6 lines
drivers/staging/rtl8712/xmit_linux.c +1
-1@@ -103,11 +103,11 @@ void r8712_SetFilter(struct work_struct *work)r8712_write8 (padapter,0x117 , newvalue);spin_lock_irqsave (&padapter->lockRxFF0Filter, irqL); - padapter->blnEnableRxFF0Filter =1 ; + padapter->bln_enable_rx_ff0_filter =1 ;padapter->enable_rx_ff0_filter = true;
Quoted 6 lines
etc...
Then you could rename padapter to adapter, and maybe "struct
_adapter" to something more sensible like "struct rtl8712dev" etc...
Thanks for suggestion again. I am going to take it in a diferent patchset and submit that.
Quoted 5 lines
And one day, hopefully sooner than later, realtek will improve their driver software base and help eliminate all the duplicated non-style defects across the family of drivers for their hardware...
Best regards
Deepak Mishra
Greg KH
maintainerQuoted 6 lines · Deepak Mishra
This patchset fixes CamelCase checks in struct
_adapterindrv_types.hand in files where struct_adapteris used by renaming the variables without camel case.These check were reported by checkpatch.pl
Quoted 9 lines
Deepak Mishra (8):
staging: rtl8712: Fixed CamelCase in struct_adapterfromdrv_types.h
staging: rtl8712: Fixed CamelCase in struct_adapterfromdrv_types.h
staging: rtl8712: Fixed CamelCase in struct_adapterfromdrv_types.h
staging: rtl8712: Fixed CamelCase in struct_adapterfromdrv_types.h
staging: rtl8712: Fixed CamelCase in struct_adapterfromdrv_types.h
staging: rtl8712: Fixed CamelCase in struct_adapterfromdrv_types.h
staging: rtl8712: Fixed CamelCase in struct_adapterfromdrv_types.h
staging: rtl8712: Fixed CamelCase in struct_adapterfromdrv_types.h
All of these patches had the same subject line, yet did diffferent things, that's not ok :(
Please fix this series up to have unique subject lines and resend.
thanks,
greg k-h