lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250908172925.58312-1-weibu@redadmin.org>
Date: Tue,  9 Sep 2025 02:29:25 +0900
From: Akiyoshi Kurita <weibu@...admin.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Philipp Hortmann <philipp.g.hortmann@...il.com>,
	linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Cc: Akiyoshi Kurita <weibu@...admin.org>
Subject: [PATCH v2] staging: rtl8723bs: fix function definition style in hal_com_phycfg.c

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@...admin.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ