From: Marc Finkelbaum <regpacy@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michael Straube <straube.linux@gmail.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Ethan Tidmore <ethantidmore06@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Marc Finkelbaum <regpacy@gmail.com>
Subject: [PATCH 4/9] staging: rtl8723bs: add spaces around binary operators
Date: Tue, 14 Apr 2026 12:58:28 +0300 [thread overview]
Message-ID: <20260414095833.76480-5-regpacy@gmail.com> (raw)
In-Reply-To: <20260414095833.76480-1-regpacy@gmail.com>
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
next prev parent reply other threads:[~2026-04-14 9:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 9:58 [PATCH 0/9] staging: rtl8723bs: coding style cleanup in hal_com.c Marc Finkelbaum
2026-04-14 9:58 ` [PATCH 1/9] staging: rtl8723bs: remove extra blank lines Marc Finkelbaum
2026-04-14 11:45 ` Andy Shevchenko
2026-04-14 9:58 ` [PATCH 2/9] staging: rtl8723bs: fix space-before-tab whitespace Marc Finkelbaum
2026-04-14 11:48 ` Andy Shevchenko
2026-04-14 9:58 ` [PATCH 3/9] staging: rtl8723bs: fix block comment alignment Marc Finkelbaum
2026-04-14 11:51 ` Andy Shevchenko
2026-04-14 9:58 ` Marc Finkelbaum [this message]
2026-04-14 11:58 ` [PATCH 4/9] staging: rtl8723bs: add spaces around binary operators Andy Shevchenko
2026-04-14 9:58 ` [PATCH 5/9] staging: rtl8723bs: add space before inline block comments Marc Finkelbaum
2026-04-14 12:12 ` Andy Shevchenko
2026-04-14 9:58 ` [PATCH 6/9] staging: rtl8723bs: fix Yoda conditions and == false comparisons Marc Finkelbaum
2026-04-14 12:21 ` Andy Shevchenko
2026-04-14 18:25 ` Luka Gejak
2026-04-14 9:58 ` [PATCH 7/9] staging: rtl8723bs: reformat multi-line function signatures Marc Finkelbaum
2026-04-14 9:58 ` [PATCH 8/9] staging: rtl8723bs: reformat switch-case blocks with braced bodies Marc Finkelbaum
2026-04-14 9:58 ` [PATCH 9/9] staging: rtl8723bs: wrap long lines and fix argument alignment Marc Finkelbaum
2026-04-14 12:31 ` Andy Shevchenko
2026-04-14 16:08 ` [PATCH 0/9] staging: rtl8723bs: coding style cleanup in hal_com.c regpac youtube
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260414095833.76480-5-regpacy@gmail.com \
--to=regpacy@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.carpenter@linaro.org \
--cc=ethantidmore06@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.