linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style
@ 2018-08-31 23:02 John Whitmore
  2018-08-31 23:02 ` [PATCH 01/20] staging:rtl8192u: Remove write_cam() " John Whitmore
                   ` (19 more replies)
  0 siblings, 20 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Yet another series of patchs to cleanup and clear some checkpatch
isses, this time the file r8192U.h. These are all simple changes
which are mostly renaming variables. A MACRO has been removed as
it's not used in the code, and added SPDX-License-Identifier.

John Whitmore (20):
  staging:rtl8192u: Remove write_cam() - Style
  staging:rtl8192u: Remove read_cam() - Style
  staging:rtl8192u: Remove unused functions - Style
  staging:rtl8192u: Add SPDX-License-Identifier - Style
  staging:rtl8192u: Rename RTL819xU_MODULE_NAME - Style
  staging:rtl8192u: Rename Rx_Smooth_Factor - Style
  staging:rtl8192u: Refactor RT_TRACE - Style
  staging:rtl8192u: Fix space characters - Style
  staging:rtl8192u: Remove RT_DEBUG_DATA - Style
  staging:rtl8192u: Rename PHY_Beacon_RSSI_SLID_WIN_MAX - Style
  staging:rtl8192u: Rename OFDM_Table_Length - Style
  staging:rtl8192u: Rename CCK_Table_length - Style
  staging:rtl8192u: Rename PktSize Style
  staging:rtl8192u: Rename Offset - Style
  staging:rtl8192u: Rename Reserved... structure members - Style
  staging:rtl8192u: Rename CmdInit - Style
  staging:rtl8192u: Rename LastSeg - Style
  staging:rtl8192u: Rename FirstSeg - Style
  staging:rtl8192u: Rename LINIP - Style
  staging:rtl8192u: Rename OWN - Style

 drivers/staging/rtl8192u/r8192U.h      | 82 ++++++++------------------
 drivers/staging/rtl8192u/r8192U_core.c | 67 +++++++--------------
 drivers/staging/rtl8192u/r8192U_dm.c   | 22 +++----
 3 files changed, 58 insertions(+), 113 deletions(-)

-- 
2.18.0


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

* [PATCH 01/20] staging:rtl8192u: Remove write_cam() - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 02/20] staging:rtl8192u: Remove read_cam() " John Whitmore
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove the function write_cam() as it is unused.

Simple style change which should not impact runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 1b51601df1ee..77324a471de1 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -1092,7 +1092,6 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb);
 short rtl8192_tx(struct net_device *dev, struct sk_buff *skb);
 
 u32 read_cam(struct net_device *dev, u8 addr);
-void write_cam(struct net_device *dev, u8 addr, u32 data);
 
 int read_nic_byte(struct net_device *dev, int x, u8 *data);
 int read_nic_byte_E(struct net_device *dev, int x, u8 *data);
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 6b22aaa40ff9..caa618a845df 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -237,13 +237,6 @@ static void CamResetAllEntry(struct net_device *dev)
 	write_nic_dword(dev, RWCAM, ulcommand);
 }
 
-
-void write_cam(struct net_device *dev, u8 addr, u32 data)
-{
-	write_nic_dword(dev, WCAMI, data);
-	write_nic_dword(dev, RWCAM, BIT(31) | BIT(16) | (addr & 0xff));
-}
-
 u32 read_cam(struct net_device *dev, u8 addr)
 {
 	u32 data;
-- 
2.18.0


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

* [PATCH 02/20] staging:rtl8192u: Remove read_cam() - Style
  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 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 03/20] staging:rtl8192u: Remove unused functions " John Whitmore
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove the function read_cam(), as it is unused in code.

Simple style change which should not impact runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 77324a471de1..70bbd1fadcca 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -1091,8 +1091,6 @@ bool init_firmware(struct net_device *dev);
 short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb);
 short rtl8192_tx(struct net_device *dev, struct sk_buff *skb);
 
-u32 read_cam(struct net_device *dev, u8 addr);
-
 int read_nic_byte(struct net_device *dev, int x, u8 *data);
 int read_nic_byte_E(struct net_device *dev, int x, u8 *data);
 int read_nic_dword(struct net_device *dev, int x, u32 *data);
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index caa618a845df..12783b88eb58 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -237,15 +237,6 @@ static void CamResetAllEntry(struct net_device *dev)
 	write_nic_dword(dev, RWCAM, ulcommand);
 }
 
-u32 read_cam(struct net_device *dev, u8 addr)
-{
-	u32 data;
-
-	write_nic_dword(dev, RWCAM, 0x80000000 | (addr & 0xff));
-	read_nic_dword(dev, 0xa8, &data);
-	return data;
-}
-
 int write_nic_byte_E(struct net_device *dev, int indx, u8 data)
 {
 	int status;
-- 
2.18.0


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

* [PATCH 03/20] staging:rtl8192u: Remove unused functions - Style
  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 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 04/20] staging:rtl8192u: Add SPDX-License-Identifier " John Whitmore
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove unused function declarations. 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      | 10 ----------
 drivers/staging/rtl8192u/r8192U_core.c |  7 -------
 2 files changed, 17 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 70bbd1fadcca..b3e6ce2acedb 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -1103,22 +1103,12 @@ void force_pci_posting(struct net_device *dev);
 
 void rtl8192_rtx_disable(struct net_device *dev);
 void rtl8192_rx_enable(struct net_device *dev);
-void rtl8192_tx_enable(struct net_device *dev);
 
-void rtl8192_disassociate(struct net_device *dev);
-void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a);
-
-void rtl8192_set_anaparam(struct net_device *dev, u32 a);
-void rtl8185_set_anaparam2(struct net_device *dev, u32 a);
 void rtl8192_update_msr(struct net_device *dev);
 int rtl8192_down(struct net_device *dev);
 int rtl8192_up(struct net_device *dev);
 void rtl8192_commit(struct net_device *dev);
 void rtl8192_set_chan(struct net_device *dev, short ch);
-void write_phy(struct net_device *dev, u8 adr, u8 data);
-void write_phy_cck(struct net_device *dev, u8 adr, u32 data);
-void write_phy_ofdm(struct net_device *dev, u8 adr, u32 data);
-void rtl8185_tx_antenna(struct net_device *dev, u8 ant);
 void rtl8192_set_rxconf(struct net_device *dev);
 void rtl819xusb_beacon_tx(struct net_device *dev, u16 tx_rate);
 
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 12783b88eb58..98bb40c50f40 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -830,13 +830,6 @@ void rtl8192_rx_enable(struct net_device *dev)
 	rtl8192_rx_initiate(dev);
 }
 
-
-void rtl8192_tx_enable(struct net_device *dev)
-{
-}
-
-
-
 void rtl8192_rtx_disable(struct net_device *dev)
 {
 	u8 cmd;
-- 
2.18.0


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

* [PATCH 04/20] staging:rtl8192u: Add SPDX-License-Identifier - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (2 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 03/20] staging:rtl8192u: Remove unused functions " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 05/20] staging:rtl8192u: Rename RTL819xU_MODULE_NAME " John Whitmore
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Add SPDX-License-Identifier tag to the start of header file. 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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index b3e6ce2acedb..4dcfcb4d3911 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is part of rtl8187 OpenSource driver.
  * Copyright (C) Andrea Merello 2004-2005  <andrea.merello@gmail.com>
-- 
2.18.0


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

* [PATCH 05/20] staging:rtl8192u: Rename RTL819xU_MODULE_NAME - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (3 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 04/20] staging:rtl8192u: Add SPDX-License-Identifier " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 06/20] staging:rtl8192u: Rename Rx_Smooth_Factor " John Whitmore
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the MACRO RTL819xU_MODULE_NAME to RTL819XU_MODULE_NAME, 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 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 4dcfcb4d3911..81a7072a6285 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -40,7 +40,7 @@
 #include "ieee80211/ieee80211.h"
 
 #define RTL8192U
-#define RTL819xU_MODULE_NAME "rtl819xU"
+#define RTL819XU_MODULE_NAME "rtl819xU"
 /* HW security */
 #define MAX_KEY_LEN     61
 #define KEY_BUF_SIZE    5
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 98bb40c50f40..b3d32ea29fee 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -128,7 +128,7 @@ static void rtl8192_usb_disconnect(struct usb_interface *intf);
 
 
 static struct usb_driver rtl8192_usb_driver = {
-	.name		= RTL819xU_MODULE_NAME,		  /* Driver name   */
+	.name		= RTL819XU_MODULE_NAME,		  /* Driver name   */
 	.id_table	= rtl8192_usb_id_tbl,		  /* PCI_ID table  */
 	.probe		= rtl8192_usb_probe,		  /* probe fn      */
 	.disconnect	= rtl8192_usb_disconnect,	  /* remove fn     */
@@ -627,7 +627,7 @@ static int __maybe_unused proc_get_stats_rx(struct seq_file *m, void *v)
 static void rtl8192_proc_module_init(void)
 {
 	RT_TRACE(COMP_INIT, "Initializing proc filesystem");
-	rtl8192_proc = proc_mkdir(RTL819xU_MODULE_NAME, init_net.proc_net);
+	rtl8192_proc = proc_mkdir(RTL819XU_MODULE_NAME, init_net.proc_net);
 }
 
 static void rtl8192_proc_init_one(struct net_device *dev)
-- 
2.18.0


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

* [PATCH 06/20] staging:rtl8192u: Rename Rx_Smooth_Factor - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (4 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 05/20] staging:rtl8192u: Rename RTL819xU_MODULE_NAME " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 07/20] staging:rtl8192u: Refactor RT_TRACE " John Whitmore
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

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


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

* [PATCH 07/20] staging:rtl8192u: Refactor RT_TRACE - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (5 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 06/20] staging:rtl8192u: Rename Rx_Smooth_Factor " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 08/20] staging:rtl8192u: Fix space characters " John Whitmore
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Refactor the MACRO RT_TRACE to add parentheses around the parameter
'component', this clears the checkpatch warning with respect to
precedence issues.

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 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index b5ad69af8dac..c613894a6088 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -52,7 +52,7 @@
 extern u32 rt_global_debug_component;
 #define RT_TRACE(component, x, args...) \
 	do {							\
-		if (rt_global_debug_component & component)	\
+		if (rt_global_debug_component & (component))	\
 			pr_debug("RTL8192U: " x "\n", ##args);	\
 	} while (0)
 
-- 
2.18.0


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

* [PATCH 08/20] staging:rtl8192u: Fix space characters - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (6 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 07/20] staging:rtl8192u: Refactor RT_TRACE " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 09/20] staging:rtl8192u: Remove RT_DEBUG_DATA " John Whitmore
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Fix the spacing issues, remove space after cast operation, and replace
spaces at start of line with tab.

These changes are purely coding style changes to resolve checkpatch
issues. There should be no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r8192U.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index c613894a6088..e65a893fd084 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -112,7 +112,7 @@ extern u32 rt_global_debug_component;
 	do {								\
 		if ((rt_global_debug_component & (level)) == (level)) {	\
 			int i;						\
-			u8 *pdata = (u8 *) data;			\
+			u8 *pdata = (u8 *)data;				\
 			pr_debug("RTL8192U: %s()\n", __func__);		\
 			for (i = 0; i < (int)(datalen); i++) {		\
 				printk("%2x ", pdata[i]);               \
@@ -877,9 +877,9 @@ typedef struct r8192_priv {
 	int     rx_inx;
 #endif
 
-       struct sk_buff_head rx_queue;
-       struct sk_buff_head skb_queue;
-       struct work_struct qos_activate;
+	struct sk_buff_head rx_queue;
+	struct sk_buff_head skb_queue;
+	struct work_struct qos_activate;
 	short  tx_urb_index;
 	atomic_t tx_pending[0x10]; /* UART_PRIORITY + 1 */
 
@@ -1027,7 +1027,7 @@ typedef struct r8192_priv {
 	u8	nrxAMPDU_aggr_num;
 
 	/* For gpio */
-	 bool bHwRadioOff;
+	bool bHwRadioOff;
 
 	u32 reset_count;
 	bool bpbc_pressed;
-- 
2.18.0


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

* [PATCH 09/20] staging:rtl8192u: Remove RT_DEBUG_DATA - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (7 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 08/20] staging:rtl8192u: Fix space characters " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 10/20] staging:rtl8192u: Rename PHY_Beacon_RSSI_SLID_WIN_MAX " John Whitmore
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove the RT_DEBUG_DATA Macro. The macro causes a number of
checkpatch issues, and is not actually used in code, so can simply
be removed without issue.

This is a coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r8192U.h | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index e65a893fd084..528c50be3894 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -103,28 +103,8 @@ extern u32 rt_global_debug_component;
 				 #expr, __FILE__, __func__, __LINE__);	\
 		}							\
 	} while (0)
-/*
- * Debug out data buf.
- * If you want to print DATA buffer related BA,
- * please set ieee80211_debug_level to DATA|BA
- */
-#define RT_DEBUG_DATA(level, data, datalen) \
-	do {								\
-		if ((rt_global_debug_component & (level)) == (level)) {	\
-			int i;						\
-			u8 *pdata = (u8 *)data;				\
-			pr_debug("RTL8192U: %s()\n", __func__);		\
-			for (i = 0; i < (int)(datalen); i++) {		\
-				printk("%2x ", pdata[i]);               \
-				if ((i+1)%16 == 0)			\
-					printk("\n");			\
-			}						\
-			printk("\n");					\
-		}							\
-	} while (0)
 #else
 #define RTL8192U_ASSERT(expr) do {} while (0)
-#define RT_DEBUG_DATA(level, data, datalen) do {} while (0)
 #endif /* RTL8169_DEBUG */
 
 /* Queue Select Value in TxDesc */
-- 
2.18.0


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

* [PATCH 10/20] staging:rtl8192u: Rename PHY_Beacon_RSSI_SLID_WIN_MAX - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (8 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 09/20] staging:rtl8192u: Remove RT_DEBUG_DATA " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 11/20] staging:rtl8192u: Rename OFDM_Table_Length " John Whitmore
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the Macro PHY_Beacon_RSSI_SLID_WIN_MAX to
PHY_BEACON_RSSI_SLID_WIN_MAX, this clears the checkpatch issue with
CamelCase naming.

This is purely a coding style change which should not impact runtime
code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 528c50be3894..87c1a69b2e1c 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -150,7 +150,7 @@ extern u32 rt_global_debug_component;
 #define RTL819X_DEFAULT_RF_TYPE RF_1T2R
 
 #define IEEE80211_WATCH_DOG_TIME    2000
-#define		PHY_Beacon_RSSI_SLID_WIN_MAX		10
+#define	PHY_BEACON_RSSI_SLID_WIN_MAX		10
 /* For Tx Power Tracking */
 #define		OFDM_Table_Length	19
 #define	CCK_Table_length	12
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index dd87cee6604b..4d43176bdb6c 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3997,15 +3997,15 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 
 	if (pprevious_stats->bPacketBeacon) {
 		/* record the beacon pwdb to the sliding window. */
-		if (slide_beacon_adc_pwdb_statistics++ >= PHY_Beacon_RSSI_SLID_WIN_MAX) {
-			slide_beacon_adc_pwdb_statistics = PHY_Beacon_RSSI_SLID_WIN_MAX;
+		if (slide_beacon_adc_pwdb_statistics++ >= PHY_BEACON_RSSI_SLID_WIN_MAX) {
+			slide_beacon_adc_pwdb_statistics = PHY_BEACON_RSSI_SLID_WIN_MAX;
 			last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index];
 			priv->stats.Slide_Beacon_Total -= last_beacon_adc_pwdb;
 		}
 		priv->stats.Slide_Beacon_Total += pprevious_stats->RxPWDBAll;
 		priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] = pprevious_stats->RxPWDBAll;
 		slide_beacon_adc_pwdb_index++;
-		if (slide_beacon_adc_pwdb_index >= PHY_Beacon_RSSI_SLID_WIN_MAX)
+		if (slide_beacon_adc_pwdb_index >= PHY_BEACON_RSSI_SLID_WIN_MAX)
 			slide_beacon_adc_pwdb_index = 0;
 		pprevious_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total / slide_beacon_adc_pwdb_statistics;
 		if (pprevious_stats->RxPWDBAll >= 3)
-- 
2.18.0


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

* [PATCH 11/20] staging:rtl8192u: Rename OFDM_Table_Length - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (9 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 10/20] staging:rtl8192u: Rename PHY_Beacon_RSSI_SLID_WIN_MAX " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 12/20] staging:rtl8192u: Rename CCK_Table_length " John Whitmore
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the defined constant OFDM_Table_Length to OFDM_TABLE_LENGTH,
this clears the checkpatch issue with CamelCase naming.

This is a simple coding style change which should not impact runtime
code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 87c1a69b2e1c..6edbc8146e82 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -152,7 +152,7 @@ extern u32 rt_global_debug_component;
 #define IEEE80211_WATCH_DOG_TIME    2000
 #define	PHY_BEACON_RSSI_SLID_WIN_MAX		10
 /* For Tx Power Tracking */
-#define		OFDM_Table_Length	19
+#define		OFDM_TABLE_LENGTH	19
 #define	CCK_Table_length	12
 
 /* For rtl819x */
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 5fb5f583f703..19b3b11c5edb 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -454,7 +454,7 @@ static void dm_bandwidth_autoswitch(struct net_device *dev)
 }	/* dm_BandwidthAutoSwitch */
 
 /* OFDM default at 0db, index=6. */
-static u32 OFDMSwingTable[OFDM_Table_Length] = {
+static u32 OFDMSwingTable[OFDM_TABLE_LENGTH] = {
 	0x7f8001fe,	/* 0, +6db */
 	0x71c001c7,	/* 1, +5db */
 	0x65400195,	/* 2, +4db */
@@ -672,7 +672,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
 	if (!priv->btxpower_trackingInit) {
 		/* Query OFDM default setting */
 		tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord);
-		for (i = 0; i < OFDM_Table_Length; i++) { /* find the index */
+		for (i = 0; i < OFDM_TABLE_LENGTH; i++) { /* find the index */
 			if (tmpRegA == OFDMSwingTable[i]) {
 				priv->OFDM_index = (u8)i;
 				RT_TRACE(COMP_POWER_TRACKING, "Initial reg0x%x = 0x%x, OFDM_index=0x%x\n",
@@ -716,8 +716,8 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
 	if (priv->ThermalMeter[0] >= (u8)tmpRegA) {	/* lower temperature */
 		tmpOFDMindex = tmpCCK20Mindex = 6+(priv->ThermalMeter[0]-(u8)tmpRegA);
 		tmpCCK40Mindex = tmpCCK20Mindex - 6;
-		if (tmpOFDMindex >= OFDM_Table_Length)
-			tmpOFDMindex = OFDM_Table_Length-1;
+		if (tmpOFDMindex >= OFDM_TABLE_LENGTH)
+			tmpOFDMindex = OFDM_TABLE_LENGTH - 1;
 		if (tmpCCK20Mindex >= CCK_Table_length)
 			tmpCCK20Mindex = CCK_Table_length-1;
 		if (tmpCCK40Mindex >= CCK_Table_length)
-- 
2.18.0


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

* [PATCH 12/20] staging:rtl8192u: Rename CCK_Table_length - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (10 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 11/20] staging:rtl8192u: Rename OFDM_Table_Length " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 13/20] staging:rtl8192u: Rename PktSize Style John Whitmore
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the constant CCK_Table_length to CCK_TABLE_LENGTH, this clears
the checkpatch issue with CamelCase naming.

This is a simple coding style change which should not impact runtime
code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 6edbc8146e82..e86a4b35a1f4 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -153,7 +153,7 @@ extern u32 rt_global_debug_component;
 #define	PHY_BEACON_RSSI_SLID_WIN_MAX		10
 /* For Tx Power Tracking */
 #define		OFDM_TABLE_LENGTH	19
-#define	CCK_Table_length	12
+#define	CCK_TABLE_LENGTH	12
 
 /* For rtl819x */
 struct tx_desc_819x_usb {
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 19b3b11c5edb..874da0620936 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -476,7 +476,7 @@ static u32 OFDMSwingTable[OFDM_TABLE_LENGTH] = {
 	0x10000040	/* 18, -12db */
 };
 
-static u8	CCKSwingTable_Ch1_Ch13[CCK_Table_length][8] = {
+static u8	CCKSwingTable_Ch1_Ch13[CCK_TABLE_LENGTH][8] = {
 	{0x36, 0x35, 0x2e, 0x25, 0x1c, 0x12, 0x09, 0x04},	/* 0, +0db ===> CCK40M default */
 	{0x30, 0x2f, 0x29, 0x21, 0x19, 0x10, 0x08, 0x03},	/* 1, -1db */
 	{0x2b, 0x2a, 0x25, 0x1e, 0x16, 0x0e, 0x07, 0x03},	/* 2, -2db */
@@ -491,7 +491,7 @@ static u8	CCKSwingTable_Ch1_Ch13[CCK_Table_length][8] = {
 	{0x0f, 0x0f, 0x0d, 0x0b, 0x08, 0x05, 0x03, 0x01}	/* 11, -11db */
 };
 
-static u8	CCKSwingTable_Ch14[CCK_Table_length][8] = {
+static u8	CCKSwingTable_Ch14[CCK_TABLE_LENGTH][8] = {
 	{0x36, 0x35, 0x2e, 0x1b, 0x00, 0x00, 0x00, 0x00},	/* 0, +0db  ===> CCK40M default */
 	{0x30, 0x2f, 0x29, 0x18, 0x00, 0x00, 0x00, 0x00},	/* 1, -1db */
 	{0x2b, 0x2a, 0x25, 0x15, 0x00, 0x00, 0x00, 0x00},	/* 2, -2db */
@@ -682,7 +682,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
 
 		/* Query CCK default setting From 0xa22 */
 		TempCCk = rtl8192_QueryBBReg(dev, rCCK0_TxFilter1, bMaskByte2);
-		for (i = 0; i < CCK_Table_length; i++) {
+		for (i = 0; i < CCK_TABLE_LENGTH; i++) {
 			if (TempCCk == (u32)CCKSwingTable_Ch1_Ch13[i][0]) {
 				priv->CCK_index = (u8) i;
 				RT_TRACE(COMP_POWER_TRACKING, "Initial reg0x%x = 0x%x, CCK_index=0x%x\n",
@@ -718,10 +718,10 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
 		tmpCCK40Mindex = tmpCCK20Mindex - 6;
 		if (tmpOFDMindex >= OFDM_TABLE_LENGTH)
 			tmpOFDMindex = OFDM_TABLE_LENGTH - 1;
-		if (tmpCCK20Mindex >= CCK_Table_length)
-			tmpCCK20Mindex = CCK_Table_length-1;
-		if (tmpCCK40Mindex >= CCK_Table_length)
-			tmpCCK40Mindex = CCK_Table_length-1;
+		if (tmpCCK20Mindex >= CCK_TABLE_LENGTH)
+			tmpCCK20Mindex = CCK_TABLE_LENGTH - 1;
+		if (tmpCCK40Mindex >= CCK_TABLE_LENGTH)
+			tmpCCK40Mindex = CCK_TABLE_LENGTH - 1;
 	} else {
 		tmpval = (u8)tmpRegA - priv->ThermalMeter[0];
 
-- 
2.18.0


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

* [PATCH 13/20] staging:rtl8192u: Rename PktSize Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (11 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 12/20] staging:rtl8192u: Rename CCK_Table_length " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 14/20] staging:rtl8192u: Rename Offset - Style John Whitmore
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable 'PktSize' to 'pkt_size', this change
clears the checkpatch issue with CamelCase naming.

This is a simple coding style change which should not impact runtime
code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index e86a4b35a1f4..9931ede1524b 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -158,7 +158,7 @@ extern u32 rt_global_debug_component;
 /* For rtl819x */
 struct tx_desc_819x_usb {
 	/* DWORD 0 */
-	u16	PktSize;
+	u16	pkt_size;
 	u8	Offset;
 	u8	Reserved0:3;
 	u8	CmdInit:1;
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 4d43176bdb6c..2a3cb0f1ac07 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1517,7 +1517,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	tx_desc->LINIP = 0;
 	tx_desc->CmdInit = 1;
 	tx_desc->Offset =  sizeof(struct tx_fwinfo_819x_usb) + 8;
-	tx_desc->PktSize = (skb->len - TX_PACKET_SHIFT_BYTES) & 0xffff;
+	tx_desc->pkt_size = (skb->len - TX_PACKET_SHIFT_BYTES) & 0xffff;
 
 	/*DWORD 1*/
 	tx_desc->SecCAMID = 0;
-- 
2.18.0


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

* [PATCH 14/20] staging:rtl8192u: Rename Offset - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (12 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 13/20] staging:rtl8192u: Rename PktSize Style John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 15/20] staging:rtl8192u: Rename Reserved... structure members " John Whitmore
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable 'Offset' to 'offset', this clears the
checkpatch issue with CamelCase naming.

This is a coding style change which should not impact runtime code
execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 9931ede1524b..8aaea1d8cf50 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -159,7 +159,7 @@ extern u32 rt_global_debug_component;
 struct tx_desc_819x_usb {
 	/* DWORD 0 */
 	u16	pkt_size;
-	u8	Offset;
+	u8	offset;
 	u8	Reserved0:3;
 	u8	CmdInit:1;
 	u8	LastSeg:1;
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 2a3cb0f1ac07..d4af6cc01fc6 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1516,7 +1516,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	/* DWORD 0 */
 	tx_desc->LINIP = 0;
 	tx_desc->CmdInit = 1;
-	tx_desc->Offset =  sizeof(struct tx_fwinfo_819x_usb) + 8;
+	tx_desc->offset =  sizeof(struct tx_fwinfo_819x_usb) + 8;
 	tx_desc->pkt_size = (skb->len - TX_PACKET_SHIFT_BYTES) & 0xffff;
 
 	/*DWORD 1*/
-- 
2.18.0


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

* [PATCH 15/20] staging:rtl8192u: Rename Reserved... structure members - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (13 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 14/20] staging:rtl8192u: Rename Offset - Style John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 16/20] staging:rtl8192u: Rename CmdInit " John Whitmore
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the 'Reserved...' members of the 'tx_desc_819x_usb' structure
to 'reserved...'. This change clears the checkpatch issue with
CamelCase naming.

This is a simple coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r8192U.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 8aaea1d8cf50..5d643870a1e3 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -160,7 +160,7 @@ struct tx_desc_819x_usb {
 	/* DWORD 0 */
 	u16	pkt_size;
 	u8	offset;
-	u8	Reserved0:3;
+	u8	reserved0:3;
 	u8	CmdInit:1;
 	u8	LastSeg:1;
 	u8	FirstSeg:1;
@@ -177,7 +177,7 @@ struct tx_desc_819x_usb {
 	u8	PIFS:1;
 	u8	QueueSelect:5;
 	u8	NoACM:1;
-	u8	Reserved1:2;
+	u8	reserved1:2;
 	u8	SecCAMID:5;
 	u8	SecDescAssign:1;
 	u8	SecType:2;
@@ -185,13 +185,13 @@ struct tx_desc_819x_usb {
 	/* DWORD 2 */
 	u16	TxBufferSize;
 	u8	ResvForPaddingLen:7;
-	u8	Reserved3:1;
-	u8	Reserved4;
+	u8	reserved3:1;
+	u8	reserved4;
 
 	/* DWORD 3, 4, 5 */
-	u32	Reserved5;
-	u32	Reserved6;
-	u32	Reserved7;
+	u32	reserved5;
+	u32	reserved6;
+	u32	reserved7;
 };
 
 struct tx_desc_cmd_819x_usb {
-- 
2.18.0


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

* [PATCH 16/20] staging:rtl8192u: Rename CmdInit - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (14 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 15/20] staging:rtl8192u: Rename Reserved... structure members " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 17/20] staging:rtl8192u: Rename LastSeg " John Whitmore
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable 'CmdInit, to 'cmd_init', this change
clears the checkpatch issue with CamelCase naming.

This is a simple 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 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 5d643870a1e3..4d29b7427a0e 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -161,7 +161,7 @@ struct tx_desc_819x_usb {
 	u16	pkt_size;
 	u8	offset;
 	u8	reserved0:3;
-	u8	CmdInit:1;
+	u8	cmd_init:1;
 	u8	LastSeg:1;
 	u8	FirstSeg:1;
 	u8	LINIP:1;
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index d4af6cc01fc6..b385c686370b 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1515,7 +1515,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	memset(tx_desc, 0, sizeof(struct tx_desc_819x_usb));
 	/* DWORD 0 */
 	tx_desc->LINIP = 0;
-	tx_desc->CmdInit = 1;
+	tx_desc->cmd_init = 1;
 	tx_desc->offset =  sizeof(struct tx_fwinfo_819x_usb) + 8;
 	tx_desc->pkt_size = (skb->len - TX_PACKET_SHIFT_BYTES) & 0xffff;
 
-- 
2.18.0


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

* [PATCH 17/20] staging:rtl8192u: Rename LastSeg - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (15 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 16/20] staging:rtl8192u: Rename CmdInit " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-08-31 23:02 ` [PATCH 18/20] staging:rtl8192u: Rename FirstSeg " John Whitmore
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable 'LastSeg' to 'last_seg', this change
clears the checkpatch issue with CamelCase naming.

This is a simple coding style change which should not impact runtime
code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 4d29b7427a0e..672cbfa688f7 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -162,7 +162,7 @@ struct tx_desc_819x_usb {
 	u8	offset;
 	u8	reserved0:3;
 	u8	cmd_init:1;
-	u8	LastSeg:1;
+	u8	last_seg:1;
 	u8	FirstSeg:1;
 	u8	LINIP:1;
 	u8	OWN:1;
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index b385c686370b..dfbba1177470 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1557,7 +1557,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	 */
 	/* DWORD 0 */
 	tx_desc->FirstSeg = 1;
-	tx_desc->LastSeg = 1;
+	tx_desc->last_seg = 1;
 	tx_desc->OWN = 1;
 
 	/* DWORD 2 */
-- 
2.18.0


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

* [PATCH 18/20] staging:rtl8192u: Rename FirstSeg - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (16 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 17/20] staging:rtl8192u: Rename LastSeg " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-09-10 15:10   ` Greg KH
  2018-08-31 23:02 ` [PATCH 19/20] staging:rtl8192u: Rename LINIP " John Whitmore
  2018-08-31 23:02 ` [PATCH 20/20] staging:rtl8192u: Rename OWN " John Whitmore
  19 siblings, 1 reply; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable 'FirstSeg' to 'first_seg', this change
clears the checkpatch issue with CamelCase naming.

This is a simple coding style change and as such should not impact
runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 672cbfa688f7..66efa59eabf0 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -163,7 +163,7 @@ struct tx_desc_819x_usb {
 	u8	reserved0:3;
 	u8	cmd_init:1;
 	u8	last_seg:1;
-	u8	FirstSeg:1;
+	u8	first_seg:1;
 	u8	LINIP:1;
 	u8	OWN:1;
 
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index dfbba1177470..a4d1b55a1117 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1556,7 +1556,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	 * all of the descriptors
 	 */
 	/* DWORD 0 */
-	tx_desc->FirstSeg = 1;
+	tx_desc->first_seg = 1;
 	tx_desc->last_seg = 1;
 	tx_desc->OWN = 1;
 
-- 
2.18.0


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

* [PATCH 19/20] staging:rtl8192u: Rename LINIP - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (17 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 18/20] staging:rtl8192u: Rename FirstSeg " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-09-10 15:09   ` Greg KH
  2018-08-31 23:02 ` [PATCH 20/20] staging:rtl8192u: Rename OWN " John Whitmore
  19 siblings, 1 reply; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable 'LINIP' to 'linip', this change is to
conform to the coding style guidelines, member variables in
lowercase.

This is a simple coding style change which should not impact runtime
code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 66efa59eabf0..68e82b32a88e 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -164,7 +164,7 @@ struct tx_desc_819x_usb {
 	u8	cmd_init:1;
 	u8	last_seg:1;
 	u8	first_seg:1;
-	u8	LINIP:1;
+	u8	linip:1;
 	u8	OWN:1;
 
 	/* DWORD 1 */
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index a4d1b55a1117..911d0214b48a 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1514,7 +1514,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	/* Fill Tx descriptor */
 	memset(tx_desc, 0, sizeof(struct tx_desc_819x_usb));
 	/* DWORD 0 */
-	tx_desc->LINIP = 0;
+	tx_desc->linip = 0;
 	tx_desc->cmd_init = 1;
 	tx_desc->offset =  sizeof(struct tx_fwinfo_819x_usb) + 8;
 	tx_desc->pkt_size = (skb->len - TX_PACKET_SHIFT_BYTES) & 0xffff;
-- 
2.18.0


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

* [PATCH 20/20] staging:rtl8192u: Rename OWN - Style
  2018-08-31 23:02 [PATCH 00/20] staging:rtl8192u: r8192U.h cleanup - Style John Whitmore
                   ` (18 preceding siblings ...)
  2018-08-31 23:02 ` [PATCH 19/20] staging:rtl8192u: Rename LINIP " John Whitmore
@ 2018-08-31 23:02 ` John Whitmore
  2018-09-10 15:09   ` Greg KH
  19 siblings, 1 reply; 25+ messages in thread
From: John Whitmore @ 2018-08-31 23:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Rename the member variable 'OWN' to 'own', this is to comply with the
coding standard, where variables are named in lowercase.

This is a simple 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 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 68e82b32a88e..f963b664e221 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -165,7 +165,7 @@ struct tx_desc_819x_usb {
 	u8	last_seg:1;
 	u8	first_seg:1;
 	u8	linip:1;
-	u8	OWN:1;
+	u8	own:1;
 
 	/* DWORD 1 */
 	u8	TxFWInfoSize;
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 911d0214b48a..4d0f70ec31ac 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1558,7 +1558,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	/* DWORD 0 */
 	tx_desc->first_seg = 1;
 	tx_desc->last_seg = 1;
-	tx_desc->OWN = 1;
+	tx_desc->own = 1;
 
 	/* DWORD 2 */
 	tx_desc->TxBufferSize = (u32)(skb->len - USB_HWDESC_HEADER_LEN);
-- 
2.18.0


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

* Re: [PATCH 20/20] staging:rtl8192u: Rename OWN - Style
  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
  0 siblings, 1 reply; 25+ messages in thread
From: Greg KH @ 2018-09-10 15:09 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-kernel, devel

On Sat, Sep 01, 2018 at 12:02:50AM +0100, John Whitmore wrote:
> Rename the member variable 'OWN' to 'own', this is to comply with the
> coding standard, where variables are named in lowercase.
> 
> This is a simple 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 | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
> index 68e82b32a88e..f963b664e221 100644
> --- a/drivers/staging/rtl8192u/r8192U.h
> +++ b/drivers/staging/rtl8192u/r8192U.h
> @@ -165,7 +165,7 @@ struct tx_desc_819x_usb {
>  	u8	last_seg:1;
>  	u8	first_seg:1;
>  	u8	linip:1;
> -	u8	OWN:1;
> +	u8	own:1;
>  
>  	/* DWORD 1 */
>  	u8	TxFWInfoSize;
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 911d0214b48a..4d0f70ec31ac 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -1558,7 +1558,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
>  	/* DWORD 0 */
>  	tx_desc->first_seg = 1;
>  	tx_desc->last_seg = 1;
> -	tx_desc->OWN = 1;
> +	tx_desc->own = 1;

Is this another case of a variable being set once and then never used?

If so, just delete it.

thanks,

greg k-h

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

* Re: [PATCH 19/20] staging:rtl8192u: Rename LINIP - Style
  2018-08-31 23:02 ` [PATCH 19/20] staging:rtl8192u: Rename LINIP " John Whitmore
@ 2018-09-10 15:09   ` Greg KH
  0 siblings, 0 replies; 25+ messages in thread
From: Greg KH @ 2018-09-10 15:09 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-kernel, devel

On Sat, Sep 01, 2018 at 12:02:49AM +0100, John Whitmore wrote:
> Rename the member variable 'LINIP' to 'linip', this change is to
> conform to the coding style guidelines, member variables in
> lowercase.
> 
> This is a simple coding style change which should not impact runtime
> code execution.
> 
> Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
> ---
>  drivers/staging/rtl8192u/r8192U.h      | 2 +-
>  drivers/staging/rtl8192u/r8192U_core.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
> index 66efa59eabf0..68e82b32a88e 100644
> --- a/drivers/staging/rtl8192u/r8192U.h
> +++ b/drivers/staging/rtl8192u/r8192U.h
> @@ -164,7 +164,7 @@ struct tx_desc_819x_usb {
>  	u8	cmd_init:1;
>  	u8	last_seg:1;
>  	u8	first_seg:1;
> -	u8	LINIP:1;
> +	u8	linip:1;
>  	u8	OWN:1;
>  
>  	/* DWORD 1 */
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index a4d1b55a1117..911d0214b48a 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -1514,7 +1514,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
>  	/* Fill Tx descriptor */
>  	memset(tx_desc, 0, sizeof(struct tx_desc_819x_usb));
>  	/* DWORD 0 */
> -	tx_desc->LINIP = 0;
> +	tx_desc->linip = 0;

Please just delet.

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

* Re: [PATCH 18/20] staging:rtl8192u: Rename FirstSeg - Style
  2018-08-31 23:02 ` [PATCH 18/20] staging:rtl8192u: Rename FirstSeg " John Whitmore
@ 2018-09-10 15:10   ` Greg KH
  0 siblings, 0 replies; 25+ messages in thread
From: Greg KH @ 2018-09-10 15:10 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-kernel, devel

On Sat, Sep 01, 2018 at 12:02:48AM +0100, John Whitmore wrote:
> Rename the member variable 'FirstSeg' to 'first_seg', this change
> clears the checkpatch issue with CamelCase naming.
> 
> This is a simple coding style change and as such should not impact
> runtime code execution.
> 
> Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
> ---
>  drivers/staging/rtl8192u/r8192U.h      | 2 +-
>  drivers/staging/rtl8192u/r8192U_core.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
> index 672cbfa688f7..66efa59eabf0 100644
> --- a/drivers/staging/rtl8192u/r8192U.h
> +++ b/drivers/staging/rtl8192u/r8192U.h
> @@ -163,7 +163,7 @@ struct tx_desc_819x_usb {
>  	u8	reserved0:3;
>  	u8	cmd_init:1;
>  	u8	last_seg:1;
> -	u8	FirstSeg:1;
> +	u8	first_seg:1;
>  	u8	LINIP:1;
>  	u8	OWN:1;
>  
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index dfbba1177470..a4d1b55a1117 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -1556,7 +1556,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
>  	 * all of the descriptors
>  	 */
>  	/* DWORD 0 */
> -	tx_desc->FirstSeg = 1;
> +	tx_desc->first_seg = 1;

Same for all of these, I'll let you respin this patch series...

thanks,

greg k-h

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

* Re: [PATCH 20/20] staging:rtl8192u: Rename OWN - Style
  2018-09-10 15:09   ` Greg KH
@ 2018-09-11 21:49     ` John Whitmore
  0 siblings, 0 replies; 25+ messages in thread
From: John Whitmore @ 2018-09-11 21:49 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel

On Mon, Sep 10, 2018 at 05:09:27PM +0200, Greg KH wrote:
> On Sat, Sep 01, 2018 at 12:02:50AM +0100, John Whitmore wrote:
> > Rename the member variable 'OWN' to 'own', this is to comply with the
> > coding standard, where variables are named in lowercase.
> > 
> > This is a simple 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 | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
> > index 68e82b32a88e..f963b664e221 100644
> > --- a/drivers/staging/rtl8192u/r8192U.h
> > +++ b/drivers/staging/rtl8192u/r8192U.h
> > @@ -165,7 +165,7 @@ struct tx_desc_819x_usb {
> >  	u8	last_seg:1;
> >  	u8	first_seg:1;
> >  	u8	linip:1;
> > -	u8	OWN:1;
> > +	u8	own:1;
> >  
> >  	/* DWORD 1 */
> >  	u8	TxFWInfoSize;
> > diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> > index 911d0214b48a..4d0f70ec31ac 100644
> > --- a/drivers/staging/rtl8192u/r8192U_core.c
> > +++ b/drivers/staging/rtl8192u/r8192U_core.c
> > @@ -1558,7 +1558,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
> >  	/* DWORD 0 */
> >  	tx_desc->first_seg = 1;
> >  	tx_desc->last_seg = 1;
> > -	tx_desc->OWN = 1;
> > +	tx_desc->own = 1;
> 
> Is this another case of a variable being set once and then never used?
> 
> If so, just delete it.
> 
> thanks,
> 
> greg k-h

em, I wasn't sure because that variable's a memeber of the sk_buff * passed
into the funtion. That function should be static to the file and is only
called from function rtl8192_hard_start_xmit() but that's a function
pointer which is sort of exported:

        priv->ieee80211->softmac_hard_start_xmit = rtl8192_hard_start_xmit;

Having said that the 'OWN' member is part of the private data:

	struct tx_desc_819x_usb *tx_desc = (struct tx_desc_819x_usb *)skb->data;

Like I say I wasn't sure so played it safe. I guess it's private data so nobody
outside the driver should be messing with that data, and I'm not sure how
public that function is.

I'll read some, ponder a bit and have another go.

jwhitmore

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

end of thread, other threads:[~2018-09-11 21:49 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 06/20] staging:rtl8192u: Rename Rx_Smooth_Factor " John Whitmore
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

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