staging: vt6655: Remove multiple assignments.
PATCH 1/1 staging: vt6655: Remove multiple assignments.
Removes multiple assignments at initialization and in computations to better match Linux style. Issue found by checkpatch.pl.
--- drivers/staging/vt6655/rxtx.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-)
drivers/staging/vt6655/rxtx.c +20 -14
@@ -195,21 +195,29 @@ s_uGetRTSCTSRsvTime(unsigned short wCurrentRate ) { -unsigned int uRrvTime, uRTSTime, uCTSTime, uAckTime, uDataTime; - - uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime =0 ; +unsigned int uRrvTime =0 ; +unsigned int uRTSTime =0 ; +unsigned int uCTSTime =0 ; +unsigned int uAckTime =0 ; +unsigned int uDataTime =0 ; uDataTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, cbFrameLength, wCurrentRate);if (byRTSRsvType ==0 ) {/* RTSTxRrvTime_bb */ - uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopCCKBasicRate); - uCTSTime = uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); + uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +20 , pDevice->byTopCCKBasicRate); + uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +14 , pDevice->byTopCCKBasicRate); + uCTSTime = uAckTime; }else if (byRTSRsvType ==1 ) {/* RTSTxRrvTime_ba, only in 2.4GHZ */ uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopCCKBasicRate); uCTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate); }else if (byRTSRsvType ==2 ) {/* RTSTxRrvTime_aa */ - uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopOFDMBasicRate); - uCTSTime = uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate); + uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +20 , pDevice->byTopOFDMBasicRate); + uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +14 , pDevice->byTopOFDMBasicRate); + uCTSTime = uAckTime; }else if (byRTSRsvType ==3 ) {/* CTSTxRrvTime_ba, only in 2.4GHZ */ uCTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate);
@@ -1040,16 +1048,14 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,bool bRTS = (bool )(fifo_ctl &FIFOCTL_RTS );struct vnt_tx_desc *ptdCurr;unsigned int cbHeaderLength =0 ; -void *pvRrvTime; -struct vnt_mic_hdr *pMICHDR; -void *pvRTS; -void *pvCTS; -void *pvTxDataHd; +void *pvRrvTime =NULL ; +struct vnt_mic_hdr *pMICHDR =NULL ; +void *pvRTS =NULL ; +void *pvCTS =NULL ; +void *pvTxDataHd =NULL ;unsigned short wTxBufSize;/* FFinfo size */ unsigned char byFBOption =AUTO_FB_NONE ; - pvRrvTime = pMICHDR = pvRTS = pvCTS = pvTxDataHd =NULL ; - cbFrameSize = skb->len +4 ;if (info->control.hw_key) {
Signature · 1 line
2.24.1
Quoted 2 lines · Briana Oursler
Removes multiple assignments at initialization and in computations to better match Linux style. Issue found by checkpatch.pl.
Change "Removes" to "Remove".
thanks,
-lakshmi
PATCH v2 1/1 staging: vt6655: Remove multiple assignments.
Remove multiple assignments at initialization and in computations to better match Linux style. Issue found by checkpatch.pl.
---
Changes in v2:
- Change removes to remove in patch description.
drivers/staging/vt6655/rxtx.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-)
drivers/staging/vt6655/rxtx.c +20 -14
@@ -195,21 +195,29 @@ s_uGetRTSCTSRsvTime(unsigned short wCurrentRate ) { -unsigned int uRrvTime, uRTSTime, uCTSTime, uAckTime, uDataTime; - - uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime =0 ; +unsigned int uRrvTime =0 ; +unsigned int uRTSTime =0 ; +unsigned int uCTSTime =0 ; +unsigned int uAckTime =0 ; +unsigned int uDataTime =0 ; uDataTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, cbFrameLength, wCurrentRate);if (byRTSRsvType ==0 ) {/* RTSTxRrvTime_bb */ - uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopCCKBasicRate); - uCTSTime = uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); + uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +20 , pDevice->byTopCCKBasicRate); + uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +14 , pDevice->byTopCCKBasicRate); + uCTSTime = uAckTime; }else if (byRTSRsvType ==1 ) {/* RTSTxRrvTime_ba, only in 2.4GHZ */ uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopCCKBasicRate); uCTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate); }else if (byRTSRsvType ==2 ) {/* RTSTxRrvTime_aa */ - uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopOFDMBasicRate); - uCTSTime = uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate); + uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +20 , pDevice->byTopOFDMBasicRate); + uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +14 , pDevice->byTopOFDMBasicRate); + uCTSTime = uAckTime; }else if (byRTSRsvType ==3 ) {/* CTSTxRrvTime_ba, only in 2.4GHZ */ uCTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate);
@@ -1040,16 +1048,14 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,bool bRTS = (bool )(fifo_ctl &FIFOCTL_RTS );struct vnt_tx_desc *ptdCurr;unsigned int cbHeaderLength =0 ; -void *pvRrvTime; -struct vnt_mic_hdr *pMICHDR; -void *pvRTS; -void *pvCTS; -void *pvTxDataHd; +void *pvRrvTime =NULL ; +struct vnt_mic_hdr *pMICHDR =NULL ; +void *pvRTS =NULL ; +void *pvCTS =NULL ; +void *pvTxDataHd =NULL ;unsigned short wTxBufSize;/* FFinfo size */ unsigned char byFBOption =AUTO_FB_NONE ; - pvRrvTime = pMICHDR = pvRTS = pvCTS = pvTxDataHd =NULL ; - cbFrameSize = skb->len +4 ;if (info->control.hw_key) {
Signature · 1 line
2.24.1
Greg KH
maintainerQuoted 25 lines · Briana Oursler
Remove multiple assignments at initialization and in computations to better match Linux style. Issue found by checkpatch.pl.
Signed-off-by Briana Oursler <[email protected]>---
Changes in v2:
- Change removes to remove in patch description.drivers/staging/vt6655/rxtx.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-)drivers/staging/vt6655/rxtx.c +2
-3@@ -195,21 +195,29 @@ s_uGetRTSCTSRsvTime(unsigned short wCurrentRate ) { -unsigned int uRrvTime, uRTSTime, uCTSTime, uAckTime, uDataTime; - - uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime =0 ; +unsigned int uRrvTime =0 ; +unsigned int uRTSTime =0 ;
drivers/staging/vt6655/rxtx.c s_uGetRTSCTSRsvTime( · line 207
Quoted 10 lines
drivers/staging/vt6655/rxtx.c +5
-2+unsigned int uCTSTime =0 ; +unsigned int uAckTime =0 ; +unsigned int uDataTime =0 ; uDataTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, cbFrameLength, wCurrentRate);if (byRTSRsvType ==0 ) {/* RTSTxRrvTime_bb */ - uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopCCKBasicRate); - uCTSTime = uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); + uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +20 , pDevice->byTopCCKBasicRate);
While I understand the compulsion to want to fix up coding style issues all over the place, don't mix changes like this with changes like:
drivers/staging/vt6655/rxtx.c s_uGetRTSCTSRsvTime( · line 210
Quoted 3 lines
drivers/staging/vt6655/rxtx.c +3
-0+ uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +14 , pDevice->byTopCCKBasicRate); + uCTSTime = uAckTime;
That, as it makes it much harder to review when you do multiple different things in the same patch.
And you didn't document that you did the reformatting here...
thanks,
greg k-h
PATCH v3 1/1 staging: vt6655: Remove multiple assignments.
Remove multiple assignments at initialization and in computations to better match Linux style. Issue found by checkpatch.pl.
---
Changes in v3:
- Undo formatting changes to better focus scope of commit.
Changes in v2:
- Change removes to remove in patch description.
drivers/staging/vt6655/rxtx.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
drivers/staging/vt6655/rxtx.c +14 -12
@@ -195,21 +195,25 @@ s_uGetRTSCTSRsvTime(unsigned short wCurrentRate ) { -unsigned int uRrvTime, uRTSTime, uCTSTime, uAckTime, uDataTime; - - uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime =0 ; +unsigned int uRrvTime =0 ; +unsigned int uRTSTime =0 ; +unsigned int uCTSTime =0 ; +unsigned int uAckTime =0 ; +unsigned int uDataTime =0 ; uDataTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, cbFrameLength, wCurrentRate);if (byRTSRsvType ==0 ) {/* RTSTxRrvTime_bb */ uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopCCKBasicRate); - uCTSTime = uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); + uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); + uCTSTime = uAckTime; }else if (byRTSRsvType ==1 ) {/* RTSTxRrvTime_ba, only in 2.4GHZ */ uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopCCKBasicRate); uCTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate); }else if (byRTSRsvType ==2 ) {/* RTSTxRrvTime_aa */ uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,20 , pDevice->byTopOFDMBasicRate); - uCTSTime = uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate); + uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate); + uCTSTime = uAckTime; }else if (byRTSRsvType ==3 ) {/* CTSTxRrvTime_ba, only in 2.4GHZ */ uCTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopCCKBasicRate); uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType,14 , pDevice->byTopOFDMBasicRate);
@@ -1040,16 +1044,14 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,bool bRTS = (bool )(fifo_ctl &FIFOCTL_RTS );struct vnt_tx_desc *ptdCurr;unsigned int cbHeaderLength =0 ; -void *pvRrvTime; -struct vnt_mic_hdr *pMICHDR; -void *pvRTS; -void *pvCTS; -void *pvTxDataHd; +void *pvRrvTime =NULL ; +struct vnt_mic_hdr *pMICHDR =NULL ; +void *pvRTS =NULL ; +void *pvCTS =NULL ; +void *pvTxDataHd =NULL ;unsigned short wTxBufSize;/* FFinfo size */ unsigned char byFBOption =AUTO_FB_NONE ; - pvRrvTime = pMICHDR = pvRTS = pvCTS = pvTxDataHd =NULL ; - cbFrameSize = skb->len +4 ;if (info->control.hw_key) {
Signature · 1 line
2.24.1
Quoted 4 lines · On Fri, 27 Mar 2020 12:27:00 -0700 Briana Oursler <[email protected]>…
Remove multiple assignments at initialization and in computations to better match Linux style. Issue found by checkpatch.pl.
Signed-off-by Briana Oursler <[email protected]>
Signature · 1 line
Stefano
Quoted 49 lines · Greg KH
Quoted 33 lines · Briana Oursler
Remove multiple assignments at initialization and in computations to
better match Linux style. Issue found by checkpatch.pl.Signed-off-by Briana Oursler <[email protected]>---
Changes in v2:
- Change removes to remove in patch description.drivers/staging/vt6655/rxtx.c | 34 ++++++++++++++++++++----------- --- 1 file changed, 20 insertions(+), 14 deletions(-)drivers/staging/vt6655/rxtx.c +5
-3@@ -195,21 +195,29 @@ s_uGetRTSCTSRsvTime(unsigned short wCurrentRate ) { -unsigned int uRrvTime, uRTSTime, uCTSTime, uAckTime, uDataTime; - - uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime =0 ; +unsigned int uRrvTime =0 ; +unsigned int uRTSTime =0 ; +unsigned int uCTSTime =0 ; +unsigned int uAckTime =0 ; +unsigned int uDataTime =0 ; uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType,drivers/staging/vt6655/rxtx.c s_uGetRTSCTSRsvTime( · line 212
Quoted 10 lines
drivers/staging/vt6655/rxtx.c +2
-2cbFrameLength, wCurrentRate);if (byRTSRsvType ==0 ) {/* RTSTxRrvTime_bb */ - uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, 20, pDevice->byTopCCKBasicRate); - uCTSTime = uAckTime =BBuGetFrameTime (pDevice- >byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); + uRTSTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +20 , pDevice- >byTopCCKBasicRate);While I understand the compulsion to want to fix up coding style issues
all over the place, don't mix changes like this with changes like:
Quoted 8 lines
drivers/staging/vt6655/rxtx.c s_uGetRTSCTSRsvTime( · line 217
Quoted 5 lines
drivers/staging/vt6655/rxtx.c +3
-0+ uAckTime =BBuGetFrameTime (pDevice->byPreambleType, byPktType, +14 , pDevice- >byTopCCKBasicRate); + uCTSTime = uAckTime;That, as it makes it much harder to review when you do multiple different things in the same patch.
Thanks, I sent another version where I undid reformatting to try to make the log more readable. I'm trying to be more disciplined in the commits so that they are not so messy to read.
Quoted 1 line
And you didn't document that you did the reformatting here...
Thank you,
Briana
Quoted 3 lines
thanks,
greg k-h