linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h
@ 2022-10-10 19:04 Dragan Cvetic
  2022-10-10 19:04 ` [PATCH 1/3] staging: rtl8192e: Rename CurSTAConnectState and PreSTAConnectState Dragan Cvetic
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dragan Cvetic @ 2022-10-10 19:04 UTC (permalink / raw)
  To: philipp.g.hortmann; +Cc: linux-staging, linux-kernel, Dragan Cvetic

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

No test performed on HW, just build.

Dragan Cvetic (3):
  staging: rtl8192e: Rename CurSTAConnectState and PreSTAConnectState
  staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF
  staging: rtl8192e: Rename Op, Length and Value

 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 48 +++++++++++-----------
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 16 ++++----
 2 files changed, 32 insertions(+), 32 deletions(-)

-- 
2.25.1


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

* [PATCH 1/3] staging: rtl8192e: Rename CurSTAConnectState and PreSTAConnectState
  2022-10-10 19:04 [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h Dragan Cvetic
@ 2022-10-10 19:04 ` Dragan Cvetic
  2022-10-10 19:04 ` [PATCH 2/3] staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF Dragan Cvetic
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Dragan Cvetic @ 2022-10-10 19:04 UTC (permalink / raw)
  To: philipp.g.hortmann; +Cc: linux-staging, linux-kernel, Dragan Cvetic

Rename variable CurSTAConnectState to cur_sta_connect_state,
PreSTAConnectState to pre_sta_connect_state to avoid CamelCase
which is not accepted by checkpatch.

Signed-off-by: Dragan Cvetic <dragan.m.cvetic@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 22 +++++++++++-----------
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.h |  4 ++--
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index f4f7820ad35d..3e7affb3f812 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -1138,8 +1138,8 @@ static void _rtl92e_dm_dig_init(struct net_device *dev)
 
 	dm_digtable.dig_state		= DM_STA_DIG_MAX;
 	dm_digtable.dig_highpwr_state	= DM_STA_DIG_MAX;
-	dm_digtable.CurSTAConnectState = DIG_STA_DISCONNECT;
-	dm_digtable.PreSTAConnectState = DIG_STA_DISCONNECT;
+	dm_digtable.cur_sta_connect_state = DIG_STA_DISCONNECT;
+	dm_digtable.pre_sta_connect_state = DIG_STA_DISCONNECT;
 
 	dm_digtable.rssi_low_thresh	= DM_DIG_THRESH_LOW;
 	dm_digtable.rssi_high_thresh	= DM_DIG_THRESH_HIGH;
@@ -1207,9 +1207,9 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev)
 	}
 
 	if (priv->rtllib->state == RTLLIB_LINKED)
-		dm_digtable.CurSTAConnectState = DIG_STA_CONNECT;
+		dm_digtable.cur_sta_connect_state = DIG_STA_CONNECT;
 	else
-		dm_digtable.CurSTAConnectState = DIG_STA_DISCONNECT;
+		dm_digtable.cur_sta_connect_state = DIG_STA_DISCONNECT;
 
 
 	dm_digtable.rssi_val = priv->undecorated_smoothed_pwdb;
@@ -1218,7 +1218,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev)
 	_rtl92e_dm_cs_ratio(dev);
 	if (dm_digtable.dig_algorithm_switch)
 		dm_digtable.dig_algorithm_switch = 0;
-	dm_digtable.PreSTAConnectState = dm_digtable.CurSTAConnectState;
+	dm_digtable.pre_sta_connect_state = dm_digtable.cur_sta_connect_state;
 
 }
 
@@ -1368,8 +1368,8 @@ static void _rtl92e_dm_initial_gain(struct net_device *dev)
 		return;
 	}
 
-	if (dm_digtable.PreSTAConnectState == dm_digtable.CurSTAConnectState) {
-		if (dm_digtable.CurSTAConnectState == DIG_STA_CONNECT) {
+	if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) {
+		if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) {
 			long gain_range = dm_digtable.rssi_val + 10 -
 					  dm_digtable.backoff_val;
 			gain_range = clamp_t(long, gain_range,
@@ -1419,8 +1419,8 @@ static void _rtl92e_dm_pd_th(struct net_device *dev)
 		reset_cnt = 0;
 	}
 
-	if (dm_digtable.PreSTAConnectState == dm_digtable.CurSTAConnectState) {
-		if (dm_digtable.CurSTAConnectState == DIG_STA_CONNECT) {
+	if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) {
+		if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) {
 			if (dm_digtable.rssi_val >=
 			    dm_digtable.rssi_high_power_highthresh)
 				dm_digtable.curpd_thstate =
@@ -1487,8 +1487,8 @@ static void _rtl92e_dm_cs_ratio(struct net_device *dev)
 		reset_cnt = 0;
 	}
 
-	if (dm_digtable.PreSTAConnectState == dm_digtable.CurSTAConnectState) {
-		if (dm_digtable.CurSTAConnectState == DIG_STA_CONNECT) {
+	if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) {
+		if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) {
 			if (dm_digtable.rssi_val <= dm_digtable.rssi_low_thresh)
 				dm_digtable.curcs_ratio_state = DIG_CS_RATIO_LOWER;
 			else if (dm_digtable.rssi_val >= dm_digtable.rssi_high_thresh)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 9fadb1ea231c..daabe21da5b7 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -66,8 +66,8 @@ struct dig_t {
 
 	u8		dig_state;
 	u8		dig_highpwr_state;
-	u8		CurSTAConnectState;
-	u8		PreSTAConnectState;
+	u8		cur_sta_connect_state;
+	u8		pre_sta_connect_state;
 
 	u8		curpd_thstate;
 	u8		prepd_thstate;
-- 
2.25.1


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

* [PATCH 2/3] staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF
  2022-10-10 19:04 [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h Dragan Cvetic
  2022-10-10 19:04 ` [PATCH 1/3] staging: rtl8192e: Rename CurSTAConnectState and PreSTAConnectState Dragan Cvetic
@ 2022-10-10 19:04 ` Dragan Cvetic
  2022-10-20 15:32   ` Greg KH
  2022-10-10 19:04 ` [PATCH 3/3] staging: rtl8192e: Rename Op, Length and Value Dragan Cvetic
  2022-10-11 19:51 ` [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h Philipp Hortmann
  3 siblings, 1 reply; 6+ messages in thread
From: Dragan Cvetic @ 2022-10-10 19:04 UTC (permalink / raw)
  To: philipp.g.hortmann; +Cc: linux-staging, linux-kernel, Dragan Cvetic

Rename variable Enable to enable, cck_Rx_path to cck_rx_path and
disabledRF to disabled_rf to avoid CamelCase which is not accepted
by checkpatch.

Signed-off-by: Dragan Cvetic <dragan.m.cvetic@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 20 ++++++++++----------
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.h |  6 +++---
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 3e7affb3f812..24d97bd5f821 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -1722,7 +1722,7 @@ void rtl92e_dm_rf_pathcheck_wq(void *data)
 		else
 			priv->brfpath_rxenable[i] = false;
 	}
-	if (!DM_RxPathSelTable.Enable)
+	if (!DM_RxPathSelTable.enable)
 		return;
 
 	_rtl92e_dm_rx_path_sel_byrssi(dev);
@@ -1733,14 +1733,14 @@ static void _rtl92e_dm_init_rx_path_selection(struct net_device *dev)
 	u8 i;
 	struct r8192_priv *priv = rtllib_priv(dev);
 
-	DM_RxPathSelTable.Enable = 1;
+	DM_RxPathSelTable.enable = 1;
 	DM_RxPathSelTable.SS_TH_low = RX_PATH_SELECTION_SS_TH_LOW;
 	DM_RxPathSelTable.diff_TH = RX_PATH_SELECTION_DIFF_TH;
 	if (priv->CustomerID == RT_CID_819x_Netcore)
 		DM_RxPathSelTable.cck_method = CCK_Rx_Version_2;
 	else
 		DM_RxPathSelTable.cck_method = CCK_Rx_Version_1;
-	DM_RxPathSelTable.disabledRF = 0;
+	DM_RxPathSelTable.disabled_rf = 0;
 	for (i = 0; i < 4; i++) {
 		DM_RxPathSelTable.rf_rssi[i] = 50;
 		DM_RxPathSelTable.cck_pwdb_sta[i] = -64;
@@ -1771,12 +1771,12 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev)
 		return;
 
 	if (!cck_Rx_Path_initialized) {
-		DM_RxPathSelTable.cck_Rx_path = (rtl92e_readb(dev, 0xa07)&0xf);
+		DM_RxPathSelTable.cck_rx_path = (rtl92e_readb(dev, 0xa07)&0xf);
 		cck_Rx_Path_initialized = 1;
 	}
 
-	DM_RxPathSelTable.disabledRF = 0xf;
-	DM_RxPathSelTable.disabledRF &= ~(rtl92e_readb(dev, 0xc04));
+	DM_RxPathSelTable.disabled_rf = 0xf;
+	DM_RxPathSelTable.disabled_rf &= ~(rtl92e_readb(dev, 0xc04));
 
 	if (priv->rtllib->mode == WIRELESS_MODE_B)
 		DM_RxPathSelTable.cck_method = CCK_Rx_Version_2;
@@ -1923,15 +1923,15 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev)
 	}
 
 	if (update_cck_rx_path) {
-		DM_RxPathSelTable.cck_Rx_path = (cck_default_Rx<<2) |
+		DM_RxPathSelTable.cck_rx_path = (cck_default_Rx<<2) |
 						(cck_optional_Rx);
 		rtl92e_set_bb_reg(dev, rCCK0_AFESetting, 0x0f000000,
-				  DM_RxPathSelTable.cck_Rx_path);
+				  DM_RxPathSelTable.cck_rx_path);
 	}
 
-	if (DM_RxPathSelTable.disabledRF) {
+	if (DM_RxPathSelTable.disabled_rf) {
 		for (i = 0; i < 4; i++) {
-			if ((DM_RxPathSelTable.disabledRF>>i) & 0x1) {
+			if ((DM_RxPathSelTable.disabled_rf>>i) & 0x1) {
 				if (tmp_max_rssi >=
 				    DM_RxPathSelTable.rf_enable_rssi_th[i]) {
 					rtl92e_set_bb_reg(dev,
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index daabe21da5b7..4eabc313d71e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -130,13 +130,13 @@ enum dm_dig_cs_ratio {
 };
 
 struct drx_path_sel {
-	u8		Enable;
+	u8		enable;
 	u8		cck_method;
-	u8		cck_Rx_path;
+	u8		cck_rx_path;
 
 	u8		SS_TH_low;
 	u8		diff_TH;
-	u8		disabledRF;
+	u8		disabled_rf;
 	u8		reserved;
 
 	u8		rf_rssi[4];
-- 
2.25.1


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

* [PATCH 3/3] staging: rtl8192e: Rename Op, Length and Value
  2022-10-10 19:04 [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h Dragan Cvetic
  2022-10-10 19:04 ` [PATCH 1/3] staging: rtl8192e: Rename CurSTAConnectState and PreSTAConnectState Dragan Cvetic
  2022-10-10 19:04 ` [PATCH 2/3] staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF Dragan Cvetic
@ 2022-10-10 19:04 ` Dragan Cvetic
  2022-10-11 19:51 ` [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h Philipp Hortmann
  3 siblings, 0 replies; 6+ messages in thread
From: Dragan Cvetic @ 2022-10-10 19:04 UTC (permalink / raw)
  To: philipp.g.hortmann; +Cc: linux-staging, linux-kernel, Dragan Cvetic

Rename variable Op to op, Length to length and Value to value to avoid
CamelCase which is not accepted by checkpatch.

Signed-off-by: Dragan Cvetic <dragan.m.cvetic@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 6 +++---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 24d97bd5f821..68fe5b16dc39 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -628,9 +628,9 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
 
 	for (j = 0; j <= 30; j++) {
 
-		tx_cmd.Op		= TXCMD_SET_TX_PWR_TRACKING;
-		tx_cmd.Length	= 4;
-		tx_cmd.Value		= Value;
+		tx_cmd.op	= TXCMD_SET_TX_PWR_TRACKING;
+		tx_cmd.length	= 4;
+		tx_cmd.value	= Value;
 		rtl92e_send_cmd_pkt(dev, DESC_PACKET_TYPE_NORMAL, (u8 *)&tx_cmd,
 				    sizeof(struct dcmd_txcmd));
 		mdelay(1);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 4eabc313d71e..65df7fa03214 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -152,9 +152,9 @@ enum dm_cck_rx_path_method {
 
 
 struct dcmd_txcmd {
-	u32	Op;
-	u32	Length;
-	u32	Value;
+	u32	op;
+	u32	length;
+	u32	value;
 };
 /*------------------------------Define structure----------------------------*/
 
-- 
2.25.1


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

* Re: [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h
  2022-10-10 19:04 [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h Dragan Cvetic
                   ` (2 preceding siblings ...)
  2022-10-10 19:04 ` [PATCH 3/3] staging: rtl8192e: Rename Op, Length and Value Dragan Cvetic
@ 2022-10-11 19:51 ` Philipp Hortmann
  3 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2022-10-11 19:51 UTC (permalink / raw)
  To: Dragan Cvetic; +Cc: linux-staging, linux-kernel

On 10/10/22 21:04, Dragan Cvetic wrote:
> Rename variables to avoid CamelCase which is not accepted by checkpatch.
> 
> No test performed on HW, just build.
> 
> Dragan Cvetic (3):
>    staging: rtl8192e: Rename CurSTAConnectState and PreSTAConnectState
>    staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF
>    staging: rtl8192e: Rename Op, Length and Value
> 
>   drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 48 +++++++++++-----------
>   drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 16 ++++----
>   2 files changed, 32 insertions(+), 32 deletions(-)
> 

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

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

* Re: [PATCH 2/3] staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF
  2022-10-10 19:04 ` [PATCH 2/3] staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF Dragan Cvetic
@ 2022-10-20 15:32   ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2022-10-20 15:32 UTC (permalink / raw)
  To: Dragan Cvetic; +Cc: philipp.g.hortmann, linux-staging, linux-kernel

On Mon, Oct 10, 2022 at 08:04:56PM +0100, Dragan Cvetic wrote:
> Rename variable Enable to enable, cck_Rx_path to cck_rx_path and
> disabledRF to disabled_rf to avoid CamelCase which is not accepted
> by checkpatch.
> 
> Signed-off-by: Dragan Cvetic <dragan.m.cvetic@gmail.com>
> ---
>  drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 20 ++++++++++----------
>  drivers/staging/rtl8192e/rtl8192e/rtl_dm.h |  6 +++---
>  2 files changed, 13 insertions(+), 13 deletions(-)

This change did not apply to my tree.

Please rebase and resend.

thanks,

greg k-h

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

end of thread, other threads:[~2022-10-20 15:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 19:04 [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h Dragan Cvetic
2022-10-10 19:04 ` [PATCH 1/3] staging: rtl8192e: Rename CurSTAConnectState and PreSTAConnectState Dragan Cvetic
2022-10-10 19:04 ` [PATCH 2/3] staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF Dragan Cvetic
2022-10-20 15:32   ` Greg KH
2022-10-10 19:04 ` [PATCH 3/3] staging: rtl8192e: Rename Op, Length and Value Dragan Cvetic
2022-10-11 19:51 ` [PATCH 0/3] staging: r8192e: Rename variables in rtl_dm.h Philipp Hortmann

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