[PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces

Sanghyeon Lee posted 2 patches 1 month, 3 weeks ago
[PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces
Posted by Sanghyeon Lee 1 month, 3 weeks ago
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

Signed-off-by: Sanghyeon Lee <sanghae778@gmail.com>
---
 drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
index 666a9f44012d..0b70509f553b 100644
--- a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
+++ b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
@@ -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);
-		}
 	}
 }
 
-- 
2.43.0
Re: [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces
Posted by Greg KH 1 month, 3 weeks ago
On Wed, Dec 17, 2025 at 02:24:43PM +0000, Sanghyeon Lee wrote:
> 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.

No need to list a single item, right?

Look at existing commits for examples of how to write a changelog.

> 
> The change verify clean with checkpatch.pl.

That should be implied, no need to say it.

> 
> thanks,
> 
> Sanghyeon Lee

No need for those lines, right?

thanks,

greg k-h