[PATCH] staging: rtl8723bs: fix coding style issues in hal_com.c
From: Oliwier Iwan
Date: Fri May 22 2026 - 10:19:31 EST
Fix multiple checkpatch warnings:
- Place constant on right side of comparison
- Remove space before tab in block comments
- Align '*' on each line of block comments
- Fix misaligned closing brace
Signed-off-by: Oliwier Iwan <oliwieriwan@xxxxxxxxxxx>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 38 ++++++++++++-------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 728a2171fbcb..4b4bfa80e37c 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -107,7 +107,7 @@ u8 hal_com_config_channel_plan(
pHalData->bDisableSWChannelPlan = false;
chnlPlan = def_channel_plan;
- if (0xFF == hw_channel_plan)
+ if (hw_channel_plan == 0xFF)
auto_load_fail = true;
if (!auto_load_fail) {
@@ -362,7 +362,7 @@ static void _TwoOutPipeMapping(struct adapter *padapter, bool bWIFICfg)
if (bWIFICfg) { /* WMM */
- /* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
+ /* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
/* 0, 1, 0, 1, 0, 0, 0, 0, 0 }; */
/* 0:ep_0 num, 1:ep_1 num */
@@ -403,7 +403,7 @@ static void _ThreeOutPipeMapping(struct adapter *padapter, bool bWIFICfg)
if (bWIFICfg) { /* for WMM */
- /* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
+ /* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
/* 1, 2, 1, 0, 0, 0, 0, 0, 0 }; */
/* 0:H, 1:N, 2:L */
@@ -420,7 +420,7 @@ static void _ThreeOutPipeMapping(struct adapter *padapter, bool bWIFICfg)
} else { /* typical setting */
- /* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
+ /* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
/* 2, 2, 1, 0, 0, 0, 0, 0, 0 }; */
/* 0:H, 1:N, 2:L */
@@ -478,10 +478,10 @@ void rtw_init_hal_com_default_value(struct adapter *Adapter)
}
/*
-* C2H event format:
-* Field TRIGGER CONTENT CMD_SEQ CMD_LEN CMD_ID
-* BITS [127:120] [119:16] [15:8] [7:4] [3:0]
-*/
+ * C2H event format:
+ * Field TRIGGER CONTENT CMD_SEQ CMD_LEN CMD_ID
+ * BITS [127:120] [119:16] [15:8] [7:4] [3:0]
+ */
void c2h_evt_clear(struct adapter *adapter)
{
@@ -489,10 +489,10 @@ void c2h_evt_clear(struct adapter *adapter)
}
/*
-* C2H event format:
-* Field TRIGGER CMD_LEN CONTENT CMD_SEQ CMD_ID
-* BITS [127:120] [119:112] [111:16] [15:8] [7:0]
-*/
+ * C2H event format:
+ * Field TRIGGER CMD_LEN CONTENT CMD_SEQ CMD_ID
+ * BITS [127:120] [119:112] [111:16] [15:8] [7:0]
+ */
s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf)
{
s32 ret = _FAIL;
@@ -526,9 +526,9 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf)
clear_evt:
/*
- * Clear event to notify FW we have read the command.
- * If this field isn't clear, the FW won't update the next command message.
- */
+ * Clear event to notify FW we have read the command.
+ * If this field isn't clear, the FW won't update the next command message.
+ */
c2h_evt_clear(adapter);
exit:
return ret;
@@ -625,9 +625,9 @@ void SetHwReg(struct adapter *adapter, u8 variable, u8 *val)
break;
case HW_VAR_DM_FUNC_CLR:
/*
- * input is already a mask to clear function
- * don't invert it again! George, Lucas@20130513
- */
+ * input is already a mask to clear function
+ * don't invert it again! George, Lucas@20130513
+ */
odm->SupportAbility &= *((u32 *)val);
break;
case HW_VAR_AMPDU_MIN_SPACE:
@@ -736,7 +736,7 @@ void SetHalODMVar(
ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, NULL);
/* spin_unlock_bh(&pHalData->odm_stainfo_lock); */
- }
+ }
}
break;
case HAL_ODM_P2P_STATE:
--
2.54.0