mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] staging: rtl8723bs: refactor PHY_ConvertTxPowerLimitToPowerIndex()
@ 2026-09-27  1:12 Leonardo Martins Martins
  2026-09-27  1:12 ` [PATCH 1/4] staging: rtl8723bs: rename PHY_ConvertTxPowerLimitToPowerIndex() Leonardo Martins Martins
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Leonardo Martins Martins @ 2026-09-27  1:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Leonardo Martins Martins

The function PHY_ConvertTxPowerLimitToPowerIndex() has several style
problems, such as mixed-case names, deeply nested code, and redundant
bounds checking.

Patches 1 and 2 rename mixed-case names that are on the same scope as
this function, struct fields such as TxPwrLimit_2_4G were left as is.
Patch 3 removes redundant parts of the code, and patch 4 solves the
nesting issue by extracting the inner loop into an auxiliary function
like it is done in rtw_phy_tx_power_limit_config(), at
drivers/net/wireless/realtek/rtw88/phy.c

Checkpatch issues a few warnings and checks for deep nesting and long
lines, but these are solved by the last patch.

Compile tested only.

Signed-off-by: Leonardo Martins Martins <dev.lmmrtns@gmail.com>
---
Leonardo Martins Martins (4):
      staging: rtl8723bs: rename PHY_ConvertTxPowerLimitToPowerIndex()
      staging: rtl8723bs: rename local vars in phy_tx_power_limit_to_index()
      staging: rtl8723bs: access TxPowerByRateBase2_4G directly
      staging: rtl8723bs: extract inner loop in phy_tx_power_limit_to_index()

 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c     | 88 ++++++++--------------
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c    |  2 +-
 drivers/staging/rtl8723bs/include/hal_com_phycfg.h |  5 +-
 3 files changed, 32 insertions(+), 63 deletions(-)
---
base-commit: 8444548bd905f22093729065408284a6b46f7eee
change-id: 20260922-rtl8723bs-tx-pwr-limit-9a19bb9f901e

Best regards,
-- 
Leonardo Martins Martins <dev.lmmrtns@gmail.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-01  9:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-27  1:12 [PATCH 0/4] staging: rtl8723bs: refactor PHY_ConvertTxPowerLimitToPowerIndex() Leonardo Martins Martins
2026-09-27  1:12 ` [PATCH 1/4] staging: rtl8723bs: rename PHY_ConvertTxPowerLimitToPowerIndex() Leonardo Martins Martins
2026-09-27  1:12 ` [PATCH 2/4] staging: rtl8723bs: rename local vars in phy_tx_power_limit_to_index() Leonardo Martins Martins
2026-10-01  9:31   ` Greg Kroah-Hartman
2026-09-27  1:12 ` [PATCH 3/4] staging: rtl8723bs: access TxPowerByRateBase2_4G directly Leonardo Martins Martins
2026-09-27  1:12 ` [PATCH 4/4] staging: rtl8723bs: extract inner loop in phy_tx_power_limit_to_index() Leonardo Martins Martins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®