remove unnecessary braces and else block
v2 cover remove unnecessary braces and else block
This patch series fixed coding style warnings reported by checkpatch.pl in drivers/staging/rtl8723bs/hal/odm_CfoTracking.c.
Changes in v2:
- Split the previous patch into two separate logical changes.
Sanghyeon Lee (2):
staging: rtl8723bs: remove unnecessary braces
staging: rtl8723bs: remove unnecessary else block
drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
Signature · 1 line
2.43.0
PATCH v2 1/2 staging: rtl8723bs: remove unnecessary braces
This patch fixes coding style issues reported by checkpatch.pl in odm_CfoTracking.c
The change include:
1. Removing unnecessary braces {} from single-line conditional statements.
The change verify clean with checkpatch.pl.
thanks,
Sanghyeon Lee
--- drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/staging/rtl8723bs/hal/odm_CfoTracking.c +5 -7
@@ -100,9 +100,8 @@ void ODM_CfoTracking(void *pDM_VOID)u8 Adjust_Xtal =1 ;/* 4 Support ability */ -if (!(pDM_Odm->SupportAbility &ODM_BB_CFO_TRACKING )) { +if (!(pDM_Odm->SupportAbility &ODM_BB_CFO_TRACKING ))return ; - }if (!pDM_Odm->bLinked || !pDM_Odm->bOneEntryOnly) {/* 4 No link or more than one entry */
@@ -110,9 +109,9 @@ void ODM_CfoTracking(void *pDM_VOID) }else {/* 3 1. CFO Tracking */ /* 4 1.1 No new packet */ -if (pCfoTrack->packetCount == pCfoTrack->packetCount_pre) { +if (pCfoTrack->packetCount == pCfoTrack->packetCount_pre)return ; - } + pCfoTrack->packetCount_pre = pCfoTrack->packetCount;/* 4 1.2 Calculate CFO */
@@ -176,11 +175,10 @@ void ODM_CfoTracking(void *pDM_VOID) }/* 3 2. Dynamic ATC switch */ -if (CFO_ave <CFO_TH_ATC && CFO_ave > -CFO_TH_ATC ) { +if (CFO_ave <CFO_TH_ATC && CFO_ave > -CFO_TH_ATC )odm_SetATCStatus (pDM_Odm, false); - }else { +else odm_SetATCStatus (pDM_Odm, true); - } } }
Signature · 1 line
2.43.0
Greg KH
maintainerRe: [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces
Quoted 6 lines · Sanghyeon Lee
This patch fixes coding style issues reported by checkpatch.pl in
odm_CfoTracking.cThe change include:
1. Removing unnecessary braces {} from single-line conditional statements.
No need to list a single item, right?
Look at existing commits for examples of how to write a changelog.
Quoted 2 lines
The change verify clean with checkpatch.pl.
That should be implied, no need to say it.
Quoted 4 lines
thanks,
Sanghyeon Lee
No need for those lines, right?
thanks,
greg k-h
PATCH v2 2/2 staging: rtl8723bs: remove unnecessary else block
In reply to Sanghyeon LeeThis patch fix coding style issue reported by checkpatch.pl in odm_CfoTracking.c
The change include:
1. Removing an unnecessary else statement after a return, which reduces indentation and simplifies the code flow.
The change verify clean with checkpatch.pl.
thanks,
Sanghyeon Lee
--- drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/hal/odm_CfoTracking.c +3 -2
@@ -132,8 +132,9 @@ void ODM_CfoTracking(void *pDM_VOID) ) { pCfoTrack->largeCFOHit =1 ;return ; - } else - pCfoTrack->largeCFOHit = 0; + } + + pCfoTrack->largeCFOHit =0 ; pCfoTrack->CFO_ave_pre = CFO_ave;/* 4 1.4 Dynamic Xtal threshold */
Signature · 1 line
2.43.0