[v2] staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF

Message ID 20221022151506.63725-1-dragan.m.cvetic@gmail.com
State New
Headers
Series [v2] staging: rtl8192e: Rename Enable, cck_Rx_path and disabledRF |

Commit Message

Dragan Cvetic Oct. 22, 2022, 3:15 p.m. UTC
  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>
---
v1 -> v2: Rebase to latest version to avoid merge conflicts.
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 20 ++++++++++----------
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.h |  6 +++---
 2 files changed, 13 insertions(+), 13 deletions(-)
  

Comments

Greg KH Oct. 23, 2022, 3:41 p.m. UTC | #1
On Sat, Oct 22, 2022 at 04:15:06PM +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>

Any reason you didn't cc: the staging tree maintainer?  :(

Anyway, this changelog is confusing, you just list some random variable
names that you have changed, without any explaining what ties them
together.

The code itself gives you a clue:

>  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];


Ah, you are fixing up the drx_path_sel structure.

But just some of the fields, not all of them, odd.

Please redo this and make the changelog more descriptive of what you are
doing, as well as the subject line (don't need the variable names in
there.)

Also do it for all the fields in the structure, not just 3 random ones.

thanks,

greg k-h
  

Patch

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index c9e495538e2c..4a65868270a4 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 = RxPathSelection_SS_TH_low;
 	DM_RxPathSelTable.diff_TH = RxPathSelection_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 1d4d7d98a859..5f210eb375fd 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];