public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Trivial code cleanup patches
@ 2023-05-28 14:51 Yogesh Hegde
  0 siblings, 0 replies; 8+ messages in thread
From: Yogesh Hegde @ 2023-05-28 14:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Rename variables in struct rtllib_device to avoid CamelCase which is not 
accepted by checkpatch.

Yogesh Hegde (4):
  staging: rtl8192e: Rename variable SetWirelessMode
  staging: rtl8192e: Rename variable SetBWModeHandler
  staging: rtl8192e: Rename variable LeisurePSLeave
  staging: rtl8192e: Rename variable InitialGainHandler

 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c |  4 ++--
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c   |  8 ++++----
 drivers/staging/rtl8192e/rtl819x_HTProc.c      |  4 ++--
 drivers/staging/rtl8192e/rtllib.h              | 12 ++++++------
 drivers/staging/rtl8192e/rtllib_rx.c           |  2 +-
 drivers/staging/rtl8192e/rtllib_softmac.c      | 12 ++++++------
 drivers/staging/rtl8192e/rtllib_softmac_wx.c   |  6 +++---
 7 files changed, 24 insertions(+), 24 deletions(-)

-- 
2.25.1


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

* [PATCH 0/4] Trivial code cleanup patches
@ 2023-07-02 12:14 Yogesh Hegde
  2023-07-02 12:15 ` [PATCH 1/4] staging: rtl8192e: Rename variable currentRATR Yogesh Hegde
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Yogesh Hegde @ 2023-07-02 12:14 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel
  Cc: linux-kernel-mentees, skhan, ivan.orlov0322

Rename variables in function _rtl92e_dm_check_rate_adaptive 
to avoid checkpatch complains.

The patches are required to be applied in sequence.

Yogesh Hegde (4):
  staging: rtl8192e: Rename variable currentRATR
  staging: rtl8192e: Rename variable targetRATR
  staging: rtl8192e: Rename variable LowRSSIThreshForRA
  staging: rtl8192e: Rename variable HighRSSIThreshForRA

 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 38 +++++++++++-----------
 1 file changed, 19 insertions(+), 19 deletions(-)

-- 
2.34.1


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

* [PATCH 1/4] staging: rtl8192e: Rename variable currentRATR
  2023-07-02 12:14 [PATCH 0/4] Trivial code cleanup patches Yogesh Hegde
@ 2023-07-02 12:15 ` Yogesh Hegde
  2023-07-02 12:15 ` [PATCH 2/4] staging: rtl8192e: Rename variable targetRATR Yogesh Hegde
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Yogesh Hegde @ 2023-07-02 12:15 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel
  Cc: linux-kernel-mentees, skhan, ivan.orlov0322

Rename variable currentRATR to current_ratr to avoid CamelCase
which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 37c275cac40b..14c78f740366 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -277,7 +277,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 	struct r8192_priv *priv = rtllib_priv(dev);
 	struct rt_hi_throughput *ht_info = priv->rtllib->ht_info;
 	struct rate_adaptive *pra = &priv->rate_adaptive;
-	u32 currentRATR, targetRATR = 0;
+	u32 current_ratr, targetRATR = 0;
 	u32 LowRSSIThreshForRA = 0, HighRSSIThreshForRA = 0;
 	bool bshort_gi_enabled = false;
 	static u8 ping_rssi_state;
@@ -363,8 +363,8 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 		if (priv->rtllib->GetHalfNmodeSupportByAPsHandler(dev))
 			targetRATR &=  0xf00fffff;
 
-		currentRATR = rtl92e_readl(dev, RATR0);
-		if (targetRATR !=  currentRATR) {
+		current_ratr = rtl92e_readl(dev, RATR0);
+		if (targetRATR !=  current_ratr) {
 			u32 ratr_value;
 
 			ratr_value = targetRATR;
-- 
2.34.1


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

* [PATCH 2/4] staging: rtl8192e: Rename variable targetRATR
  2023-07-02 12:14 [PATCH 0/4] Trivial code cleanup patches Yogesh Hegde
  2023-07-02 12:15 ` [PATCH 1/4] staging: rtl8192e: Rename variable currentRATR Yogesh Hegde
@ 2023-07-02 12:15 ` Yogesh Hegde
  2023-07-02 12:16 ` [PATCH 3/4] staging: rtl8192e: Rename variable LowRSSIThreshForRA Yogesh Hegde
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Yogesh Hegde @ 2023-07-02 12:15 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel
  Cc: linux-kernel-mentees, skhan, ivan.orlov0322

Rename variable targetRATR to target_ratr to avoid CamelCase
which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 14c78f740366..a535a63ce9f7 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -277,7 +277,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 	struct r8192_priv *priv = rtllib_priv(dev);
 	struct rt_hi_throughput *ht_info = priv->rtllib->ht_info;
 	struct rate_adaptive *pra = &priv->rate_adaptive;
-	u32 current_ratr, targetRATR = 0;
+	u32 current_ratr, target_ratr = 0;
 	u32 LowRSSIThreshForRA = 0, HighRSSIThreshForRA = 0;
 	bool bshort_gi_enabled = false;
 	static u8 ping_rssi_state;
@@ -335,14 +335,14 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 		if (priv->undecorated_smoothed_pwdb >=
 		    (long)HighRSSIThreshForRA) {
 			pra->ratr_state = DM_RATR_STA_HIGH;
-			targetRATR = pra->upper_rssi_threshold_ratr;
+			target_ratr = pra->upper_rssi_threshold_ratr;
 		} else if (priv->undecorated_smoothed_pwdb >=
 			   (long)LowRSSIThreshForRA) {
 			pra->ratr_state = DM_RATR_STA_MIDDLE;
-			targetRATR = pra->middle_rssi_threshold_ratr;
+			target_ratr = pra->middle_rssi_threshold_ratr;
 		} else {
 			pra->ratr_state = DM_RATR_STA_LOW;
-			targetRATR = pra->low_rssi_threshold_ratr;
+			target_ratr = pra->low_rssi_threshold_ratr;
 		}
 
 		if (pra->ping_rssi_enable) {
@@ -352,7 +352,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 				     (long)pra->ping_rssi_thresh_for_ra) ||
 				    ping_rssi_state) {
 					pra->ratr_state = DM_RATR_STA_LOW;
-					targetRATR = pra->ping_rssi_ratr;
+					target_ratr = pra->ping_rssi_ratr;
 					ping_rssi_state = 1;
 				}
 			} else {
@@ -361,18 +361,18 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 		}
 
 		if (priv->rtllib->GetHalfNmodeSupportByAPsHandler(dev))
-			targetRATR &=  0xf00fffff;
+			target_ratr &=  0xf00fffff;
 
 		current_ratr = rtl92e_readl(dev, RATR0);
-		if (targetRATR !=  current_ratr) {
+		if (target_ratr !=  current_ratr) {
 			u32 ratr_value;
 
-			ratr_value = targetRATR;
+			ratr_value = target_ratr;
 			ratr_value &= ~(RATE_ALL_OFDM_2SS);
 			rtl92e_writel(dev, RATR0, ratr_value);
 			rtl92e_writeb(dev, UFWP, 1);
 
-			pra->last_ratr = targetRATR;
+			pra->last_ratr = target_ratr;
 		}
 
 	} else {
-- 
2.34.1


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

* [PATCH 3/4] staging: rtl8192e: Rename variable LowRSSIThreshForRA
  2023-07-02 12:14 [PATCH 0/4] Trivial code cleanup patches Yogesh Hegde
  2023-07-02 12:15 ` [PATCH 1/4] staging: rtl8192e: Rename variable currentRATR Yogesh Hegde
  2023-07-02 12:15 ` [PATCH 2/4] staging: rtl8192e: Rename variable targetRATR Yogesh Hegde
@ 2023-07-02 12:16 ` Yogesh Hegde
  2023-07-02 12:16 ` [PATCH 4/4] staging: rtl8192e: Rename variable HighRSSIThreshForRA Yogesh Hegde
  2023-07-06 15:30 ` [PATCH 0/4] Trivial code cleanup patches Philipp Hortmann
  4 siblings, 0 replies; 8+ messages in thread
From: Yogesh Hegde @ 2023-07-02 12:16 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel
  Cc: linux-kernel-mentees, skhan, ivan.orlov0322

Rename variable LowRSSIThreshForRA to low_rssi_thresh_for_ra to avoid
CamelCase which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index a535a63ce9f7..d266d2d047ca 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -278,7 +278,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 	struct rt_hi_throughput *ht_info = priv->rtllib->ht_info;
 	struct rate_adaptive *pra = &priv->rate_adaptive;
 	u32 current_ratr, target_ratr = 0;
-	u32 LowRSSIThreshForRA = 0, HighRSSIThreshForRA = 0;
+	u32 low_rssi_thresh_for_ra = 0, HighRSSIThreshForRA = 0;
 	bool bshort_gi_enabled = false;
 	static u8 ping_rssi_state;
 
@@ -320,15 +320,15 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 
 		if (pra->ratr_state == DM_RATR_STA_HIGH) {
 			HighRSSIThreshForRA = pra->high2low_rssi_thresh_for_ra;
-			LowRSSIThreshForRA = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
+			low_rssi_thresh_for_ra = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
 					(pra->low_rssi_thresh_for_ra40M) : (pra->low_rssi_thresh_for_ra20M);
 		} else if (pra->ratr_state == DM_RATR_STA_LOW) {
 			HighRSSIThreshForRA = pra->high_rssi_thresh_for_ra;
-			LowRSSIThreshForRA = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
+			low_rssi_thresh_for_ra = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
 					(pra->low2high_rssi_thresh_for_ra40M) : (pra->low2high_rssi_thresh_for_ra20M);
 		} else {
 			HighRSSIThreshForRA = pra->high_rssi_thresh_for_ra;
-			LowRSSIThreshForRA = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
+			low_rssi_thresh_for_ra = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
 					(pra->low_rssi_thresh_for_ra40M) : (pra->low_rssi_thresh_for_ra20M);
 		}
 
@@ -337,7 +337,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 			pra->ratr_state = DM_RATR_STA_HIGH;
 			target_ratr = pra->upper_rssi_threshold_ratr;
 		} else if (priv->undecorated_smoothed_pwdb >=
-			   (long)LowRSSIThreshForRA) {
+			   (long)low_rssi_thresh_for_ra) {
 			pra->ratr_state = DM_RATR_STA_MIDDLE;
 			target_ratr = pra->middle_rssi_threshold_ratr;
 		} else {
-- 
2.34.1


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

* [PATCH 4/4] staging: rtl8192e: Rename variable HighRSSIThreshForRA
  2023-07-02 12:14 [PATCH 0/4] Trivial code cleanup patches Yogesh Hegde
                   ` (2 preceding siblings ...)
  2023-07-02 12:16 ` [PATCH 3/4] staging: rtl8192e: Rename variable LowRSSIThreshForRA Yogesh Hegde
@ 2023-07-02 12:16 ` Yogesh Hegde
  2023-07-06 15:30 ` [PATCH 0/4] Trivial code cleanup patches Philipp Hortmann
  4 siblings, 0 replies; 8+ messages in thread
From: Yogesh Hegde @ 2023-07-02 12:16 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel
  Cc: linux-kernel-mentees, skhan, ivan.orlov0322

Rename variable HighRSSIThreshForRA to high_rssi_thresh_for_ra to avoid
CamelCase which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index d266d2d047ca..dbf765d601b3 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -278,7 +278,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 	struct rt_hi_throughput *ht_info = priv->rtllib->ht_info;
 	struct rate_adaptive *pra = &priv->rate_adaptive;
 	u32 current_ratr, target_ratr = 0;
-	u32 low_rssi_thresh_for_ra = 0, HighRSSIThreshForRA = 0;
+	u32 low_rssi_thresh_for_ra = 0, high_rssi_thresh_for_ra = 0;
 	bool bshort_gi_enabled = false;
 	static u8 ping_rssi_state;
 
@@ -319,21 +319,21 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
 				((bshort_gi_enabled) ? BIT31 : 0);
 
 		if (pra->ratr_state == DM_RATR_STA_HIGH) {
-			HighRSSIThreshForRA = pra->high2low_rssi_thresh_for_ra;
+			high_rssi_thresh_for_ra = pra->high2low_rssi_thresh_for_ra;
 			low_rssi_thresh_for_ra = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
 					(pra->low_rssi_thresh_for_ra40M) : (pra->low_rssi_thresh_for_ra20M);
 		} else if (pra->ratr_state == DM_RATR_STA_LOW) {
-			HighRSSIThreshForRA = pra->high_rssi_thresh_for_ra;
+			high_rssi_thresh_for_ra = pra->high_rssi_thresh_for_ra;
 			low_rssi_thresh_for_ra = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
 					(pra->low2high_rssi_thresh_for_ra40M) : (pra->low2high_rssi_thresh_for_ra20M);
 		} else {
-			HighRSSIThreshForRA = pra->high_rssi_thresh_for_ra;
+			high_rssi_thresh_for_ra = pra->high_rssi_thresh_for_ra;
 			low_rssi_thresh_for_ra = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
 					(pra->low_rssi_thresh_for_ra40M) : (pra->low_rssi_thresh_for_ra20M);
 		}
 
 		if (priv->undecorated_smoothed_pwdb >=
-		    (long)HighRSSIThreshForRA) {
+		    (long)high_rssi_thresh_for_ra) {
 			pra->ratr_state = DM_RATR_STA_HIGH;
 			target_ratr = pra->upper_rssi_threshold_ratr;
 		} else if (priv->undecorated_smoothed_pwdb >=
-- 
2.34.1


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

* Re: [PATCH 0/4] Trivial code cleanup patches
  2023-07-02 12:14 [PATCH 0/4] Trivial code cleanup patches Yogesh Hegde
                   ` (3 preceding siblings ...)
  2023-07-02 12:16 ` [PATCH 4/4] staging: rtl8192e: Rename variable HighRSSIThreshForRA Yogesh Hegde
@ 2023-07-06 15:30 ` Philipp Hortmann
  2023-07-08  6:42   ` Yogesh Hegde
  4 siblings, 1 reply; 8+ messages in thread
From: Philipp Hortmann @ 2023-07-06 15:30 UTC (permalink / raw)
  To: Yogesh Hegde, gregkh, linux-staging, linux-kernel
  Cc: linux-kernel-mentees, skhan, ivan.orlov0322

On 7/2/23 14:14, Yogesh Hegde wrote:
> Rename variables in function _rtl92e_dm_check_rate_adaptive
> to avoid checkpatch complains.
> 
> The patches are required to be applied in sequence.
> 
> Yogesh Hegde (4):
>    staging: rtl8192e: Rename variable currentRATR
>    staging: rtl8192e: Rename variable targetRATR
>    staging: rtl8192e: Rename variable LowRSSIThreshForRA
>    staging: rtl8192e: Rename variable HighRSSIThreshForRA
> 
>   drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 38 +++++++++++-----------
>   1 file changed, 19 insertions(+), 19 deletions(-)
> 

Please use the "staging: rtl8192e:" also for the cover letter in the 
subject for the next patch series you are sending.



Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>



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

* Re: [PATCH 0/4] Trivial code cleanup patches
  2023-07-06 15:30 ` [PATCH 0/4] Trivial code cleanup patches Philipp Hortmann
@ 2023-07-08  6:42   ` Yogesh Hegde
  0 siblings, 0 replies; 8+ messages in thread
From: Yogesh Hegde @ 2023-07-08  6:42 UTC (permalink / raw)
  To: Philipp Hortmann
  Cc: gregkh, linux-staging, linux-kernel, linux-kernel-mentees, skhan,
	ivan.orlov0322

On Thu, Jul 06, 2023 at 05:30:27PM +0200, Philipp Hortmann wrote:
> On 7/2/23 14:14, Yogesh Hegde wrote:
> > Rename variables in function _rtl92e_dm_check_rate_adaptive
> > to avoid checkpatch complains.
> > 
> > The patches are required to be applied in sequence.
> > 
> > Yogesh Hegde (4):
> >    staging: rtl8192e: Rename variable currentRATR
> >    staging: rtl8192e: Rename variable targetRATR
> >    staging: rtl8192e: Rename variable LowRSSIThreshForRA
> >    staging: rtl8192e: Rename variable HighRSSIThreshForRA
> > 
> >   drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 38 +++++++++++-----------
> >   1 file changed, 19 insertions(+), 19 deletions(-)
> > 
> 
> Please use the "staging: rtl8192e:" also for the cover letter in the subject
> for the next patch series you are sending.
Ack. Will keep in mind for next patch series. 
> 
> 
> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>

Thanks 
Yogesh 

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

end of thread, other threads:[~2023-07-08  6:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-02 12:14 [PATCH 0/4] Trivial code cleanup patches Yogesh Hegde
2023-07-02 12:15 ` [PATCH 1/4] staging: rtl8192e: Rename variable currentRATR Yogesh Hegde
2023-07-02 12:15 ` [PATCH 2/4] staging: rtl8192e: Rename variable targetRATR Yogesh Hegde
2023-07-02 12:16 ` [PATCH 3/4] staging: rtl8192e: Rename variable LowRSSIThreshForRA Yogesh Hegde
2023-07-02 12:16 ` [PATCH 4/4] staging: rtl8192e: Rename variable HighRSSIThreshForRA Yogesh Hegde
2023-07-06 15:30 ` [PATCH 0/4] Trivial code cleanup patches Philipp Hortmann
2023-07-08  6:42   ` Yogesh Hegde
  -- strict thread matches above, loose matches on Subject: below --
2023-05-28 14:51 Yogesh Hegde

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