public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Whitmore <johnfwhitmore@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	John Whitmore <johnfwhitmore@gmail.com>
Subject: [PATCH 06/20] staging:rtl8192u: Rename Rx_Smooth_Factor - Style
Date: Sat,  1 Sep 2018 00:02:36 +0100	[thread overview]
Message-ID: <20180831230250.16810-7-johnfwhitmore@gmail.com> (raw)
In-Reply-To: <20180831230250.16810-1-johnfwhitmore@gmail.com>

Rename the MACRO Rx_Smooth_Factor to RX_SMOOTH_FACTOR, this clears the
checkpatch issue with CamelCase naming.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r8192U.h      |  2 +-
 drivers/staging/rtl8192u/r8192U_core.c | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 81a7072a6285..b5ad69af8dac 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -45,7 +45,7 @@
 #define MAX_KEY_LEN     61
 #define KEY_BUF_SIZE    5
 
-#define	Rx_Smooth_Factor		20
+#define	RX_SMOOTH_FACTOR		20
 #define DMESG(x, a...)
 #define DMESGW(x, a...)
 #define DMESGE(x, a...)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index b3d32ea29fee..dd87cee6604b 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3975,13 +3975,13 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 					pprevious_stats->RxMIMOSignalStrength[rfpath];
 			if (pprevious_stats->RxMIMOSignalStrength[rfpath]  > priv->stats.rx_rssi_percentage[rfpath]) {
 				priv->stats.rx_rssi_percentage[rfpath] =
-					((priv->stats.rx_rssi_percentage[rfpath] * (Rx_Smooth_Factor - 1)) +
-					 (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor);
+					((priv->stats.rx_rssi_percentage[rfpath] * (RX_SMOOTH_FACTOR - 1)) +
+					 (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (RX_SMOOTH_FACTOR);
 				priv->stats.rx_rssi_percentage[rfpath] = priv->stats.rx_rssi_percentage[rfpath]  + 1;
 			} else {
 				priv->stats.rx_rssi_percentage[rfpath] =
-					((priv->stats.rx_rssi_percentage[rfpath] * (Rx_Smooth_Factor - 1)) +
-					 (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor);
+					((priv->stats.rx_rssi_percentage[rfpath] * (RX_SMOOTH_FACTOR - 1)) +
+					 (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (RX_SMOOTH_FACTOR);
 			}
 			RT_TRACE(COMP_DBG,
 				 "priv->stats.rx_rssi_percentage[rfPath]  = %d\n",
@@ -4026,13 +4026,13 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 				pprevious_stats->RxPWDBAll;
 		if (pprevious_stats->RxPWDBAll > (u32)priv->undecorated_smoothed_pwdb) {
 			priv->undecorated_smoothed_pwdb =
-				(((priv->undecorated_smoothed_pwdb) * (Rx_Smooth_Factor - 1)) +
-				 (pprevious_stats->RxPWDBAll)) / (Rx_Smooth_Factor);
+				(((priv->undecorated_smoothed_pwdb) * (RX_SMOOTH_FACTOR - 1)) +
+				 (pprevious_stats->RxPWDBAll)) / (RX_SMOOTH_FACTOR);
 			priv->undecorated_smoothed_pwdb = priv->undecorated_smoothed_pwdb + 1;
 		} else {
 			priv->undecorated_smoothed_pwdb =
-				(((priv->undecorated_smoothed_pwdb) * (Rx_Smooth_Factor - 1)) +
-				 (pprevious_stats->RxPWDBAll)) / (Rx_Smooth_Factor);
+				(((priv->undecorated_smoothed_pwdb) * (RX_SMOOTH_FACTOR - 1)) +
+				 (pprevious_stats->RxPWDBAll)) / (RX_SMOOTH_FACTOR);
 		}
 	}
 
@@ -4075,8 +4075,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 					if (priv->stats.rx_evm_percentage[nspatial_stream] == 0) /* initialize */
 						priv->stats.rx_evm_percentage[nspatial_stream] = pprevious_stats->RxMIMOSignalQuality[nspatial_stream];
 					priv->stats.rx_evm_percentage[nspatial_stream] =
-						((priv->stats.rx_evm_percentage[nspatial_stream] * (Rx_Smooth_Factor - 1)) +
-						 (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] * 1)) / (Rx_Smooth_Factor);
+						((priv->stats.rx_evm_percentage[nspatial_stream] * (RX_SMOOTH_FACTOR - 1)) +
+						 (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] * 1)) / (RX_SMOOTH_FACTOR);
 				}
 			}
 		}
-- 
2.18.0


  parent reply	other threads:[~2018-08-31 23:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
2018-08-31 23:02 ` [PATCH 01/20] staging:rtl8192u: Remove write_cam() " John Whitmore
2018-08-31 23:02 ` [PATCH 02/20] staging:rtl8192u: Remove read_cam() " John Whitmore
2018-08-31 23:02 ` [PATCH 03/20] staging:rtl8192u: Remove unused functions " John Whitmore
2018-08-31 23:02 ` [PATCH 04/20] staging:rtl8192u: Add SPDX-License-Identifier " John Whitmore
2018-08-31 23:02 ` [PATCH 05/20] staging:rtl8192u: Rename RTL819xU_MODULE_NAME " John Whitmore
2018-08-31 23:02 ` John Whitmore [this message]
2018-08-31 23:02 ` [PATCH 07/20] staging:rtl8192u: Refactor RT_TRACE " John Whitmore
2018-08-31 23:02 ` [PATCH 08/20] staging:rtl8192u: Fix space characters " John Whitmore
2018-08-31 23:02 ` [PATCH 09/20] staging:rtl8192u: Remove RT_DEBUG_DATA " John Whitmore
2018-08-31 23:02 ` [PATCH 10/20] staging:rtl8192u: Rename PHY_Beacon_RSSI_SLID_WIN_MAX " John Whitmore
2018-08-31 23:02 ` [PATCH 11/20] staging:rtl8192u: Rename OFDM_Table_Length " John Whitmore
2018-08-31 23:02 ` [PATCH 12/20] staging:rtl8192u: Rename CCK_Table_length " John Whitmore
2018-08-31 23:02 ` [PATCH 13/20] staging:rtl8192u: Rename PktSize Style John Whitmore
2018-08-31 23:02 ` [PATCH 14/20] staging:rtl8192u: Rename Offset - Style John Whitmore
2018-08-31 23:02 ` [PATCH 15/20] staging:rtl8192u: Rename Reserved... structure members " John Whitmore
2018-08-31 23:02 ` [PATCH 16/20] staging:rtl8192u: Rename CmdInit " John Whitmore
2018-08-31 23:02 ` [PATCH 17/20] staging:rtl8192u: Rename LastSeg " John Whitmore
2018-08-31 23:02 ` [PATCH 18/20] staging:rtl8192u: Rename FirstSeg " John Whitmore
2018-09-10 15:10   ` Greg KH
2018-08-31 23:02 ` [PATCH 19/20] staging:rtl8192u: Rename LINIP " John Whitmore
2018-09-10 15:09   ` Greg KH
2018-08-31 23:02 ` [PATCH 20/20] staging:rtl8192u: Rename OWN " John Whitmore
2018-09-10 15:09   ` Greg KH
2018-09-11 21:49     ` John Whitmore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180831230250.16810-7-johnfwhitmore@gmail.com \
    --to=johnfwhitmore@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox