[PATCH 4/9] staging: rtl8723bs: add spaces around binary operators

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

Add missing spaces around |, &, +, /, and % operators in bitfield OR
expressions (SCR_* flags, BIT* masks), array index arithmetic in
HalSetBrateCfg and rtw_bb_rf_gain_offset, and the register offset
arithmetic in rtw_hal_check_rxfifo_full.

No functional change.

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

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index be8b5e1dbab5..2f76d04aa9d3 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -540,7 +540,7 @@ void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *pst
/* b/g mode ra_bitmap */
for (i = 0; i < sizeof(psta->bssrateset); i++) {
if (psta->bssrateset[i])
- tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value(psta->bssrateset[i]&0x7f);
+ tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value(psta->bssrateset[i] & 0x7f);
}

/* n mode ra_bitmap */
@@ -548,13 +548,13 @@ void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *pst
limit = 8; /* 1R */

for (i = 0; i < limit; i++) {
- if (psta->htpriv.ht_cap.mcs.rx_mask[i/8] & BIT(i%8))
- tx_ra_bitmap |= BIT(i+12);
+ if (psta->htpriv.ht_cap.mcs.rx_mask[i / 8] & BIT(i % 8))
+ tx_ra_bitmap |= BIT(i + 12);
}
}

psta->ra_mask = tx_ra_bitmap;
- psta->init_rate = get_highest_rate_idx(tx_ra_bitmap)&0x3f;
+ psta->init_rate = get_highest_rate_idx(tx_ra_bitmap) & 0x3f;
}

void SetHwReg(struct adapter *adapter, u8 variable, u8 *val)
@@ -571,7 +571,7 @@ 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:
@@ -582,9 +582,9 @@ void SetHwReg(struct adapter *adapter, u8 variable, u8 *val)
if (val) { /* Enable default key related setting */
reg_scr |= SCR_TXBCUSEDK;
if (sec->dot11AuthAlgrthm != dot11AuthAlgrthm_8021X)
- reg_scr |= (SCR_RxUseDK|SCR_TxUseDK);
+ 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);
}
@@ -770,7 +770,7 @@ 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[] = {
@@ -802,13 +802,13 @@ void rtw_bb_rf_gain_offset(struct adapter *padapter)

for (i = 0; i < ARRAY_SIZE(Array_kfreemap); i += 2) {
v1 = Array[i];
- v2 = Array[i+1];
+ v2 = Array[i + 1];
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);
}
--
2.53.0