* [PATCH] staging: rtl8723bs: remove unnecessary braces and fix indentation in HalPhyRf.c
@ 2026-05-24 17:52 Igor Putko
2026-05-25 6:48 ` Dan Carpenter
0 siblings, 1 reply; 5+ messages in thread
From: Igor Putko @ 2026-05-24 17:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Igor Putko
Fixed braces around single statement blocks and corrected indentation
to follow the Linux kernel coding style.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
drivers/staging/rtl8723bs/hal/HalPhyRf.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf.c b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
index 7bef05a9a..3b81bc2e2 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
@@ -118,9 +118,8 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
}
/* Calculate Average ThermalValue after average enough times */
- if (ThermalValue_AVG_count) {
+ if (ThermalValue_AVG_count)
ThermalValue = (u8)(ThermalValue_AVG / ThermalValue_AVG_count);
- }
/* 4 5. Calculate delta, delta_LCK */
/* delta" here is used to determine whether thermal value changes or not. */
@@ -230,14 +229,11 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
/* else if (pDM_Odm->RFCalibrateInfo.CCK_index < 0) */
/* pDM_Odm->RFCalibrateInfo.CCK_index = 0; */
} else {
- for (p = RF_PATH_A; p < c.RfPathCount; p++)
- pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
+ for (p = RF_PATH_A; p < c.RfPathCount; p++)
+ pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
}
/* Print Swing base & current */
- for (p = RF_PATH_A; p < c.RfPathCount; p++) {
- }
-
if (
(pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_A] != 0 ||
pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_B] != 0) &&
@@ -254,7 +250,7 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
if (ThermalValue > pHalData->EEPROMThermalMeter) {
for (p = RF_PATH_A; p < c.RfPathCount; p++)
- (*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, 0);
+ (*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, 0);
} else {
for (p = RF_PATH_A; p < c.RfPathCount; p++)
(*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, Indexforchannel);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8723bs: remove unnecessary braces and fix indentation in HalPhyRf.c
2026-05-24 17:52 [PATCH] staging: rtl8723bs: remove unnecessary braces and fix indentation in HalPhyRf.c Igor Putko
@ 2026-05-25 6:48 ` Dan Carpenter
2026-05-25 12:10 ` [PATCH 1/3] staging: rtl8723bs: remove empty loop and stale comment " Igor Putko
0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2026-05-25 6:48 UTC (permalink / raw)
To: Igor Putko; +Cc: gregkh, linux-staging, linux-kernel
On Sun, May 24, 2026 at 08:52:47PM +0300, Igor Putko wrote:
> Fixed braces around single statement blocks and corrected indentation
> to follow the Linux kernel coding style.
You're going to need to split this into multiple patches.
> @@ -230,14 +229,11 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
> /* else if (pDM_Odm->RFCalibrateInfo.CCK_index < 0) */
> /* pDM_Odm->RFCalibrateInfo.CCK_index = 0; */
> } else {
> - for (p = RF_PATH_A; p < c.RfPathCount; p++)
> - pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
> + for (p = RF_PATH_A; p < c.RfPathCount; p++)
> + pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
> }
>
> /* Print Swing base & current */
> - for (p = RF_PATH_A; p < c.RfPathCount; p++) {
> - }
> -
The comment makes no sense now.
> if (
> (pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_A] != 0 ||
> pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_B] != 0) &&
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] staging: rtl8723bs: remove empty loop and stale comment in HalPhyRf.c
2026-05-25 6:48 ` Dan Carpenter
@ 2026-05-25 12:10 ` Igor Putko
2026-05-25 12:10 ` [PATCH 2/3] staging: rtl8723bs: fix coding style for PowerIndexOffset initialization Igor Putko
2026-05-25 12:10 ` [PATCH 3/3] staging: rtl8723bs: fix coding style for TxPwrTrackSetPwr calls Igor Putko
0 siblings, 2 replies; 5+ messages in thread
From: Igor Putko @ 2026-05-25 12:10 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel, Igor Putko
The 'for' loop in ODM_TXPowerTrackingCallback_ThermalMeter performs no
operations and just iterates over the path count. This is unnecessary code.
Also, remove the associated "Print Swing base & current" comment, as
it no longer refers to any active code.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
drivers/staging/rtl8723bs/hal/HalPhyRf.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf.c b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
index 7bef05a9a..f67b8d70b 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
@@ -234,10 +234,6 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
}
- /* Print Swing base & current */
- for (p = RF_PATH_A; p < c.RfPathCount; p++) {
- }
-
if (
(pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_A] != 0 ||
pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_B] != 0) &&
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] staging: rtl8723bs: fix coding style for PowerIndexOffset initialization
2026-05-25 12:10 ` [PATCH 1/3] staging: rtl8723bs: remove empty loop and stale comment " Igor Putko
@ 2026-05-25 12:10 ` Igor Putko
2026-05-25 12:10 ` [PATCH 3/3] staging: rtl8723bs: fix coding style for TxPwrTrackSetPwr calls Igor Putko
1 sibling, 0 replies; 5+ messages in thread
From: Igor Putko @ 2026-05-25 12:10 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel, Igor Putko
Remove unnecessary braces around the single statement 'for' loop and
fix indentation in ODM_TXPowerTrackingCallback_ThermalMeter to follow
the Linux kernel coding style.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
drivers/staging/rtl8723bs/hal/HalPhyRf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf.c b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
index f67b8d70b..3d45e5e44 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
@@ -230,8 +230,8 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
/* else if (pDM_Odm->RFCalibrateInfo.CCK_index < 0) */
/* pDM_Odm->RFCalibrateInfo.CCK_index = 0; */
} else {
- for (p = RF_PATH_A; p < c.RfPathCount; p++)
- pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
+ for (p = RF_PATH_A; p < c.RfPathCount; p++)
+ pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
}
if (
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] staging: rtl8723bs: fix coding style for TxPwrTrackSetPwr calls
2026-05-25 12:10 ` [PATCH 1/3] staging: rtl8723bs: remove empty loop and stale comment " Igor Putko
2026-05-25 12:10 ` [PATCH 2/3] staging: rtl8723bs: fix coding style for PowerIndexOffset initialization Igor Putko
@ 2026-05-25 12:10 ` Igor Putko
1 sibling, 0 replies; 5+ messages in thread
From: Igor Putko @ 2026-05-25 12:10 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel, Igor Putko
Remove unnecessary braces and fix incorrect indentation for the loop
calling ODM_TxPwrTrackSetPwr in ODM_TXPowerTrackingCallback_ThermalMeter.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
drivers/staging/rtl8723bs/hal/HalPhyRf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf.c b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
index 3d45e5e44..c7f3ad38f 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
@@ -250,7 +250,7 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
if (ThermalValue > pHalData->EEPROMThermalMeter) {
for (p = RF_PATH_A; p < c.RfPathCount; p++)
- (*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, 0);
+ (*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, 0);
} else {
for (p = RF_PATH_A; p < c.RfPathCount; p++)
(*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, Indexforchannel);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-25 12:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-24 17:52 [PATCH] staging: rtl8723bs: remove unnecessary braces and fix indentation in HalPhyRf.c Igor Putko
2026-05-25 6:48 ` Dan Carpenter
2026-05-25 12:10 ` [PATCH 1/3] staging: rtl8723bs: remove empty loop and stale comment " Igor Putko
2026-05-25 12:10 ` [PATCH 2/3] staging: rtl8723bs: fix coding style for PowerIndexOffset initialization Igor Putko
2026-05-25 12:10 ` [PATCH 3/3] staging: rtl8723bs: fix coding style for TxPwrTrackSetPwr calls Igor Putko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox