public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2 0/2] remove unnecessary braces and else block
@ 2025-12-17 14:24 Sanghyeon Lee
  2025-12-17 14:24 ` [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces Sanghyeon Lee
  2025-12-17 14:24 ` [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary else block Sanghyeon Lee
  0 siblings, 2 replies; 4+ messages in thread
From: Sanghyeon Lee @ 2025-12-17 14:24 UTC (permalink / raw)
  To: gregkh, karanja99erick; +Cc: linux-staging, linux-kernel, Sanghyeon Lee

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(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces
  2025-12-17 14:24 [PATCH v2 0/2] remove unnecessary braces and else block Sanghyeon Lee
@ 2025-12-17 14:24 ` Sanghyeon Lee
  2025-12-17 14:33   ` Greg KH
  2025-12-17 14:24 ` [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary else block Sanghyeon Lee
  1 sibling, 1 reply; 4+ messages in thread
From: Sanghyeon Lee @ 2025-12-17 14:24 UTC (permalink / raw)
  To: gregkh, karanja99erick; +Cc: linux-staging, linux-kernel, Sanghyeon Lee

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary else block
  2025-12-17 14:24 [PATCH v2 0/2] remove unnecessary braces and else block Sanghyeon Lee
  2025-12-17 14:24 ` [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces Sanghyeon Lee
@ 2025-12-17 14:24 ` Sanghyeon Lee
  1 sibling, 0 replies; 4+ messages in thread
From: Sanghyeon Lee @ 2025-12-17 14:24 UTC (permalink / raw)
  To: gregkh, karanja99erick; +Cc: linux-staging, linux-kernel, Sanghyeon Lee

This 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

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

diff --git a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
index 0b70509f553b..166af5f6c9e0 100644
--- a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
+++ b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c
@@ -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 */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces
  2025-12-17 14:24 ` [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces Sanghyeon Lee
@ 2025-12-17 14:33   ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2025-12-17 14:33 UTC (permalink / raw)
  To: Sanghyeon Lee; +Cc: karanja99erick, linux-staging, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-12-17 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17 14:24 [PATCH v2 0/2] remove unnecessary braces and else block Sanghyeon Lee
2025-12-17 14:24 ` [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces Sanghyeon Lee
2025-12-17 14:33   ` Greg KH
2025-12-17 14:24 ` [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary else block Sanghyeon Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox