linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8723bs: fix function definition style in hal_com_phycfg.c
@ 2025-09-08 17:29 Akiyoshi Kurita
  2025-09-12 13:53 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Akiyoshi Kurita @ 2025-09-08 17:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Philipp Hortmann, linux-staging, linux-kernel
  Cc: Akiyoshi Kurita

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


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

* Re: [PATCH v2] staging: rtl8723bs: fix function definition style in hal_com_phycfg.c
  2025-09-08 17:29 [PATCH v2] staging: rtl8723bs: fix function definition style in hal_com_phycfg.c Akiyoshi Kurita
@ 2025-09-12 13:53 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2025-09-12 13:53 UTC (permalink / raw)
  To: Akiyoshi Kurita; +Cc: Philipp Hortmann, linux-staging, linux-kernel

On Tue, Sep 09, 2025 at 02:29:25AM +0900, Akiyoshi Kurita wrote:
> 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);

This patch doesn't apply, nor does it even look like it can build?  Did
you test-build the result?

thanks,

greg k-h

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

end of thread, other threads:[~2025-09-12 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08 17:29 [PATCH v2] staging: rtl8723bs: fix function definition style in hal_com_phycfg.c Akiyoshi Kurita
2025-09-12 13:53 ` Greg Kroah-Hartman

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).