[PATCH 9/9] staging: rtl8723bs: wrap long lines and fix argument alignment

Marc Finkelbaum
2026-04-14T09:59:03Z

Break lines that exceed 80 columns and align continuation arguments to
the opening parenthesis. Affected sites: scnprintf calls in
dump_chip_info, hw_chnlPlan assignment, Queue2Pipe[7] assignments in
the pipe-mapping functions, rtw_hal_set_hwreg in hal_init_macaddr,
c2h_evt payload read loop, rtw_write16/rtw_write8 in SetHwReg and
rtw_hal_check_rxfifo_full, rtw_get_stainfo and the UndecoratedSmoothedPWDB
assignment in GetHalDefVar, ODM_CmnInfoPtrArrayHook calls in SetHalODMVar,
and rtw_hal_read_rfreg/PHY_SetRFReg in rtw_bb_rf_gain_offset.

No functional change.

Signed-off-by: Marc Finkelbaum <regpacy@gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 71 +++++++++++++++++--------
1 file changed, 48 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 2688355f9265..0e3b5831d974 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -35,8 +35,10 @@ void dump_chip_info(struct hal_version ChipVersion)
char buf[128];
size_t cnt = 0;

- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "Chip Version Info: CHIP_8723B_%s_",
- IS_NORMAL_CHIP(ChipVersion) ? "Normal_Chip" : "Test_Chip");
+ cnt += scnprintf(buf + cnt, sizeof(buf) - cnt,
+ "Chip Version Info: CHIP_8723B_%s_",
+ IS_NORMAL_CHIP(ChipVersion) ? "Normal_Chip" :
+ "Test_Chip");

if (IS_CHIP_VENDOR_TSMC(ChipVersion))
cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "TSMC_");
@@ -63,11 +65,12 @@ void dump_chip_info(struct hal_version ChipVersion)
cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "K_CUT_");
else
cnt += scnprintf(buf + cnt, sizeof(buf) - cnt,
- "UNKNOWN_CUT(%d)_", ChipVersion.CUTVersion);
+ "UNKNOWN_CUT(%d)_", ChipVersion.CUTVersion);

cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "1T1R_");

- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "RomVer(%d)\n", ChipVersion.ROMVer);
+ cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "RomVer(%d)\n",
+ ChipVersion.ROMVer);
}

#define EEPROM_CHANNEL_PLAN_BY_HW_MASK 0x80
@@ -107,7 +110,8 @@ u8 hal_com_config_channel_plan(struct adapter *padapter, u8 hw_channel_plan,
if (!AutoLoadFail) {
u8 hw_chnlPlan;

- hw_chnlPlan = hw_channel_plan & (~EEPROM_CHANNEL_PLAN_BY_HW_MASK);
+ hw_chnlPlan = hw_channel_plan &
+ (~EEPROM_CHANNEL_PLAN_BY_HW_MASK);
if (rtw_is_channel_plan_valid(hw_chnlPlan)) {
if (hw_channel_plan & EEPROM_CHANNEL_PLAN_BY_HW_MASK)
pHalData->bDisableSWChannelPlan = true;
@@ -364,9 +368,11 @@ static void _TwoOutPipeMapping(struct adapter *padapter, bool bWIFICfg)
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0]; /* BCN */
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0]; /* MGT */
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0]; /* HIGH */
- pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0]; /* TXCMD */
+ pdvobjpriv->Queue2Pipe[7] =
+ pdvobjpriv->RtOutPipe[0]; /* TXCMD */

} else { /* typical setting */
+
/* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
/* 1, 1, 0, 0, 0, 0, 0, 0, 0 }; */
/* 0:ep_0 num, 1:ep_1 num */
@@ -379,8 +385,8 @@ static void _TwoOutPipeMapping(struct adapter *padapter, bool bWIFICfg)
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0]; /* BCN */
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0]; /* MGT */
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0]; /* HIGH */
- pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0]; /* TXCMD */
-
+ pdvobjpriv->Queue2Pipe[7] =
+ pdvobjpriv->RtOutPipe[0]; /* TXCMD */
}
}

@@ -401,9 +407,11 @@ static void _ThreeOutPipeMapping(struct adapter *padapter, bool bWIFICfg)
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0]; /* BCN */
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0]; /* MGT */
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0]; /* HIGH */
- pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0]; /* TXCMD */
+ pdvobjpriv->Queue2Pipe[7] =
+ pdvobjpriv->RtOutPipe[0]; /* TXCMD */

} else { /* typical setting */
+
/* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
/* 2, 2, 1, 0, 0, 0, 0, 0, 0 }; */
/* 0:H, 1:N, 2:L */
@@ -416,7 +424,8 @@ static void _ThreeOutPipeMapping(struct adapter *padapter, bool bWIFICfg)
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0]; /* BCN */
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0]; /* MGT */
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0]; /* HIGH */
- pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0]; /* TXCMD */
+ pdvobjpriv->Queue2Pipe[7] =
+ pdvobjpriv->RtOutPipe[0]; /* TXCMD */
}
}

@@ -449,7 +458,8 @@ bool Hal_MappingOutPipe(struct adapter *padapter, u8 NumOutPipe)

void hal_init_macaddr(struct adapter *adapter)
{
- rtw_hal_set_hwreg(adapter, HW_VAR_MAC_ADDR, adapter->eeprompriv.mac_addr);
+ rtw_hal_set_hwreg(adapter, HW_VAR_MAC_ADDR,
+ adapter->eeprompriv.mac_addr);
}

void rtw_init_hal_com_default_value(struct adapter *Adapter)
@@ -502,7 +512,8 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf)

/* Read the content */
for (i = 0; i < c2h_evt->plen; i++)
- c2h_evt->payload[i] = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL + 2 + i);
+ c2h_evt->payload[i] =
+ rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL + 2 + i);

ret = _SUCCESS;

@@ -565,7 +576,9 @@ void SetHwReg(struct adapter *adapter, u8 variable, u8 *val)
u16 reg_scr;

reg_scr = rtw_read16(adapter, REG_SECCFG);
- rtw_write16(adapter, REG_SECCFG, reg_scr | SCR_CHK_KEYID | SCR_RxDecEnable | SCR_TxEncEnable);
+ rtw_write16(adapter, REG_SECCFG,
+ reg_scr | SCR_CHK_KEYID | SCR_RxDecEnable |
+ SCR_TxEncEnable);
} break;
case HW_VAR_SEC_DK_CFG: {
struct security_priv *sec = &adapter->securitypriv;
@@ -576,7 +589,8 @@ void SetHwReg(struct adapter *adapter, u8 variable, u8 *val)
if (sec->dot11AuthAlgrthm != dot11AuthAlgrthm_8021X)
reg_scr |= (SCR_RxUseDK | SCR_TxUseDK);
} else { /* Disable default key related setting */
- reg_scr &= ~(SCR_RXBCUSEDK | SCR_TXBCUSEDK | SCR_RxUseDK | SCR_TxUseDK);
+ reg_scr &= ~(SCR_RXBCUSEDK | SCR_TXBCUSEDK |
+ SCR_RxUseDK | SCR_TxUseDK);
}

rtw_write8(adapter, REG_SECCFG, reg_scr);
@@ -657,9 +671,11 @@ u8 GetHalDefVar(struct adapter *adapter, enum hal_def_variable variable,

pmlmepriv = &adapter->mlmepriv;
pstapriv = &adapter->stapriv;
- psta = rtw_get_stainfo(pstapriv, pmlmepriv->cur_network.network.mac_address);
+ psta = rtw_get_stainfo(pstapriv,
+ pmlmepriv->cur_network.network.mac_address);
if (psta)
- *((int *)value) = psta->rssi_stat.UndecoratedSmoothedPWDB;
+ *((int *)value) =
+ psta->rssi_stat.UndecoratedSmoothedPWDB;
} break;
case HAL_DEF_DBG_DM_FUNC:
*((u32 *)value) = hal_data->odmpriv.SupportAbility;
@@ -701,10 +717,14 @@ void SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable,
struct sta_info *psta = pValue1;

if (bSet) {
- ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, psta);
+ ODM_CmnInfoPtrArrayHook(podmpriv,
+ ODM_CMNINFO_STA_STATUS,
+ psta->mac_id, psta);
} else {
/* spin_lock_bh(&pHalData->odm_stainfo_lock); */
- ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, NULL);
+ ODM_CmnInfoPtrArrayHook(podmpriv,
+ ODM_CMNINFO_STA_STATUS,
+ psta->mac_id, NULL);

/* spin_unlock_bh(&pHalData->odm_stainfo_lock); */
}
@@ -754,7 +774,8 @@ bool GetU1ByteIntegerFromStringInDecimal(char *Str, u8 *pInt)
void rtw_hal_check_rxfifo_full(struct adapter *adapter)
{
/* switch counter to RX fifo */
- rtw_write8(adapter, REG_RXERR_RPT + 3, rtw_read8(adapter, REG_RXERR_RPT + 3) | 0xf0);
+ rtw_write8(adapter, REG_RXERR_RPT + 3,
+ rtw_read8(adapter, REG_RXERR_RPT + 3) | 0xf0);
}

static u32 Array_kfreemap[] = {
@@ -782,19 +803,23 @@ void rtw_bb_rf_gain_offset(struct adapter *padapter)

if (value & BIT4) {
if (padapter->eeprompriv.EEPROMRFGainVal != 0xff) {
- rtw_hal_read_rfreg(padapter, RF_PATH_A, 0x7f, 0xffffffff);
+ rtw_hal_read_rfreg(padapter, RF_PATH_A, 0x7f,
+ 0xffffffff);

for (i = 0; i < ARRAY_SIZE(Array_kfreemap); i += 2) {
v1 = Array[i];
v2 = Array[i + 1];
- if (v1 == padapter->eeprompriv.EEPROMRFGainVal) {
+ if (v1 ==
+ padapter->eeprompriv.EEPROMRFGainVal) {
target = v2;
break;
}
}
- PHY_SetRFReg(padapter, RF_PATH_A, REG_RF_BB_GAIN_OFFSET, BIT18 | BIT17 | BIT16 | BIT15, target);
+ PHY_SetRFReg(padapter, RF_PATH_A, REG_RF_BB_GAIN_OFFSET,
+ BIT18 | BIT17 | BIT16 | BIT15, target);

- rtw_hal_read_rfreg(padapter, RF_PATH_A, 0x7f, 0xffffffff);
+ rtw_hal_read_rfreg(padapter, RF_PATH_A, 0x7f,
+ 0xffffffff);
}
}
}
--
2.53.0