staging: rtl8712: fix coding style issues
cover staging: rtl8712: fix coding style issues
Fix issues found with checkpatch.pl for rtl8712 driver.
Arushi Singhal (4):
staging: rtl8712: Remove multiple blank line(s)
staging: rtl8712: Added spaces around '+'.
staging: rtl8712: Add spaces around '|'
staging: rtl8712: remove unnecessary parentheses
drivers/staging/rtl8712/os_intfs.c | 1 - drivers/staging/rtl8712/recv_linux.c | 4 +- drivers/staging/rtl8712/rtl8712_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_cmd.c | 8 +-- drivers/staging/rtl8712/rtl8712_cmd.h | 4 +- drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h | 2 +- drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h | 2 - drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h | 2 - drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h | 2 - drivers/staging/rtl8712/rtl8712_gp_bitdef.h | 2 +- drivers/staging/rtl8712/rtl8712_gp_regdef.h | 1 - drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_led.c | 70 +++++++++++----------- 15 files changed, 45 insertions(+), 57 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 1/4 staging: rtl8712: Remove multiple blank line(s)
From: Arushi Singhal <[email protected]>
Remove extra blank line(s) that were causing checkpatch issues.
--- drivers/staging/rtl8712/os_intfs.c | 1 - drivers/staging/rtl8712/rtl8712_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_gp_regdef.h | 1 - drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h | 1 - 9 files changed, 12 deletions(-)
drivers/staging/rtl8712/os_intfs.c +0 -1
@@ -347,7 +347,6 @@ u8 r8712_free_drv_sw(struct _adapter *padapter)return _SUCCESS; } -static void enable_video_mode (struct _adapter *padapter,int cbw40_value) {/* bit 8:
drivers/staging/rtl8712/rtl8712_bitdef.h +0 -1
@@ -18,7 +18,6 @@* ******************************************************************************/ -#ifndef __RTL8712_BITDEF_H__#define __RTL8712_BITDEF_H__
drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h +0 -2
@@ -20,7 +20,6 @@#ifndef __RTL8712_CMDCTRL_REGDEF_H__#define __RTL8712_CMDCTRL_REGDEF_H__ -#define CR (RTL8712_CMDCTRL_ + 0x0000)#define TXPAUSE (RTL8712_CMDCTRL_ + 0x0002)#define TCR (RTL8712_CMDCTRL_ + 0x0004)
@@ -29,6 +28,5 @@#define SYSF_CFG (RTL8712_CMDCTRL_ + 0x000D)#define MBIDCTRL (RTL8712_CMDCTRL_ + 0x000E) -#endif /* __RTL8712_CMDCTRL_REGDEF_H__ */
drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h +0 -1
@@ -51,5 +51,4 @@/*FDLOCKFLAG1*/ #define _LOCKFLAG1_MSK 0x03 -#endif /* __RTL8712_DEBUGCTRL_BITDEF_H__ */
drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h +0 -2
@@ -41,7 +41,5 @@#define TRXPKTBUF_DBG_CTRL (RTL8712_DEBUGCTRL_ + 0x38)#define DPLL_MON (RTL8712_DEBUGCTRL_ + 0x3A) - -#endif /* __RTL8712_DEBUGCTRL_REGDEF_H__ */
drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h +0 -1
@@ -140,6 +140,5 @@/*TXFF_PG_NUM*/ #define _TXFF_PG_NUM_MSK 0x0FFF -#endif /* __RTL8712_FIFOCTRL_BITDEF_H__ */
drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h +0 -2
@@ -71,6 +71,4 @@#define TXQ_PGADD (RTL8712_FIFOCTRL_ + 0xB3)#define TXFF_PG_NUM (RTL8712_FIFOCTRL_ + 0xB4) - -#endif /* __RTL8712_FIFOCTRL_REGDEF_H__ */
drivers/staging/rtl8712/rtl8712_gp_regdef.h +0 -1
@@ -37,6 +37,5 @@#define PHY_REG_RPT (RTL8712_GP_ + 0x13)#define PHY_REG_DATA (RTL8712_GP_ + 0x14) -#endif /*__RTL8712_GP_REGDEF_H__ */
drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h +0 -1
@@ -53,6 +53,5 @@#define _VODOK BIT(1)#define _RXOK BIT(0) -#endif /*__RTL8712_INTERRUPT_BITDEF_H__*/
Signature · 6 lines
2.7.4 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [Outreachy kernel] [PATCH 1/4] staging: rtl8712: Remove multiple blank line(s)
Quoted 6 lines · Arushi Singhal
From: Arushi Singhal <[email protected]>
Remove extra blank line(s) that were causing checkpatch issues.
Signed-off-by Arushi Singhal <[email protected]>
Your From and Signed-off emails are still different (maybe check your git config) Regarding the commit message, you should write why you removed the extra lines say "to adhere to Linux coding style", not because they were checkpatch errors. Give credit to the tool.
The change looks fine to me.
Quoted 145 lines
--- drivers/staging/rtl8712/os_intfs.c | 1 - drivers/staging/rtl8712/rtl8712_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_gp_regdef.h | 1 - drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h | 1 - 9 files changed, 12 deletions(-)drivers/staging/rtl8712/os_intfs.c +0
-1@@ -347,7 +347,6 @@ u8 r8712_free_drv_sw(struct _adapter *padapter)return _SUCCESS; } -static void enable_video_mode (struct _adapter *padapter,int cbw40_value) {/* bit 8: drivers/staging/rtl8712/rtl8712_bitdef.h +0
-1@@ -18,7 +18,6 @@* ************************************************************ ******************/ -#ifndef __RTL8712_BITDEF_H__#define __RTL8712_BITDEF_H__drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h +0
-2@@ -20,7 +20,6 @@#ifndef __RTL8712_CMDCTRL_REGDEF_H__#define __RTL8712_CMDCTRL_REGDEF_H__ -#define CR (RTL8712_CMDCTRL_ + 0x0000)#define TXPAUSE (RTL8712_CMDCTRL_ + 0x0002)#define TCR (RTL8712_CMDCTRL_ + 0x0004)@@ -29,6 +28,5 @@#define SYSF_CFG (RTL8712_CMDCTRL_ + 0x000D)#define MBIDCTRL (RTL8712_CMDCTRL_ + 0x000E) -#endif /* __RTL8712_CMDCTRL_REGDEF_H__ */ drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h +0
-1@@ -51,5 +51,4 @@/*FDLOCKFLAG1*/ #define _LOCKFLAG1_MSK 0x03 -#endif /* __RTL8712_DEBUGCTRL_BITDEF_H__ */ drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h +0
-2@@ -41,7 +41,5 @@#define TRXPKTBUF_DBG_CTRL (RTL8712_DEBUGCTRL_ + 0x38)#define DPLL_MON (RTL8712_DEBUGCTRL_ + 0x3A) - -#endif /* __RTL8712_DEBUGCTRL_REGDEF_H__ */ drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h +0
-1@@ -140,6 +140,5 @@/*TXFF_PG_NUM*/ #define _TXFF_PG_NUM_MSK 0x0FFF -#endif /* __RTL8712_FIFOCTRL_BITDEF_H__ */ drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h +0
-2@@ -71,6 +71,4 @@#define TXQ_PGADD (RTL8712_FIFOCTRL_ + 0xB3)#define TXFF_PG_NUM (RTL8712_FIFOCTRL_ + 0xB4) - -#endif /* __RTL8712_FIFOCTRL_REGDEF_H__ */ drivers/staging/rtl8712/rtl8712_gp_regdef.h +0
-1@@ -37,6 +37,5 @@#define PHY_REG_RPT (RTL8712_GP_ + 0x13)#define PHY_REG_DATA (RTL8712_GP_ + 0x14) -#endif /*__RTL8712_GP_REGDEF_H__ */ drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h +0
-2@@ -53,6 +53,5 @@#define _VODOK BIT(1)#define _RXOK BIT(0) -#endif /*__RTL8712_INTERRUPT_BITDEF_H__*/ --2.7.4
--
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/ms
gid/outreachy-kernel/1520026941-16548-2-git-send-email- arushisinghal19971997%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Signature · 1 line
Shraddha
Re: [Outreachy kernel] [PATCH 1/4] staging: rtl8712: Remove multiple blank line(s)
Quoted 10 lines · Shraddha Barke
Quoted 4 lines · Arushi Singhal
From: Arushi Singhal <[email protected]>
Remove extra blank line(s) that were causing checkpatch issues.
Quoted 9 lines
Quoted 2 lines
Signed-off-by Arushi Singhal <[email protected]>Your From and Signed-off emails are still different (maybe check your git config) Regarding the commit message, you should write why you removed the extra lines say "to adhere to Linux coding style", not because they were checkpatch errors. Give credit to the tool.
The change looks fine to me.
Hi Shraddha
Yes, I mentioned in my previous mail to ignore this series. I made changes to my git config but the problem occurred may be because for some commits, I tried to change the signed off manually.
I'll take care of the suggestions in next version.
Best
Arushi
Quoted 153 lines
Quoted 147 lines
--- drivers/staging/rtl8712/os_intfs.c | 1 - drivers/staging/rtl8712/rtl8712_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h | 2 -- drivers/staging/rtl8712/rtl8712_gp_regdef.h | 1 - drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h | 1 - 9 files changed, 12 deletions(-)drivers/staging/rtl8712/os_intfs.c +0
-1@@ -347,7 +347,6 @@ u8 r8712_free_drv_sw(struct _adapter *padapter)return _SUCCESS; } -static void enable_video_mode (struct _adapter *padapter,int cbw40_value) {/* bit 8: drivers/staging/rtl8712/rtl8712_bitdef.h +0
-1@@ -18,7 +18,6 @@* ******************************************************************************/ -#ifndef __RTL8712_BITDEF_H__#define __RTL8712_BITDEF_H__drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h +0
-2@@ -20,7 +20,6 @@#ifndef __RTL8712_CMDCTRL_REGDEF_H__#define __RTL8712_CMDCTRL_REGDEF_H__ -#define CR (RTL8712_CMDCTRL_ + 0x0000)#define TXPAUSE (RTL8712_CMDCTRL_ + 0x0002)#define TCR (RTL8712_CMDCTRL_ + 0x0004)@@ -29,6 +28,5 @@#define SYSF_CFG (RTL8712_CMDCTRL_ + 0x000D)#define MBIDCTRL (RTL8712_CMDCTRL_ + 0x000E) -#endif /* __RTL8712_CMDCTRL_REGDEF_H__ */ drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h +0
-1@@ -51,5 +51,4 @@/*FDLOCKFLAG1*/ #define _LOCKFLAG1_MSK 0x03 -#endif /* __RTL8712_DEBUGCTRL_BITDEF_H__ */ drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h +0
-2@@ -41,7 +41,5 @@#define TRXPKTBUF_DBG_CTRL (RTL8712_DEBUGCTRL_ + 0x38)#define DPLL_MON (RTL8712_DEBUGCTRL_ + 0x3A) - -#endif /* __RTL8712_DEBUGCTRL_REGDEF_H__ */ drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h +0
-1@@ -140,6 +140,5 @@/*TXFF_PG_NUM*/ #define _TXFF_PG_NUM_MSK 0x0FFF -#endif /* __RTL8712_FIFOCTRL_BITDEF_H__ */ drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h +0
-2@@ -71,6 +71,4 @@#define TXQ_PGADD (RTL8712_FIFOCTRL_ + 0xB3)#define TXFF_PG_NUM (RTL8712_FIFOCTRL_ + 0xB4) - -#endif /* __RTL8712_FIFOCTRL_REGDEF_H__ */ drivers/staging/rtl8712/rtl8712_gp_regdef.h +0
-1@@ -37,6 +37,5 @@#define PHY_REG_RPT (RTL8712_GP_ + 0x13)#define PHY_REG_DATA (RTL8712_GP_ + 0x14) -#endif /*__RTL8712_GP_REGDEF_H__ */ drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h +0
-2@@ -53,6 +53,5 @@#define _VODOK BIT(1)#define _RXOK BIT(0) -#endif /*__RTL8712_INTERRUPT_BITDEF_H__*/ --2.7.4
--
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/1520026941-16548-2-git-send-email-arushisinghal19971997%40gmail.com
.
For more options, visit https://groups.google.com/d/optout.Signature · 1 line
Shraddha
PATCH 2/4 staging: rtl8712: Added spaces around '+'.
In reply to Arushi SinghalFrom: Arushi Singhal <[email protected]>
Add spaces around arithmetic operator '+', to fix the checkpatch issue.
--- drivers/staging/rtl8712/rtl8712_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl8712_cmd.h +2 -2
@@ -145,8 +145,8 @@ enum rtl8712_h2c_cmd {#define _SetBBReg_CMD_ _Write_BBREG_CMD_#define _GetRFReg_CMD_ _Read_RFREG_CMD_#define _SetRFReg_CMD_ _Write_RFREG_CMD_ -#define _DRV_INT_CMD_ (MAX_H2CCMD+1) -#define _SetRFIntFs_CMD_ (MAX_H2CCMD+2) +#define _DRV_INT_CMD_ (MAX_H2CCMD + 1) +#define _SetRFIntFs_CMD_ (MAX_H2CCMD + 2)#ifdef _RTL8712_CMD_C_ static struct _cmd_callback cmd_callback[] = {
Signature · 6 lines
2.7.4 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 3/4 staging: rtl8712: Add spaces around '|'
In reply to Arushi SinghalFrom: Arushi Singhal <[email protected]>
Add spaces around '|' to fix the checkpatch issue.
CHECK: spaces preferred around that '|'.
--- drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h | 2 +- drivers/staging/rtl8712/rtl8712_gp_bitdef.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h +1 -1
@@ -63,7 +63,7 @@#define _IMEM_CHK_RPT BIT(1)#define _IMEM_CODE_DONE BIT(0) -#define _TXDMA_INIT_VALUE (_IMEM_CHK_RPT|_EMEM_CHK_RPT) +#define _TXDMA_INIT_VALUE (_IMEM_CHK_RPT | _EMEM_CHK_RPT)/*RCR*/ #define _ENMBID BIT(27)
drivers/staging/rtl8712/rtl8712_gp_bitdef.h +1 -1
@@ -70,7 +70,7 @@#define GPIOSEL_PHYDBG 1/* PHYDBG*/ #define GPIOSEL_BT 2/* BT_coex*/ #define GPIOSEL_WLANDBG 3/* WLANDBG*/ -#define GPIOSEL_GPIO_MASK (~(BIT(0)|BIT(1))) +#define GPIOSEL_GPIO_MASK (~(BIT(0) | BIT(1)))/* HW Radio OFF switch (GPIO BIT) */ #define HAL_8192S_HW_GPIO_OFF_BIT BIT(3)#define HAL_8192S_HW_GPIO_OFF_MASK 0xF7
Signature · 6 lines
2.7.4 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 4/4 staging: rtl8712: remove unnecessary parentheses
In reply to Arushi SinghalRemove unnecessary parentheses around variables to conform to the Linux kernel coding style. Issue found using checkpatch.
--- drivers/staging/rtl8712/recv_linux.c | 4 +- drivers/staging/rtl8712/rtl8712_cmd.c | 8 ++-- drivers/staging/rtl8712/rtl8712_led.c | 70 +++++++++++++++++------------------ 3 files changed, 41 insertions(+), 41 deletions(-)
drivers/staging/rtl8712/recv_linux.c +2 -2
@@ -111,8 +111,8 @@ void r8712_recv_indicatepkt(struct _adapter *padapter,_pkt *skb;struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; - precvpriv = &(padapter->recvpriv); - pfree_recv_queue = &(precvpriv->free_recv_queue); + precvpriv = &padapter->recvpriv; + pfree_recv_queue = &precvpriv->free_recv_queue; skb = precv_frame->u.hdr.pkt;if (!skb) goto _recv_indicatepkt_drop;
drivers/staging/rtl8712/rtl8712_cmd.c +4 -4
@@ -320,7 +320,7 @@ int r8712_cmd_thread(void *context)struct tx_desc *pdesc;void (*pcmd_callback)(struct _adapter *dev,struct cmd_obj *pcmd);struct _adapter *padapter = context; -struct cmd_priv *pcmdpriv = &(padapter->cmdpriv); +struct cmd_priv *pcmdpriv = &padapter->cmdpriv;struct completion *cmd_queue_comp = &pcmdpriv->cmd_queue_comp;struct mutex *pwctrl_lock = &padapter->pwrctrlpriv.mutex_lock;
@@ -334,7 +334,7 @@ int r8712_cmd_thread(void *context)if (r8712_register_cmd_alive (padapter) != _SUCCESS)continue ; _next: - pcmd =r8712_dequeue_cmd (&(pcmdpriv->cmd_queue)); + pcmd =r8712_dequeue_cmd (&pcmdpriv->cmd_queue);if (!(pcmd)) {r8712_unregister_cmd_alive (padapter);continue ;
@@ -419,7 +419,7 @@ int r8712_cmd_thread(void *context) }/* free all cmd_obj resources */ do { - pcmd = r8712_dequeue_cmd(&(pcmdpriv->cmd_queue)); + pcmd = r8712_dequeue_cmd(&pcmdpriv->cmd_queue); if (!pcmd) break; r8712_free_cmd_obj(pcmd);
@@ -433,7 +433,7 @@ void r8712_event_handle(struct _adapter *padapter, __le32 *peventbuf)u8 evt_code, evt_seq;u16 evt_sz;void (*event_callback)(struct _adapter *dev,u8 *pbuf); -struct evt_priv *pevt_priv = &(padapter->evtpriv); +struct evt_priv *pevt_priv = &padapter->evtpriv;if (!peventbuf) goto _abort_event_;
drivers/staging/rtl8712/rtl8712_led.c +35 -35
175 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Quoted 3 lines · Arushi Singhal
Fix issues found with checkpatch.pl for rtl8712 driver.
Please Ignore this patch series
Thanks
Quoted 29 lines
Arushi Singhal (4):
staging: rtl8712: Remove multiple blank line(s)
staging: rtl8712: Added spaces around '+'.
staging: rtl8712: Add spaces around '|'
staging: rtl8712: remove unnecessary parenthesesdrivers/staging/rtl8712/os_intfs.c | 1 - drivers/staging/rtl8712/recv_linux.c | 4 +- drivers/staging/rtl8712/rtl8712_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_cmd.c | 8 +-- drivers/staging/rtl8712/rtl8712_cmd.h | 4 +- drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h | 2 +- drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h | 2 - drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h | 2 - drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h | 2 - drivers/staging/rtl8712/rtl8712_gp_bitdef.h | 2 +- drivers/staging/rtl8712/rtl8712_gp_regdef.h | 1 - drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h | 1 - drivers/staging/rtl8712/rtl8712_led.c | 70 +++++++++++----------- 15 files changed, 45 insertions(+), 57 deletions(-)Signature · 1 line
2.7.4