lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180727232826.28014-11-johnfwhitmore@gmail.com>
Date:   Sat, 28 Jul 2018 00:28:26 +0100
From:   John Whitmore <johnfwhitmore@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
        John Whitmore <johnfwhitmore@...il.com>
Subject: [PATCH 10/10] staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - Style

The enumerated type DM_CCK_Rx_Path_Method is used as a container for
constant definitions, rather then an enumerated type enabling compiler
type checking. To correct this, the variable which uses the constants,
defined by the enumeration, has had its type changed from a u8 to the
enumeration.

Additionally the type has been moved above the structure where the type
is used, to avoid compiler error. The typedef has been removed from the
enumerated type to clear the checkpatch issue with defining new types.
The name of the type has been changed to dm_cck_rx_path_method to clear
the checkpatch issue with CamelCase naming. And the enumerated constant
CCK_Rx_Version_MAX has been removed, since it is never used in code.

The changes are all coding style in nature and so should have no
impact on runtime code execution.

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

diff --git a/drivers/staging/rtl8192u/r8192U_dm.h b/drivers/staging/rtl8192u/r8192U_dm.h
index 2aef330379cb..42effcec5277 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.h
+++ b/drivers/staging/rtl8192u/r8192U_dm.h
@@ -126,10 +126,15 @@ struct dig {
 	long		rssi_val;
 };
 
+enum dm_cck_rx_path_method {
+	CCK_Rx_Version_1 = 0,
+	CCK_Rx_Version_2 = 1,
+};
+
 struct dynamic_rx_path_sel {
 	u8		Enable;
 	u8		DbgMode;
-	u8		cck_method;
+	enum dm_cck_rx_path_method		cck_method;
 	u8		cck_Rx_path;
 
 	u8		SS_TH_low;
@@ -142,12 +147,6 @@ struct dynamic_rx_path_sel {
 	long		cck_pwdb_sta[4];
 };
 
-typedef enum tag_CCK_Rx_Path_Method_Definition {
-	CCK_Rx_Version_1 = 0,
-	CCK_Rx_Version_2 = 1,
-	CCK_Rx_Version_MAX
-} DM_CCK_Rx_Path_Method;
-
 typedef enum tag_DM_DbgMode_Definition {
 	DM_DBG_OFF = 0,
 	DM_DBG_ON = 1,
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ