* [PATCH] staging: rtl8723bs: hal: remove unnecessary braces
@ 2026-06-22 13:17 Xiaofeng Yuan
2026-07-07 11:26 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Xiaofeng Yuan @ 2026-06-22 13:17 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Xiaofeng Yuan
checkpatch reports two warnings about unnecessary braces in hal_intf.c:
- WARNING: braces {} are not necessary for any arm of this
statement (rtw_hal_update_ra_mask)
- WARNING: braces {} are not necessary for single statement
blocks (rtw_hal_dm_watchdog_in_lps)
Both blocks contain only single statements, so the braces are
redundant. Remove them to align with kernel coding style.
Compile tested with CONFIG_RTL8723BS=m.
Signed-off-by: Xiaofeng Yuan <xiaofengmian@163.com>
---
drivers/staging/rtl8723bs/hal/hal_intf.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 27c0c0198..45634b5e5 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -208,9 +208,8 @@ void rtw_hal_update_ra_mask(struct sta_info *psta, u8 rssi_level)
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
add_ratid(padapter, psta, rssi_level);
- else {
+ else
UpdateHalRAMask8723B(padapter, psta->mac_id, rssi_level);
- }
}
void rtw_hal_add_ra_tid(struct adapter *padapter, u32 bitmap, u8 *arg, u8 rssi_level)
@@ -254,9 +253,8 @@ void rtw_hal_dm_watchdog(struct adapter *padapter)
void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter)
{
- if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode) {
+ if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode)
rtl8723b_HalDmWatchDog_in_LPS(padapter); /* this function caller is in interrupt context */
- }
}
void beacon_timing_control(struct adapter *padapter)
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] staging: rtl8723bs: hal: remove unnecessary braces
2026-06-22 13:17 [PATCH] staging: rtl8723bs: hal: remove unnecessary braces Xiaofeng Yuan
@ 2026-07-07 11:26 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2026-07-07 11:26 UTC (permalink / raw)
To: Xiaofeng Yuan; +Cc: linux-staging, linux-kernel
On Mon, Jun 22, 2026 at 01:17:19PM +0000, Xiaofeng Yuan wrote:
> checkpatch reports two warnings about unnecessary braces in hal_intf.c:
>
> - WARNING: braces {} are not necessary for any arm of this
> statement (rtw_hal_update_ra_mask)
> - WARNING: braces {} are not necessary for single statement
> blocks (rtw_hal_dm_watchdog_in_lps)
>
> Both blocks contain only single statements, so the braces are
> redundant. Remove them to align with kernel coding style.
>
> Compile tested with CONFIG_RTL8723BS=m.
>
> Signed-off-by: Xiaofeng Yuan <xiaofengmian@163.com>
> ---
> drivers/staging/rtl8723bs/hal/hal_intf.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
> index 27c0c0198..45634b5e5 100644
> --- a/drivers/staging/rtl8723bs/hal/hal_intf.c
> +++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
> @@ -208,9 +208,8 @@ void rtw_hal_update_ra_mask(struct sta_info *psta, u8 rssi_level)
>
> if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
> add_ratid(padapter, psta, rssi_level);
> - else {
> + else
> UpdateHalRAMask8723B(padapter, psta->mac_id, rssi_level);
> - }
> }
>
> void rtw_hal_add_ra_tid(struct adapter *padapter, u32 bitmap, u8 *arg, u8 rssi_level)
> @@ -254,9 +253,8 @@ void rtw_hal_dm_watchdog(struct adapter *padapter)
>
> void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter)
> {
> - if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode) {
> + if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode)
> rtl8723b_HalDmWatchDog_in_LPS(padapter); /* this function caller is in interrupt context */
> - }
> }
>
> void beacon_timing_control(struct adapter *padapter)
> --
> 2.43.0
>
>
Does not apply to the latest tree :(
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] staging: rtl8723bs: hal: remove unnecessary braces
@ 2026-03-06 16:11 Gopi Krishna Menon
2026-03-07 20:20 ` Bera Yüzlü
0 siblings, 1 reply; 4+ messages in thread
From: Gopi Krishna Menon @ 2026-03-06 16:11 UTC (permalink / raw)
To: gregkh
Cc: Gopi Krishna Menon, daniel.baluta, simona.toaca, karanja99erick,
benjaminpotron, linux-staging, linux-kernel
Checkpatch reports the following warning in odm_DIG.c
WARNING: braces {} are not necessary for single statement blocks
Remove unnecessary braces from single line conditional statements in
odm_DIG.c to fix checkpatch warning.
Signed-off-by: Gopi Krishna Menon <krishnagopi487@gmail.com>
---
Changes have been compile tested. No functionality change intended
drivers/staging/rtl8723bs/hal/odm_DIG.c | 28 +++++++++----------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c b/drivers/staging/rtl8723bs/hal/odm_DIG.c
index f10427abd849..33661182d85a 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DIG.c
+++ b/drivers/staging/rtl8723bs/hal/odm_DIG.c
@@ -220,9 +220,8 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI)
s8 Diff, IGI_target;
bool EDCCA_State = false;
- if (!(pDM_Odm->SupportAbility & ODM_BB_ADAPTIVITY)) {
+ if (!(pDM_Odm->SupportAbility & ODM_BB_ADAPTIVITY))
return;
- }
if (*pDM_Odm->pBandWidth == ODM_BW20M) /* CHANNEL_WIDTH_20 */
IGI_target = pDM_Odm->IGI_Base;
@@ -286,16 +285,14 @@ void ODM_Write_DIG(void *pDM_VOID, u8 CurrentIGI)
struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID;
struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
- if (pDM_DigTable->bStopDIG) {
+ if (pDM_DigTable->bStopDIG)
return;
- }
if (pDM_DigTable->CurIGValue != CurrentIGI) {
/* 1 Check initial gain by upper bound */
if (!pDM_DigTable->bPSDInProgress) {
- if (CurrentIGI > pDM_DigTable->rx_gain_range_max) {
+ if (CurrentIGI > pDM_DigTable->rx_gain_range_max)
CurrentIGI = pDM_DigTable->rx_gain_range_max;
- }
}
@@ -314,24 +311,20 @@ bool odm_DigAbort(void *pDM_VOID)
struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID;
/* SupportAbility */
- if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT)) {
+ if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT))
return true;
- }
/* SupportAbility */
- if (!(pDM_Odm->SupportAbility & ODM_BB_DIG)) {
+ if (!(pDM_Odm->SupportAbility & ODM_BB_DIG))
return true;
- }
/* ScanInProcess */
- if (*(pDM_Odm->pbScanInProcess)) {
+ if (*(pDM_Odm->pbScanInProcess))
return true;
- }
/* add by Neil Chen to avoid PSD is processing */
- if (pDM_Odm->bDMInitialGainEnable == false) {
+ if (pDM_Odm->bDMInitialGainEnable == false)
return true;
- }
return false;
}
@@ -413,9 +406,9 @@ void odm_DIG(void *pDM_VOID)
if (pDM_Odm->bLinked && bPerformance) {
/* 2 Modify DIG upper bound */
/* 4 Modify DIG upper bound for 92E, 8723A\B, 8821 & 8812 BT */
- if (pDM_Odm->bBtLimitedDig == 1) {
+ if (pDM_Odm->bBtLimitedDig == 1)
offset = 10;
- } else
+ else
offset = 15;
if ((pDM_Odm->RSSI_Min + offset) > dm_dig_max)
@@ -475,9 +468,8 @@ void odm_DIG(void *pDM_VOID)
}
/* 2 Abnormal lower bound case */
- if (pDM_DigTable->rx_gain_range_min > pDM_DigTable->rx_gain_range_max) {
+ if (pDM_DigTable->rx_gain_range_min > pDM_DigTable->rx_gain_range_max)
pDM_DigTable->rx_gain_range_min = pDM_DigTable->rx_gain_range_max;
- }
/* 1 False alarm threshold decision */
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-07 11:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 13:17 [PATCH] staging: rtl8723bs: hal: remove unnecessary braces Xiaofeng Yuan
2026-07-07 11:26 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2026-03-06 16:11 Gopi Krishna Menon
2026-03-07 20:20 ` Bera Yüzlü
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox