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: <20180826211439.14326-3-johnfwhitmore@gmail.com>
Date:   Sun, 26 Aug 2018 22:14:20 +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 02/21] staging:rtl8192u: Refactor RT_RF_TYPE_DEF - Style

Rename the enumerated type RT_RF_TYPE_DEF to rt_rf_type to comply
with the coding standard, lower case type names. Removed the 'def'
postscript which provides no additional information.

The 'typedef' directive has been removed to clear the checkpatch issue
with defining new types.

The type has been moved to the file r8192U.h, where it is
actually used by the member variable 'rf_type'. Previously the member
variable used a 'u8' type so no compiler type checking is being
performed. The type has been changed to the correct type.

Signed-off-by: John Whitmore <johnfwhitmore@...il.com>
---
 drivers/staging/rtl8192u/r8192U.h    | 8 +++++++-
 drivers/staging/rtl8192u/r8192U_hw.h | 9 ---------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index ce287e2f79e1..1b51601df1ee 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -804,6 +804,12 @@ enum version_819xu {
 	VERSION_819XU_C,// C-cut
 };
 
+//added for different RF type
+enum rt_rf_type {
+	RF_1T2R = 0,
+	RF_2T4R,
+};
+
 typedef struct r8192_priv {
 	struct usb_device *udev;
 	/* For maintain info from eeprom */
@@ -844,7 +850,7 @@ typedef struct r8192_priv {
 
 	struct mutex wx_mutex;
 
-	u8 rf_type;			/* 0: 1T2R, 1: 2T4R */
+	enum rt_rf_type   rf_type;	    /* 0: 1T2R, 1: 2T4R */
 	RT_RF_TYPE_819xU rf_chip;
 
 	short (*rf_set_sens)(struct net_device *dev, short sens);
diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h
index 15e56003d97c..f91dd20fa568 100644
--- a/drivers/staging/rtl8192u/r8192U_hw.h
+++ b/drivers/staging/rtl8192u/r8192U_hw.h
@@ -20,15 +20,6 @@
 #ifndef R8192_HW
 #define R8192_HW
 
-//added for different RF type
-typedef enum _RT_RF_TYPE_DEF {
-	RF_1T2R = 0,
-	RF_2T4R,
-
-	RF_819X_MAX_TYPE
-} RT_RF_TYPE_DEF;
-
-
 typedef enum _BaseBand_Config_Type {
 	BaseBand_Config_PHY_REG = 0,			//Radio Path A
 	BaseBand_Config_AGC_TAB = 1,			//Radio Path B
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ