From: Akiyoshi Kurita <weibu@redadmin.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Philipp Hortmann <philipp.g.hortmann@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Akiyoshi Kurita <weibu@redadmin.org>
Subject: [PATCH v2] staging: rtl8723bs: fix function definition style in hal_com_phycfg.c
Date: Tue, 9 Sep 2025 02:29:25 +0900 [thread overview]
Message-ID: <20250908172925.58312-1-weibu@redadmin.org> (raw)
Several function definitions in this file did not follow the kernel
coding style, spreading arguments across multiple lines.
As requested by Dan Carpenter, fix all instances to place the function
parameters and the closing parenthesis on the same line as the function
name, improving readability and conforming to style guidelines.
Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org>
---
.../staging/rtl8723bs/hal/hal_com_phycfg.c | 33 ++++---------------
1 file changed, 6 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index 75ed731bbb14..fa987a797b16 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -61,8 +61,6 @@ phy_SetTxPowerByRateBase(struct adapter *Adapter, u8 RfPath,
static void
phy_StoreTxPowerByRateBase(struct adapter *padapter)
-{
- u8 path, base;
for (path = RF_PATH_A; path <= RF_PATH_B; ++path) {
base = PHY_GetTxPowerByRate(padapter, path, MGN_11M);
@@ -80,9 +78,7 @@ u8 PHY_GetRateSectionIndexOfTxPowerByRate(struct adapter *padapter, u32 RegAddr,
u8 PHY_GetRateSectionIndexOfTxPowerByRate(struct adapter *padapter, u32 RegAddr, u32 BitMask)
u8 PHY_GetRateSectionIndexOfTxPowerByRate(struct adapter *padapter, u32 RegAddr, u32 BitMask)
struct dm_odm_t *pDM_Odm = &pHalData->odmpriv;
- u8 index = 0;
-
- if (pDM_Odm->PhyRegPgVersion == 0) {
+u8 PHY_GetRateSectionIndexOfTxPowerByRate(struct adapter *padapter, u32 RegAddr, u32 BitMask)
switch (RegAddr) {
case rTxAGC_A_Rate18_06:
index = 0;
@@ -137,16 +133,8 @@ void PHY_GetRateValuesOfTxPowerByRate(struct adapter *padapter, u32 RegAddr, u32
switch (RegAddr) {
case rTxAGC_A_Rate18_06:
- case rTxAGC_B_Rate18_06:
- RateIndex[0] = PHY_GetRateIndexOfTxPowerByRate(MGN_6M);
- RateIndex[1] = PHY_GetRateIndexOfTxPowerByRate(MGN_9M);
- RateIndex[2] = PHY_GetRateIndexOfTxPowerByRate(MGN_12M);
- RateIndex[3] = PHY_GetRateIndexOfTxPowerByRate(MGN_18M);
- for (i = 0; i < 4; ++i)
- PwrByRateVal[i] = (s8)(((Value >> (i * 8 + 4)) & 0xF) * 10 +
- ((Value >> (i * 8)) & 0xF));
- *RateNum = 4;
- break;
+void
+PHY_GetRateValuesOfTxPowerByRate(struct adapter *padapter, u32 RegAddr, u32 BitMask, u32 Value, u8 *RateIndex, s8 *PwrByRateVal, u8 *RateNum)
/* add the rest of cases here ... */
@@ -425,10 +413,8 @@ void PHY_SetTxPowerIndexByRateSection(
static void phy_ConvertTxPowerByRateInDbmToRelativeValues(struct adapter *padapter) ARRAY_SIZE(cckRates));
} else if (RateSection == OFDM) {
- u8 ofdmRates[] = {MGN_6M, MGN_9M, MGN_12M, MGN_18M, MGN_24M, MGN_36M, MGN_48M, MGN_54M}; PHY_SetTxPowerIndexByRateArray(padapter, RFPath,
- pHalData->CurrentChannelBW,
- Channel, ofdmRates,
- ARRAY_SIZE(ofdmRates));
+static void
+phy_ConvertTxPowerByRateInDbmToRelativeValues(struct adapter *padapter)
} else if (RateSection == HT_MCS0_MCS7) {
u8 htRates1T[] = {MGN_MCS0, MGN_MCS1, MGN_MCS2, MGN_MCS3, MGN_MCS4, MGN_MCS5, MGN_MCS6, MGN_MCS7};
@@ -498,14 +484,7 @@ u8 PHY_GetTxPowerIndexBase(struct adapter *padapter, u8 RFPath, u8 Rate, enum ch
case MGN_5_5M:
index = 2;
break;
- case MGN_11M:
- index = 3;
- break;
- case MGN_6M:
- index = 4;
- break;
- case MGN_9M:
- index = 5;
+u8 PHY_GetTxPowerIndexBase(struct adapter *padapter, u8 RFPath, u8 Rate, enum channel_width BandWidth, u8 Channel)
break;
case MGN_12M:
index = 6;
--
2.47.3
next reply other threads:[~2025-09-08 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 17:29 Akiyoshi Kurita [this message]
2025-09-12 13:53 ` [PATCH v2] staging: rtl8723bs: fix function definition style in hal_com_phycfg.c Greg Kroah-Hartman
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=20250908172925.58312-1-weibu@redadmin.org \
--to=weibu@redadmin.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=philipp.g.hortmann@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).