[PATCH 1/7] staging:rtl8192u: Remove typedef and rename QOS_TCLAS - Style

John Whitmore johnfwhitmore at gmail.com
Sat Aug 4 09:18:53 UTC 2018


Remove the typedef from the union QOS_TCLAS, which causes a checkpatch
issue with defining new types. In addition, as a type, the name should
be in lowercase so has been changed.

These are coding style changes and should have no impact on runtime
code execution.

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

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
index 5cf00a2e08ae..823ba363e0ab 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
@@ -14,7 +14,7 @@ enum tr_select {
 	RX_DIR = 1,
 };
 
-typedef union _QOS_TCLAS {
+union qos_tclas {
 
 	struct _TYPE_GENERAL {
 		u8		Priority;
@@ -63,7 +63,7 @@ typedef union _QOS_TCLAS {
 		u8		Mask;
 		u16		TagType;
 	} TYPE2_8021Q;
-} QOS_TCLAS, *PQOS_TCLAS;
+};
 
 struct ts_common_info {
 	struct list_head		list;
@@ -71,7 +71,7 @@ struct ts_common_info {
 	struct timer_list		inact_timer;
 	u8				addr[6];
 	struct tspec_body		t_spec;
-	QOS_TCLAS			t_class[TCLAS_NUM];
+	union qos_tclas			t_class[TCLAS_NUM];
 	u8				t_clas_proc;
 	u8				t_clas_num;
 };
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index de06cd11ab65..d46d8f468671 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -105,7 +105,7 @@ static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)
 {
 	eth_zero_addr(pTsCommonInfo->addr);
 	memset(&pTsCommonInfo->t_spec, 0, sizeof(struct tspec_body));
-	memset(&pTsCommonInfo->t_class, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
+	memset(&pTsCommonInfo->t_class, 0, sizeof(union qos_tclas)*TCLAS_NUM);
 	pTsCommonInfo->t_clas_proc = 0;
 	pTsCommonInfo->t_clas_num = 0;
 }
@@ -265,7 +265,7 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 }
 
 static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
-			struct tspec_body *pTSPEC, PQOS_TCLAS pTCLAS, u8 TCLAS_Num,
+			struct tspec_body *pTSPEC, union qos_tclas *pTCLAS, u8 TCLAS_Num,
 			u8 TCLAS_Proc)
 {
 	u8	count;
@@ -279,7 +279,7 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
 		memcpy((u8 *)(&(pTsCommonInfo->t_spec)), (u8 *)pTSPEC, sizeof(struct tspec_body));
 
 	for(count = 0; count < TCLAS_Num; count++)
-		memcpy((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS, sizeof(QOS_TCLAS));
+		memcpy((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS, sizeof(union qos_tclas));
 
 	pTsCommonInfo->t_clas_proc = TCLAS_Proc;
 	pTsCommonInfo->t_clas_num = TCLAS_Num;
-- 
2.18.0



More information about the devel mailing list