linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [0/13] staging:rtl8192u: Coding style changes
@ 2018-07-13 11:22 John Whitmore
  2018-07-13 11:22 ` [PATCH 01/13] staging:rtl8192u: remove typedef of enumeration SwChnlCmdID - Style John Whitmore
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx

This series is just coding style changes to clear checkpatch issues. I don't
think that there are any changes that impact code execution.

I tacked on the end a patch from my last series that failed, again just a
rename to avoid CamelCase warning.

jwhitmore



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

* [PATCH 01/13] staging:rtl8192u: remove typedef of enumeration SwChnlCmdID - Style
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
@ 2018-07-13 11:22 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 02/13] staging:rtl8192u: remove typdef from enumeration HW90_BLOCK_E " John Whitmore
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

To clear a checkpatch issue removed the typedef of the enumeration SwChnlCmdID
this should not impact runtime code as it's only a coding style change.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 98cfc222e241..bc86e6bfb8f5 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1221,7 +1221,7 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
  * notice:
  ******************************************************************************/
 static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
-					u32 CmdTableSz, SwChnlCmdID CmdID,
+					u32 CmdTableSz, enum SwChnlCmdID CmdID,
 					u32 Para1, u32 Para2, u32 msDelay)
 {
 	SwChnlCmd *pCmd;
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index d2e69228ac8a..4471a0e00936 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -7,7 +7,7 @@
 #define MAX_RFDEPENDCMD_CNT 16
 #define MAX_POSTCMD_CNT 16
 
-typedef enum _SwChnlCmdID {
+enum SwChnlCmdID {
 	CmdID_End,
 	CmdID_SetTxPowerLevel,
 	CmdID_BBRegWrite10,
@@ -15,15 +15,15 @@ typedef enum _SwChnlCmdID {
 	CmdID_WritePortUshort,
 	CmdID_WritePortUchar,
 	CmdID_RF_WriteReg,
-} SwChnlCmdID;
+};
 
 /* -----------------------Define structure---------------------- */
 /* 1. Switch channel related */
 typedef struct _SwChnlCmd {
-	SwChnlCmdID	CmdID;
-	u32		Para1;
-	u32		Para2;
-	u32		msDelay;
+	enum SwChnlCmdID	CmdID;
+	u32		        Para1;
+	u32		        Para2;
+	u32		        msDelay;
 } __packed SwChnlCmd;
 
 extern u32 rtl819XMACPHY_Array_PG[];
-- 
2.18.0


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

* [PATCH 02/13] staging:rtl8192u: remove typdef from enumeration HW90_BLOCK_E - Style
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
  2018-07-13 11:22 ` [PATCH 01/13] staging:rtl8192u: remove typedef of enumeration SwChnlCmdID - Style John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 03/13] staging:rtl8192u: Remove typdef from enumeration RF90_RADIO_PATH_E " John Whitmore
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Checkpatch warns about the creation of new types in code. This patch simply
removes the typedef from the enumeration HW90_BLOCK_E to clear this
warning. There should be no impact on run time code execution.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index bc86e6bfb8f5..0462de662eff 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -695,7 +695,7 @@ static void rtl8192_InitBBRFRegDef(struct net_device *dev)
  * return:    return whether BB and RF is ok (0:OK, 1:Fail)
  * notice:    This function may be removed in the ASIC
  ******************************************************************************/
-u8 rtl8192_phy_checkBBAndRF(struct net_device *dev, HW90_BLOCK_E CheckBlock,
+u8 rtl8192_phy_checkBBAndRF(struct net_device *dev, enum HW90_BLOCK_E CheckBlock,
 			    RF90_RADIO_PATH_E eRFPath)
 {
 	u8 ret = 0;
@@ -787,10 +787,10 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 
 	/* ----Ckeck FPGAPHY0 and PHY1 board is OK---- */
 	/* TODO: this function should be removed on ASIC */
-	for (eCheckItem = (HW90_BLOCK_E)HW90_BLOCK_PHY0;
+	for (eCheckItem = (enum HW90_BLOCK_E)HW90_BLOCK_PHY0;
 	     eCheckItem <= HW90_BLOCK_PHY1; eCheckItem++) {
 		/* don't care RF path */
-		status = rtl8192_phy_checkBBAndRF(dev, (HW90_BLOCK_E)eCheckItem,
+		status = rtl8192_phy_checkBBAndRF(dev, (enum HW90_BLOCK_E)eCheckItem,
 						  (RF90_RADIO_PATH_E)0);
 		if (status != 0) {
 			RT_TRACE((COMP_ERR | COMP_PHY),
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index 4471a0e00936..0f680a04a468 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -34,13 +34,13 @@ extern u32 rtl819XRadioB_Array[];
 extern u32 rtl819XRadioC_Array[];
 extern u32 rtl819XRadioD_Array[];
 
-typedef enum _HW90_BLOCK {
+enum HW90_BLOCK_E {
 	HW90_BLOCK_MAC = 0,
 	HW90_BLOCK_PHY0 = 1,
 	HW90_BLOCK_PHY1 = 2,
 	HW90_BLOCK_RF = 3,
 	HW90_BLOCK_MAXIMUM = 4, /* Never use this */
-} HW90_BLOCK_E, *PHW90_BLOCK_E;
+};
 
 typedef enum _RF90_RADIO_PATH {
 	RF90_PATH_A = 0,			/* Radio Path A */
@@ -69,7 +69,7 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
 void rtl8192_phy_configmac(struct net_device *dev);
 void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType);
 u8 rtl8192_phy_checkBBAndRF(struct net_device *dev,
-			    HW90_BLOCK_E CheckBlock, RF90_RADIO_PATH_E eRFPath);
+			    enum HW90_BLOCK_E CheckBlock, RF90_RADIO_PATH_E eRFPath);
 void rtl8192_BBConfig(struct net_device *dev);
 void rtl8192_phy_getTxPower(struct net_device *dev);
 void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel);
-- 
2.18.0


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

* [PATCH 03/13] staging:rtl8192u: Remove typdef from enumeration RF90_RADIO_PATH_E - Style
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
  2018-07-13 11:22 ` [PATCH 01/13] staging:rtl8192u: remove typedef of enumeration SwChnlCmdID - Style John Whitmore
  2018-07-13 11:23 ` [PATCH 02/13] staging:rtl8192u: remove typdef from enumeration HW90_BLOCK_E " John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 04/13] staging:rtl8192u: remove typedef from structure SwChnlCmd " John Whitmore
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Checkpatch warns about the creation of new types. This patch simply removes
the typedef from the enumeration RF90_RADIO_PATH_E to clear this checkpatch
warning. There should be no impact on run time code execution, as this is a
coding style issue only.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r8190_rtl8256.c | 42 ++++++++++++------------
 drivers/staging/rtl8192u/r8192U_core.c   |  4 +--
 drivers/staging/rtl8192u/r819xU_phy.c    | 31 ++++++++++-------
 drivers/staging/rtl8192u/r819xU_phy.h    | 15 +++++----
 4 files changed, 51 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c
index 02bdd933f05b..9f35dcb9e13e 100644
--- a/drivers/staging/rtl8192u/r8190_rtl8256.c
+++ b/drivers/staging/rtl8192u/r8190_rtl8256.c
@@ -41,16 +41,16 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwi
 					|| priv->card_8192_version
 					== VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */
 					rtl8192_phy_SetRFReg(dev,
-						(RF90_RADIO_PATH_E)eRFPath,
+						(enum RF90_RADIO_PATH_E)eRFPath,
 						0x0b, bMask12Bits, 0x100); /* phy para:1ba */
 					rtl8192_phy_SetRFReg(dev,
-						(RF90_RADIO_PATH_E)eRFPath,
+						(enum RF90_RADIO_PATH_E)eRFPath,
 						0x2c, bMask12Bits, 0x3d7);
 					rtl8192_phy_SetRFReg(dev,
-						(RF90_RADIO_PATH_E)eRFPath,
+						(enum RF90_RADIO_PATH_E)eRFPath,
 						0x0e, bMask12Bits, 0x021);
 					rtl8192_phy_SetRFReg(dev,
-						(RF90_RADIO_PATH_E)eRFPath,
+						(enum RF90_RADIO_PATH_E)eRFPath,
 						0x14, bMask12Bits, 0x5ab);
 				} else {
 					RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n");
@@ -58,15 +58,15 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, enum ht_channel_width Bandwi
 				break;
 		case HT_CHANNEL_WIDTH_20_40:
 				if (priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */
-					rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300); /* phy para:3ba */
-					rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3df);
-					rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x0a1);
+					rtl8192_phy_SetRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300); /* phy para:3ba */
+					rtl8192_phy_SetRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3df);
+					rtl8192_phy_SetRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x0a1);
 
 					if (priv->chan == 3 || priv->chan == 9)
 						/* I need to set priv->chan whenever current channel changes */
-						rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x59b);
+						rtl8192_phy_SetRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x59b);
 					else
-						rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab);
+						rtl8192_phy_SetRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab);
 				} else {
 					RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n");
 					}
@@ -115,14 +115,14 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev)
 	u8	ConstRetryTimes = 5, RetryTimes = 5;
 	u8 ret = 0;
 	/* Initialize RF */
-	for (eRFPath = (RF90_RADIO_PATH_E)RF90_PATH_A; eRFPath < priv->NumTotalRFPath; eRFPath++) {
+	for (eRFPath = (enum RF90_RADIO_PATH_E)RF90_PATH_A; eRFPath < priv->NumTotalRFPath; eRFPath++) {
 		if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath))
 			continue;
 
 		pPhyReg = &priv->PHYRegDef[eRFPath];
 
 		/* Joseph test for shorten RF config
-		 * pHalData->RfReg0Value[eRFPath] =  rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, rGlobalCtrl, bMaskDWord);
+		 * pHalData->RfReg0Value[eRFPath] =  rtl8192_phy_QueryRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, rGlobalCtrl, bMaskDWord);
 		 * ----Store original RFENV control type
 		 */
 		switch (eRFPath) {
@@ -146,12 +146,12 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev)
 		rtl8192_setBBreg(dev, pPhyReg->rfHSSIPara2, b3WireAddressLength, 0x0);	/* Set 0 to 4 bits for Z-serial and set 1 to 6 bits for 8258 */
 		rtl8192_setBBreg(dev, pPhyReg->rfHSSIPara2, b3WireDataLength, 0x0);	/* Set 0 to 12 bits for Z-serial and 8258, and set 1 to 14 bits for ??? */
 
-		rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E) eRFPath, 0x0, bMask12Bits, 0xbf);
+		rtl8192_phy_SetRFReg(dev, (enum RF90_RADIO_PATH_E) eRFPath, 0x0, bMask12Bits, 0xbf);
 
 		/* Check RF block (for FPGA platform only)----
 		 * TODO: this function should be removed on ASIC , Emily 2007.2.2
 		 */
-		if (rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, (RF90_RADIO_PATH_E)eRFPath)) {
+		if (rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, (enum RF90_RADIO_PATH_E)eRFPath)) {
 			RT_TRACE(COMP_ERR, "PHY_RF8256_Config():Check Radio[%d] Fail!!\n", eRFPath);
 			goto phy_RF8256_Config_ParaFile_Fail;
 		}
@@ -162,32 +162,32 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev)
 		switch (eRFPath) {
 		case RF90_PATH_A:
 			while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) {
-				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (RF90_RADIO_PATH_E)eRFPath);
-				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
+				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (enum RF90_RADIO_PATH_E)eRFPath);
+				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
 				RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value);
 				RetryTimes--;
 			}
 			break;
 		case RF90_PATH_B:
 			while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) {
-				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (RF90_RADIO_PATH_E)eRFPath);
-				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
+				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (enum RF90_RADIO_PATH_E)eRFPath);
+				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
 				RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value);
 				RetryTimes--;
 			}
 			break;
 		case RF90_PATH_C:
 			while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) {
-				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (RF90_RADIO_PATH_E)eRFPath);
-				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
+				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (enum RF90_RADIO_PATH_E)eRFPath);
+				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
 				RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value);
 				RetryTimes--;
 			}
 			break;
 		case RF90_PATH_D:
 			while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) {
-				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (RF90_RADIO_PATH_E)eRFPath);
-				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
+				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (enum RF90_RADIO_PATH_E)eRFPath);
+				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (enum RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
 				RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value);
 				RetryTimes--;
 			}
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 848239e24859..b5ce3ee89e9f 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2897,7 +2897,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 			 */
 			for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
 				PHY_SetRFReg(Adapter,
-					     (RF90_RADIO_PATH_E)eRFPath,
+					     (enum RF90_RADIO_PATH_E)eRFPath,
 					     0x4, 0xC00, 0x0);
 		} else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) {
 			/* H/W or S/W RF OFF before sleep. */
@@ -2923,7 +2923,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 			 */
 			for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
 				PHY_SetRFReg(Adapter,
-					     (RF90_RADIO_PATH_E)eRFPath,
+					     (enum RF90_RADIO_PATH_E)eRFPath,
 					     0x4, 0xC00, 0x0);
 		}
 	}
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 0462de662eff..3df4775e1f99 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -108,11 +108,13 @@ u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask)
 	return (reg & bitmask) >> bitshift;
 }
 
-static u32 phy_FwRFSerialRead(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
+static u32 phy_FwRFSerialRead(struct net_device *dev,
+			      enum RF90_RADIO_PATH_E eRFPath,
 			      u32 offset);
 
 static void phy_FwRFSerialWrite(struct net_device *dev,
-				RF90_RADIO_PATH_E eRFPath, u32  offset,
+				enum RF90_RADIO_PATH_E eRFPath,
+				u32  offset,
 				u32  data);
 
 /******************************************************************************
@@ -130,7 +132,7 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
  *            ---need more spec for this information.
  ******************************************************************************/
 static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,
-				    RF90_RADIO_PATH_E eRFPath, u32 offset)
+				    enum RF90_RADIO_PATH_E eRFPath, u32 offset)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	u32 ret = 0;
@@ -215,7 +217,8 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,
  * ---------------------------------------------------------------------------
  *****************************************************************************/
 static void rtl8192_phy_RFSerialWrite(struct net_device *dev,
-				      RF90_RADIO_PATH_E eRFPath, u32 offset,
+				      enum RF90_RADIO_PATH_E eRFPath,
+				      u32 offset,
 				      u32 data)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -279,7 +282,8 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,
  * return:    none
  * notice:
  *****************************************************************************/
-void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
+void rtl8192_phy_SetRFReg(struct net_device *dev,
+			  enum RF90_RADIO_PATH_E eRFPath,
 			  u32 reg_addr, u32 bitmask, u32 data)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -327,7 +331,8 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
  * return:    u32               data     //the readback register value
  * notice:
  *****************************************************************************/
-u32 rtl8192_phy_QueryRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
+u32 rtl8192_phy_QueryRFReg(struct net_device *dev,
+			   enum RF90_RADIO_PATH_E eRFPath,
 			   u32 reg_addr, u32 bitmask)
 {
 	u32 reg, bitshift;
@@ -357,7 +362,8 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
  * return:    u32
  * notice:
  ****************************************************************************/
-static u32 phy_FwRFSerialRead(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
+static u32 phy_FwRFSerialRead(struct net_device *dev,
+			      enum RF90_RADIO_PATH_E eRFPath,
 			      u32 offset)
 {
 	u32		reg = 0;
@@ -422,7 +428,8 @@ static u32 phy_FwRFSerialRead(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
  * notice:
  ****************************************************************************/
 static void phy_FwRFSerialWrite(struct net_device *dev,
-				RF90_RADIO_PATH_E eRFPath, u32 offset, u32 data)
+				enum RF90_RADIO_PATH_E eRFPath,
+				u32 offset, u32 data)
 {
 	u8	time = 0;
 	u32	tmp;
@@ -696,7 +703,7 @@ static void rtl8192_InitBBRFRegDef(struct net_device *dev)
  * notice:    This function may be removed in the ASIC
  ******************************************************************************/
 u8 rtl8192_phy_checkBBAndRF(struct net_device *dev, enum HW90_BLOCK_E CheckBlock,
-			    RF90_RADIO_PATH_E eRFPath)
+			    enum RF90_RADIO_PATH_E eRFPath)
 {
 	u8 ret = 0;
 	u32 i, CheckTimes = 4, reg = 0;
@@ -791,7 +798,7 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 	     eCheckItem <= HW90_BLOCK_PHY1; eCheckItem++) {
 		/* don't care RF path */
 		status = rtl8192_phy_checkBBAndRF(dev, (enum HW90_BLOCK_E)eCheckItem,
-						  (RF90_RADIO_PATH_E)0);
+						  (enum RF90_RADIO_PATH_E)0);
 		if (status != 0) {
 			RT_TRACE((COMP_ERR | COMP_PHY),
 				 "PHY_RF8256_Config(): Check PHY%d Fail!!\n",
@@ -969,7 +976,7 @@ void rtl8192_phy_updateInitGain(struct net_device *dev)
  * notice:    Delay may be required for RF configuration
  *****************************************************************************/
 u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
-				      RF90_RADIO_PATH_E	eRFPath)
+				      enum RF90_RADIO_PATH_E	eRFPath)
 {
 
 	int i;
@@ -1387,7 +1394,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 		case CmdID_RF_WriteReg:
 			for (eRFPath = 0; eRFPath < RF90_PATH_MAX; eRFPath++) {
 				rtl8192_phy_SetRFReg(dev,
-						     (RF90_RADIO_PATH_E)eRFPath,
+						     (enum RF90_RADIO_PATH_E)eRFPath,
 						     CurrentCmd->Para1,
 						     bZebra1_ChannelNum,
 						     CurrentCmd->Para2);
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index 0f680a04a468..d93da2360649 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -42,13 +42,13 @@ enum HW90_BLOCK_E {
 	HW90_BLOCK_MAXIMUM = 4, /* Never use this */
 };
 
-typedef enum _RF90_RADIO_PATH {
+enum RF90_RADIO_PATH_E {
 	RF90_PATH_A = 0,			/* Radio Path A */
 	RF90_PATH_B = 1,			/* Radio Path B */
 	RF90_PATH_C = 2,			/* Radio Path C */
 	RF90_PATH_D = 3,			/* Radio Path D */
 	RF90_PATH_MAX				/* Max RF number 92 support */
-} RF90_RADIO_PATH_E, *PRF90_RADIO_PATH_E;
+};
 
 #define bMaskByte0                0xff
 #define bMaskByte1                0xff00
@@ -62,21 +62,24 @@ u8 rtl8192_phy_CheckIsLegalRFPath(struct net_device *dev, u32 eRFPath);
 void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr,
 		      u32 bitmask, u32 data);
 u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask);
-void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
+void rtl8192_phy_SetRFReg(struct net_device *dev,
+			  enum RF90_RADIO_PATH_E eRFPath,
 			  u32 reg_addr, u32 bitmask, u32 data);
-u32 rtl8192_phy_QueryRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
+u32 rtl8192_phy_QueryRFReg(struct net_device *dev,
+			   enum RF90_RADIO_PATH_E eRFPath,
 			   u32 reg_addr, u32 bitmask);
 void rtl8192_phy_configmac(struct net_device *dev);
 void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType);
 u8 rtl8192_phy_checkBBAndRF(struct net_device *dev,
-			    enum HW90_BLOCK_E CheckBlock, RF90_RADIO_PATH_E eRFPath);
+			    enum HW90_BLOCK_E CheckBlock,
+			    enum RF90_RADIO_PATH_E eRFPath);
 void rtl8192_BBConfig(struct net_device *dev);
 void rtl8192_phy_getTxPower(struct net_device *dev);
 void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel);
 void rtl8192_phy_RFConfig(struct net_device *dev);
 void rtl8192_phy_updateInitGain(struct net_device *dev);
 u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
-				      RF90_RADIO_PATH_E eRFPath);
+				      enum RF90_RADIO_PATH_E eRFPath);
 
 u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel);
 void rtl8192_SetBWMode(struct net_device *dev,
-- 
2.18.0


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

* [PATCH 04/13] staging:rtl8192u: remove typedef from structure SwChnlCmd - Style
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (2 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 03/13] staging:rtl8192u: Remove typdef from enumeration RF90_RADIO_PATH_E " John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 05/13] staging:rtl8192u: Rename SwChnlCmdID > switch_chan_cmd_id - Coding Style John Whitmore
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Checkpatch warns against creation of new types in code. This patch simply
removes the "typedef" declaration of the structure SwChnlCmd to clear this
issue. Simple coding style issue which should not impact runtime execution.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 3df4775e1f99..d88f6c3ed46f 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1227,11 +1227,11 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
  * return:    true if finished, false otherwise
  * notice:
  ******************************************************************************/
-static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
+static u8 rtl8192_phy_SetSwChnlCmdArray(struct SwChnlCmd *CmdTable, u32 CmdTableIdx,
 					u32 CmdTableSz, enum SwChnlCmdID CmdID,
 					u32 Para1, u32 Para2, u32 msDelay)
 {
-	SwChnlCmd *pCmd;
+	struct SwChnlCmd *pCmd;
 
 	if (CmdTable == NULL) {
 		RT_TRACE(COMP_ERR, "%s(): CmdTable cannot be NULL\n", __func__);
@@ -1268,14 +1268,14 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 				       u8 *stage, u8 *step, u32 *delay)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	SwChnlCmd	PreCommonCmd[MAX_PRECMD_CNT];
-	u32		PreCommonCmdCnt;
-	SwChnlCmd	PostCommonCmd[MAX_POSTCMD_CNT];
-	u32		PostCommonCmdCnt;
-	SwChnlCmd	RfDependCmd[MAX_RFDEPENDCMD_CNT];
-	u32		RfDependCmdCnt;
-	SwChnlCmd	*CurrentCmd = NULL;
-	u8		eRFPath;
+	struct SwChnlCmd   PreCommonCmd[MAX_PRECMD_CNT];
+	u32		   PreCommonCmdCnt;
+	struct SwChnlCmd   PostCommonCmd[MAX_POSTCMD_CNT];
+	u32		   PostCommonCmdCnt;
+	struct SwChnlCmd   RfDependCmd[MAX_RFDEPENDCMD_CNT];
+	u32		   RfDependCmdCnt;
+	struct SwChnlCmd  *CurrentCmd = NULL;
+	u8		   eRFPath;
 
 	RT_TRACE(COMP_CH, "%s() stage: %d, step: %d, channel: %d\n",
 		 __func__, *stage, *step, channel);
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index d93da2360649..a02e1e0ea643 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -19,12 +19,12 @@ enum SwChnlCmdID {
 
 /* -----------------------Define structure---------------------- */
 /* 1. Switch channel related */
-typedef struct _SwChnlCmd {
+struct SwChnlCmd {
 	enum SwChnlCmdID	CmdID;
 	u32		        Para1;
 	u32		        Para2;
 	u32		        msDelay;
-} __packed SwChnlCmd;
+} __packed;
 
 extern u32 rtl819XMACPHY_Array_PG[];
 extern u32 rtl819XPHY_REG_1T2RArray[];
-- 
2.18.0


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

* [PATCH 05/13] staging:rtl8192u: Rename SwChnlCmdID > switch_chan_cmd_id - Coding Style
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (3 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 04/13] staging:rtl8192u: remove typedef from structure SwChnlCmd " John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 06/13] staging:rtl8192u: Rename enum label CmdID_End > CMD_ID_END - Style John Whitmore
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename enumerated type to clear a CamelCase warning from checkpatch. The
change is style only. No impact on run time execution.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index d88f6c3ed46f..c373dbe06154 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1219,7 +1219,7 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
  * input:     SwChnlCmd      *CmdTable    //table to be set
  *            u32            CmdTableIdx  //variable index in table to be set
  *            u32            CmdTableSz   //table size
- *            SwChnlCmdID    CmdID        //command ID to set
+ *            switch_chan_cmd_id    CmdID        //command ID to set
  *            u32            Para1
  *            u32            Para2
  *            u32            msDelay
@@ -1228,7 +1228,7 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
  * notice:
  ******************************************************************************/
 static u8 rtl8192_phy_SetSwChnlCmdArray(struct SwChnlCmd *CmdTable, u32 CmdTableIdx,
-					u32 CmdTableSz, enum SwChnlCmdID CmdID,
+					u32 CmdTableSz, enum switch_chan_cmd_id CmdID,
 					u32 Para1, u32 Para2, u32 msDelay)
 {
 	struct SwChnlCmd *pCmd;
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index a02e1e0ea643..0c63c646b625 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -7,7 +7,7 @@
 #define MAX_RFDEPENDCMD_CNT 16
 #define MAX_POSTCMD_CNT 16
 
-enum SwChnlCmdID {
+enum switch_chan_cmd_id {
 	CmdID_End,
 	CmdID_SetTxPowerLevel,
 	CmdID_BBRegWrite10,
@@ -20,7 +20,7 @@ enum SwChnlCmdID {
 /* -----------------------Define structure---------------------- */
 /* 1. Switch channel related */
 struct SwChnlCmd {
-	enum SwChnlCmdID	CmdID;
+	enum switch_chan_cmd_id	CmdID;
 	u32		        Para1;
 	u32		        Para2;
 	u32		        msDelay;
-- 
2.18.0


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

* [PATCH 06/13] staging:rtl8192u: Rename enum label CmdID_End > CMD_ID_END - Style
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (4 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 05/13] staging:rtl8192u: Rename SwChnlCmdID > switch_chan_cmd_id - Coding Style John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 07/13] staging:rtl8192u: rename CmdID_SetTxPowerLevel > CMD_ID_SET_TX_PWR_LEVEL John Whitmore
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename enum label to clear a CamelCase warning from checkpatch. This is a
simple style change and should not impact execution.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index c373dbe06154..c67159f2d9ab 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1295,13 +1295,13 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 				      MAX_PRECMD_CNT, CmdID_SetTxPowerLevel,
 				      0, 0, 0);
 	rtl8192_phy_SetSwChnlCmdArray(PreCommonCmd, PreCommonCmdCnt++,
-				      MAX_PRECMD_CNT, CmdID_End, 0, 0, 0);
+				      MAX_PRECMD_CNT, CMD_ID_END, 0, 0, 0);
 
 	/* <2> Fill up post common command. */
 	PostCommonCmdCnt = 0;
 
 	rtl8192_phy_SetSwChnlCmdArray(PostCommonCmd, PostCommonCmdCnt++,
-				      MAX_POSTCMD_CNT, CmdID_End, 0, 0, 0);
+				      MAX_POSTCMD_CNT, CMD_ID_END, 0, 0, 0);
 
 	/* <3> Fill up RF dependent command. */
 	RfDependCmdCnt = 0;
@@ -1321,7 +1321,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 					      10);
 		rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++,
 					      MAX_RFDEPENDCMD_CNT,
-					      CmdID_End, 0, 0, 0);
+					      CMD_ID_END, 0, 0, 0);
 		break;
 
 	case RF_8256:
@@ -1338,7 +1338,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 					      rZebra1_Channel, channel, 10);
 		rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++,
 					      MAX_RFDEPENDCMD_CNT,
-					      CmdID_End, 0, 0, 0);
+					      CMD_ID_END, 0, 0, 0);
 		break;
 
 	case RF_8258:
@@ -1363,7 +1363,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 			break;
 		}
 
-		if (CurrentCmd->CmdID == CmdID_End) {
+		if (CurrentCmd->CmdID == CMD_ID_END) {
 			if ((*stage) == 2) {
 				(*delay) = CurrentCmd->msDelay;
 				return true;
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index 0c63c646b625..efbca1f458f5 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -8,7 +8,7 @@
 #define MAX_POSTCMD_CNT 16
 
 enum switch_chan_cmd_id {
-	CmdID_End,
+	CMD_ID_END,
 	CmdID_SetTxPowerLevel,
 	CmdID_BBRegWrite10,
 	CmdID_WritePortUlong,
-- 
2.18.0


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

* [PATCH 07/13] staging:rtl8192u: rename CmdID_SetTxPowerLevel > CMD_ID_SET_TX_PWR_LEVEL
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (5 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 06/13] staging:rtl8192u: Rename enum label CmdID_End > CMD_ID_END - Style John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 08/13] staging:rtl8192u: Remove unused enum label CmdID_BBRegWrite10 John Whitmore
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename enumeration label CmdID_SetTxPowerLevel to
CMD_ID_SET_TX_PWR_LEVEL. This change clears a checkpatch warning on
CamelCase. The change should not impact runtime execution, style change only.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index c67159f2d9ab..0b850abe3533 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1292,7 +1292,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 	/* <1> Fill up pre common command. */
 	PreCommonCmdCnt = 0;
 	rtl8192_phy_SetSwChnlCmdArray(PreCommonCmd, PreCommonCmdCnt++,
-				      MAX_PRECMD_CNT, CmdID_SetTxPowerLevel,
+				      MAX_PRECMD_CNT, CMD_ID_SET_TX_PWR_LEVEL,
 				      0, 0, 0);
 	rtl8192_phy_SetSwChnlCmdArray(PreCommonCmd, PreCommonCmdCnt++,
 				      MAX_PRECMD_CNT, CMD_ID_END, 0, 0, 0);
@@ -1374,7 +1374,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 		}
 
 		switch (CurrentCmd->CmdID) {
-		case CmdID_SetTxPowerLevel:
+		case CMD_ID_SET_TX_PWR_LEVEL:
 			if (priv->card_8192_version == (u8)VERSION_819xU_A)
 				/* consider it later! */
 				rtl8192_SetTxPowerLevel(dev, channel);
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index efbca1f458f5..91b2e9e39368 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -9,7 +9,7 @@
 
 enum switch_chan_cmd_id {
 	CMD_ID_END,
-	CmdID_SetTxPowerLevel,
+	CMD_ID_SET_TX_PWR_LEVEL,
 	CmdID_BBRegWrite10,
 	CmdID_WritePortUlong,
 	CmdID_WritePortUshort,
-- 
2.18.0


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

* [PATCH 08/13] staging:rtl8192u: Remove unused enum label CmdID_BBRegWrite10
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (6 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 07/13] staging:rtl8192u: rename CmdID_SetTxPowerLevel > CMD_ID_SET_TX_PWR_LEVEL John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 09/13] staging:rtl8192u: Rename CmdID_WritePortUlong > CMD_ID_WRITE_PORT_ULONG John Whitmore
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

The enum label CmdID_BBRegWrite10 is not used in the code, so removed from the
source code.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index 91b2e9e39368..d69b03ce7bd9 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -10,7 +10,6 @@
 enum switch_chan_cmd_id {
 	CMD_ID_END,
 	CMD_ID_SET_TX_PWR_LEVEL,
-	CmdID_BBRegWrite10,
 	CmdID_WritePortUlong,
 	CmdID_WritePortUshort,
 	CmdID_WritePortUchar,
-- 
2.18.0


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

* [PATCH 09/13] staging:rtl8192u: Rename CmdID_WritePortUlong > CMD_ID_WRITE_PORT_ULONG
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (7 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 08/13] staging:rtl8192u: Remove unused enum label CmdID_BBRegWrite10 John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 10/13] staging:rtl8192u: Rename CmdID_WritePortUshort > CMD_ID_WRITE_PORT_USHORT John Whitmore
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename enum label CmdID_WritePortUlong to CMD_ID_WRITE_PORT_ULONG to clear the
checkpatch CamelCase issue. Simple syle change which should not impact code
execution.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 0b850abe3533..a10d3455b1f8 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1379,7 +1379,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 				/* consider it later! */
 				rtl8192_SetTxPowerLevel(dev, channel);
 			break;
-		case CmdID_WritePortUlong:
+		case CMD_ID_WRITE_PORT_ULONG:
 			write_nic_dword(dev, CurrentCmd->Para1,
 					CurrentCmd->Para2);
 			break;
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index d69b03ce7bd9..95250ac4764e 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -10,7 +10,7 @@
 enum switch_chan_cmd_id {
 	CMD_ID_END,
 	CMD_ID_SET_TX_PWR_LEVEL,
-	CmdID_WritePortUlong,
+	CMD_ID_WRITE_PORT_ULONG,
 	CmdID_WritePortUshort,
 	CmdID_WritePortUchar,
 	CmdID_RF_WriteReg,
-- 
2.18.0


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

* [PATCH 10/13] staging:rtl8192u: Rename CmdID_WritePortUshort > CMD_ID_WRITE_PORT_USHORT
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (8 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 09/13] staging:rtl8192u: Rename CmdID_WritePortUlong > CMD_ID_WRITE_PORT_ULONG John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 11/13] staging:rtl8192u: Rename CmdID_WritePortUchar > CMD_ID_WRITE_PORT_UCHAR John Whitmore
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the enum label CmdID_WritePortUshort to CMD_ID_WRITE_PORT_USHORT to
clear the checkpatch warning on CamelCase naming. This is a coding style
change only and should not impact code execution.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index a10d3455b1f8..a681e7eab219 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1383,7 +1383,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 			write_nic_dword(dev, CurrentCmd->Para1,
 					CurrentCmd->Para2);
 			break;
-		case CmdID_WritePortUshort:
+		case CMD_ID_WRITE_PORT_USHORT:
 			write_nic_word(dev, CurrentCmd->Para1,
 				       (u16)CurrentCmd->Para2);
 			break;
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index 95250ac4764e..45372a2ff7c5 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -11,7 +11,7 @@ enum switch_chan_cmd_id {
 	CMD_ID_END,
 	CMD_ID_SET_TX_PWR_LEVEL,
 	CMD_ID_WRITE_PORT_ULONG,
-	CmdID_WritePortUshort,
+	CMD_ID_WRITE_PORT_USHORT,
 	CmdID_WritePortUchar,
 	CmdID_RF_WriteReg,
 };
-- 
2.18.0


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

* [PATCH 11/13] staging:rtl8192u: Rename CmdID_WritePortUchar > CMD_ID_WRITE_PORT_UCHAR
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (9 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 10/13] staging:rtl8192u: Rename CmdID_WritePortUshort > CMD_ID_WRITE_PORT_USHORT John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 12/13] staging:rtl8192u: Rename CmdID_RF_WriteReg > CMD_ID_RF_WRITE_REG - Style John Whitmore
  2018-07-13 11:23 ` [PATCH 13/13] staging:rtl8192u: Rename file macro to avoid camel case - Coding Style John Whitmore
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the enum label CmdID_WritePortUchar to CMD_ID_WRITE_PORT_UCHAR, to
clear the checkpatch issue with CamelCase. The change is a coding style change
only and should not impact code execution.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index a681e7eab219..6c57c38dc9fe 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1387,7 +1387,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 			write_nic_word(dev, CurrentCmd->Para1,
 				       (u16)CurrentCmd->Para2);
 			break;
-		case CmdID_WritePortUchar:
+		case CMD_ID_WRITE_PORT_UCHAR:
 			write_nic_byte(dev, CurrentCmd->Para1,
 				       (u8)CurrentCmd->Para2);
 			break;
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index 45372a2ff7c5..1496f74768c9 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -12,7 +12,7 @@ enum switch_chan_cmd_id {
 	CMD_ID_SET_TX_PWR_LEVEL,
 	CMD_ID_WRITE_PORT_ULONG,
 	CMD_ID_WRITE_PORT_USHORT,
-	CmdID_WritePortUchar,
+	CMD_ID_WRITE_PORT_UCHAR,
 	CmdID_RF_WriteReg,
 };
 
-- 
2.18.0


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

* [PATCH 12/13] staging:rtl8192u: Rename CmdID_RF_WriteReg > CMD_ID_RF_WRITE_REG - Style
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (10 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 11/13] staging:rtl8192u: Rename CmdID_WritePortUchar > CMD_ID_WRITE_PORT_UCHAR John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  2018-07-13 11:23 ` [PATCH 13/13] staging:rtl8192u: Rename file macro to avoid camel case - Coding Style John Whitmore
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename enum label CmdID_RF_WriteReg to CMD_ID_RF_WRITE_REG. This change clears
the checkpatch issue with CamelCase. The change is style only and should not
impact code execution.

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

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 6c57c38dc9fe..75fcd3134b6d 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1315,7 +1315,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 		}
 		rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++,
 					      MAX_RFDEPENDCMD_CNT,
-					      CmdID_RF_WriteReg,
+					      CMD_ID_RF_WRITE_REG,
 					      rZebra1_Channel,
 					      RF_CHANNEL_TABLE_ZEBRA[channel],
 					      10);
@@ -1334,7 +1334,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 		}
 		rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++,
 					      MAX_RFDEPENDCMD_CNT,
-					      CmdID_RF_WriteReg,
+					      CMD_ID_RF_WRITE_REG,
 					      rZebra1_Channel, channel, 10);
 		rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++,
 					      MAX_RFDEPENDCMD_CNT,
@@ -1391,7 +1391,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 			write_nic_byte(dev, CurrentCmd->Para1,
 				       (u8)CurrentCmd->Para2);
 			break;
-		case CmdID_RF_WriteReg:
+		case CMD_ID_RF_WRITE_REG:
 			for (eRFPath = 0; eRFPath < RF90_PATH_MAX; eRFPath++) {
 				rtl8192_phy_SetRFReg(dev,
 						     (enum RF90_RADIO_PATH_E)eRFPath,
diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index 1496f74768c9..75aa56ddd22f 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -13,7 +13,7 @@ enum switch_chan_cmd_id {
 	CMD_ID_WRITE_PORT_ULONG,
 	CMD_ID_WRITE_PORT_USHORT,
 	CMD_ID_WRITE_PORT_UCHAR,
-	CmdID_RF_WriteReg,
+	CMD_ID_RF_WRITE_REG,
 };
 
 /* -----------------------Define structure---------------------- */
-- 
2.18.0


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

* [PATCH 13/13] staging:rtl8192u: Rename file macro to avoid camel case - Coding Style
  2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
                   ` (11 preceding siblings ...)
  2018-07-13 11:23 ` [PATCH 12/13] staging:rtl8192u: Rename CmdID_RF_WriteReg > CMD_ID_RF_WRITE_REG - Style John Whitmore
@ 2018-07-13 11:23 ` John Whitmore
  12 siblings, 0 replies; 14+ messages in thread
From: John Whitmore @ 2018-07-13 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Simple rename of the preprosessor switch, protecting against multiple
inclusion of the header file. Change to clear the checkpatch coding style
issue.

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

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 37aa36126d19..5f7b7b182ef6 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -15,8 +15,8 @@
  * project Authors.
  */
 
-#ifndef R819xU_H
-#define R819xU_H
+#ifndef R8192U_H
+#define R8192U_H
 
 #include <linux/compiler.h>
 #include <linux/module.h>
-- 
2.18.0


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

end of thread, other threads:[~2018-07-13 11:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 11:22 [0/13] staging:rtl8192u: Coding style changes John Whitmore
2018-07-13 11:22 ` [PATCH 01/13] staging:rtl8192u: remove typedef of enumeration SwChnlCmdID - Style John Whitmore
2018-07-13 11:23 ` [PATCH 02/13] staging:rtl8192u: remove typdef from enumeration HW90_BLOCK_E " John Whitmore
2018-07-13 11:23 ` [PATCH 03/13] staging:rtl8192u: Remove typdef from enumeration RF90_RADIO_PATH_E " John Whitmore
2018-07-13 11:23 ` [PATCH 04/13] staging:rtl8192u: remove typedef from structure SwChnlCmd " John Whitmore
2018-07-13 11:23 ` [PATCH 05/13] staging:rtl8192u: Rename SwChnlCmdID > switch_chan_cmd_id - Coding Style John Whitmore
2018-07-13 11:23 ` [PATCH 06/13] staging:rtl8192u: Rename enum label CmdID_End > CMD_ID_END - Style John Whitmore
2018-07-13 11:23 ` [PATCH 07/13] staging:rtl8192u: rename CmdID_SetTxPowerLevel > CMD_ID_SET_TX_PWR_LEVEL John Whitmore
2018-07-13 11:23 ` [PATCH 08/13] staging:rtl8192u: Remove unused enum label CmdID_BBRegWrite10 John Whitmore
2018-07-13 11:23 ` [PATCH 09/13] staging:rtl8192u: Rename CmdID_WritePortUlong > CMD_ID_WRITE_PORT_ULONG John Whitmore
2018-07-13 11:23 ` [PATCH 10/13] staging:rtl8192u: Rename CmdID_WritePortUshort > CMD_ID_WRITE_PORT_USHORT John Whitmore
2018-07-13 11:23 ` [PATCH 11/13] staging:rtl8192u: Rename CmdID_WritePortUchar > CMD_ID_WRITE_PORT_UCHAR John Whitmore
2018-07-13 11:23 ` [PATCH 12/13] staging:rtl8192u: Rename CmdID_RF_WriteReg > CMD_ID_RF_WRITE_REG - Style John Whitmore
2018-07-13 11:23 ` [PATCH 13/13] staging:rtl8192u: Rename file macro to avoid camel case - Coding Style 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).