Skip to contentSkip to conversation

staging:rtl8192u: [0/10] Coding style changes.

PATCH Superseded John Whitmore 3 participants 17 messages Jul 13, 2018 – Jul 16, 2018 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

All coding style changes, but the second [2/10] is a bit more hairy then most. The original code combined two typedef declarations into one with both the structure and a pointer to the structure defined. I've totally removed the pointer to the structure type since it uses Hungarian notation, which the coding standard isn't keen on.

As a result of this there are changes in code from the type:
PStructType *ppname;
to:
struct StructType **ppname;

To keep the diff simple I've kept the current nameing of "ppname", which again is Hungarian notation. I'll leave that for a future patch.

jwhitmore

#1 lore raw

PATCH 1/10 staging:rtl8192u: remove typedef of enumeration TR_SELECT - Style

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

---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h      |  4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 10 +++++-----
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     |  4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +2 -2
index 3b7968681f77..0fa55af7060a 100644
@@ -2391,7 +2391,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb);
 void TsInitAddBA(struct ieee80211_device *ieee, PTX_TS_RECORD pTS,
 		 u8 Policy, u8 bOverwritePending);
 void TsInitDelBA(struct ieee80211_device *ieee,
-		 PTS_COMMON_INFO pTsCommonInfo, TR_SELECT TxRxSelect);
+		 PTS_COMMON_INFO pTsCommonInfo, enum TR_SELECT TxRxSelect);
 void BaSetupTimeOut(struct timer_list *t);
 void TxBaInactTimeout(struct timer_list *t);
 void RxBaInactTimeout(struct timer_list *t);
@@ -2402,7 +2402,7 @@ bool GetTs(
 	PTS_COMMON_INFO                 *ppTS,
 	u8                              *Addr,
 	u8                              TID,
-	TR_SELECT                       TxRxSelect,  //Rx:1, Tx:0
+	enum TR_SELECT                  TxRxSelect,  //Rx:1, Tx:0
 	bool                            bAddNewTs
 	);
 void TSInitialize(struct ieee80211_device *ieee);
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +5 -5
index 2dc4d0e93948..07d64ae12fdd 100644
@@ -174,7 +174,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P
  *function:  construct DELBA frame
  *   input:  u8*		dst	//DELBA frame's destination
  *	     PBA_RECORD		pBA	//BA_RECORD entry which stores the necessary information for BA
- *	     TR_SELECT	        TxRxSelect  //TX RX direction
+ *	     enum TR_SELECT	TxRxSelect  //TX RX direction
  *	     u16		ReasonCode  //status code.
  *  output:  none
  *  return:  sk_buff*		skb     //return constructed skb to xmit
@@ -183,7 +183,7 @@ static struct sk_buff *ieee80211_DELBA(
 	struct ieee80211_device  *ieee,
 	u8		         *dst,
 	PBA_RECORD		 pBA,
-	TR_SELECT		 TxRxSelect,
+	enum TR_SELECT		 TxRxSelect,
 	u16			 ReasonCode
 	)
 {
@@ -290,14 +290,14 @@ static void ieee80211_send_ADDBARsp(struct ieee80211_device *ieee, u8 *dst,
  *function: send ADDBARSP frame out
  *   input:  u8*		dst	//DELBA frame's destination
  *	     PBA_RECORD		pBA	//BA_RECORD entry which stores the necessary information for BA
- *	     TR_SELECT          TxRxSelect //TX or RX
+ *	     enum TR_SELECT     TxRxSelect //TX or RX
  *	     u16		ReasonCode //DEL ReasonCode
  *  output:  none
  *  notice: If any possible, please hide pBA in ieee. And temporarily use Manage Queue as softmac_mgmt_xmit() usually does
  ********************************************************************************************************************/
 
 static void ieee80211_send_DELBA(struct ieee80211_device *ieee, u8 *dst,
-				 PBA_RECORD pBA, TR_SELECT TxRxSelect,
+				 PBA_RECORD pBA, enum TR_SELECT TxRxSelect,
 				 u16 ReasonCode)
 {
 	struct sk_buff *skb;
@@ -638,7 +638,7 @@ TsInitAddBA(
 }
 
 void
-TsInitDelBA(struct ieee80211_device *ieee, PTS_COMMON_INFO pTsCommonInfo, TR_SELECT TxRxSelect)
+TsInitDelBA(struct ieee80211_device *ieee, PTS_COMMON_INFO pTsCommonInfo, enum TR_SELECT TxRxSelect)
 {
 	if (TxRxSelect == TX_DIR) {
 		PTX_TS_RECORD	pTxTs = (PTX_TS_RECORD)pTsCommonInfo;
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +2 -2
index 3a0ff08c687a..3a5347818718 100644
@@ -10,10 +10,10 @@
 #define TCLAS_NUM		4
 
 /*  This define the Tx/Rx directions */
-typedef enum _TR_SELECT {
+enum TR_SELECT {
 	TX_DIR = 0,
 	RX_DIR = 1,
-} TR_SELECT, *PTR_SELECT;
+};
 
 typedef struct _TS_COMMON_INFO {
 	struct list_head		List;
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +3 -3
index e60a26250682..75d269a7bf09 100644
@@ -204,7 +204,7 @@ static void AdmitTS(struct ieee80211_device *ieee,
 
 static PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee,
 					   u8 *Addr, u8 TID,
-					   TR_SELECT TxRxSelect)
+					   enum TR_SELECT TxRxSelect)
 {
 	//DIRECTION_VALUE	dir;
 	u8	dir;
@@ -291,7 +291,7 @@ bool GetTs(
 	PTS_COMMON_INFO			*ppTS,
 	u8				*Addr,
 	u8				TID,
-	TR_SELECT			TxRxSelect,  //Rx:1, Tx:0
+	enum TR_SELECT			TxRxSelect,  //Rx:1, Tx:0
 	bool				bAddNewTs
 	)
 {
@@ -408,7 +408,7 @@ bool GetTs(
 }
 
 static void RemoveTsEntry(struct ieee80211_device *ieee, PTS_COMMON_INFO pTs,
-			  TR_SELECT TxRxSelect)
+			  enum TR_SELECT TxRxSelect)
 {
 	//u32 flags = 0;
 	unsigned long flags = 0;
Signature · 1 line
2.18.0
maintainer
#2 lore raw

Re: [PATCH 01/10] staging:rtl8192u: remove typedef of enumeration TR_SELECT - Style

Quoted 25 lines · John Whitmore

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

---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h      |  4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 10 +++++-----
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     |  4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +1 -1
index 3b7968681f77..0fa55af7060a 100644
@@ -2391,7 +2391,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb);
 void TsInitAddBA(struct ieee80211_device *ieee, PTX_TS_RECORD pTS,
 		 u8 Policy, u8 bOverwritePending);
 void TsInitDelBA(struct ieee80211_device *ieee,
-		 PTS_COMMON_INFO pTsCommonInfo, TR_SELECT TxRxSelect);
+		 PTS_COMMON_INFO pTsCommonInfo, enum TR_SELECT TxRxSelect);
 void BaSetupTimeOut(struct timer_list *t);
 void TxBaInactTimeout(struct timer_list *t);
 void RxBaInactTimeout(struct timer_list *t);

drivers/staging/rtl8192u/ieee80211/ieee80211.h bool GetTs( · line 2405

Quoted 5 lines
drivers/staging/rtl8192u/ieee80211/ieee80211.h +1 -1
@@ -2402,7 +2402,7 @@ bool GetTs(
 	PTS_COMMON_INFO                 *ppTS,
 	u8                              *Addr,
 	u8                              TID,
-	TR_SELECT                       TxRxSelect,  //Rx:1, Tx:0
+	enum TR_SELECT                  TxRxSelect,  //Rx:1, Tx:0

This really should be "enum tr_select", right? No ALL CAPS variable types please.

thanks,

greg k-h

#3 lore raw

Re: [PATCH 01/10] staging:rtl8192u: remove typedef of enumeration TR_SELECT - Style

Quoted 26 lines · Greg KH
Quoted 25 lines · John Whitmore

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

---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h      |  4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 10 +++++-----
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     |  4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +1 -1
index 3b7968681f77..0fa55af7060a 100644
@@ -2391,7 +2391,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb);
 void TsInitAddBA(struct ieee80211_device *ieee, PTX_TS_RECORD pTS,
 		 u8 Policy, u8 bOverwritePending);
 void TsInitDelBA(struct ieee80211_device *ieee,
-		 PTS_COMMON_INFO pTsCommonInfo, TR_SELECT TxRxSelect);
+		 PTS_COMMON_INFO pTsCommonInfo, enum TR_SELECT TxRxSelect);
 void BaSetupTimeOut(struct timer_list *t);
 void TxBaInactTimeout(struct timer_list *t);
 void RxBaInactTimeout(struct timer_list *t);
@@ -2402,7 +2402,7 @@ bool GetTs(
Quoted 9 lines

drivers/staging/rtl8192u/ieee80211/ieee80211.h bool GetTs( · line 2405

Quoted 5 lines
drivers/staging/rtl8192u/ieee80211/ieee80211.h +1 -1
 	PTS_COMMON_INFO                 *ppTS,
 	u8                              *Addr,
 	u8                              TID,
-	TR_SELECT                       TxRxSelect,  //Rx:1, Tx:0
+	enum TR_SELECT                  TxRxSelect,  //Rx:1, Tx:0

This really should be "enum tr_select", right? No ALL CAPS variable types please.

Absolutely, I was trying to make small changes, not doing too much in a single patch. I know there's a happy medium somewhere. I'll fix that up and resend series again.

Cheers

John

#4 lore raw

PATCH 2/10 staging:rtl8192u: remove typedef of struct TS_COMMON_INFO - Style

In reply to John Whitmore

To clear a checkpatch issue removed the typedef of the structure TS_COMMON_INFO.

This change removes the previous declaration, which defined two types, both TS_COMMON_INFO and a pointer type PTS_COMMON_INFO:

typedef struct _TS_COMMON_INFO {
	...
} TS_COMMON_INFO, *PTS_COMMON_INFO;

The pointer type has been completely removed from the code, as:
"(so-called Hungarian notation) is brain damaged" according to the coding standard.

---
 .../staging/rtl8192u/ieee80211/ieee80211.h    |  4 ++--
 .../staging/rtl8192u/ieee80211/ieee80211_rx.c |  4 ++--
 .../staging/rtl8192u/ieee80211/ieee80211_tx.c |  4 ++--
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       | 10 ++++----
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   |  8 +++----
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       | 24 +++++++++----------
 6 files changed, 27 insertions(+), 27 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +2 -2
index 0fa55af7060a..f4e1c9655fa0 100644
@@ -2391,7 +2391,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb);
 void TsInitAddBA(struct ieee80211_device *ieee, PTX_TS_RECORD pTS,
 		 u8 Policy, u8 bOverwritePending);
 void TsInitDelBA(struct ieee80211_device *ieee,
-		 PTS_COMMON_INFO pTsCommonInfo, enum TR_SELECT TxRxSelect);
+		 struct TS_COMMON_INFO *pTsCommonInfo, enum TR_SELECT TxRxSelect);
 void BaSetupTimeOut(struct timer_list *t);
 void TxBaInactTimeout(struct timer_list *t);
 void RxBaInactTimeout(struct timer_list *t);
@@ -2399,7 +2399,7 @@ void ResetBaEntry(PBA_RECORD pBA);
 //function in TS.c
 bool GetTs(
 	struct ieee80211_device		*ieee,
-	PTS_COMMON_INFO                 *ppTS,
+	struct TS_COMMON_INFO           **ppTS,
 	u8                              *Addr,
 	u8                              TID,
 	enum TR_SELECT                  TxRxSelect,  //Rx:1, Tx:0
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +2 -2
index 172165f4461a..55563d0a7ae0 100644
@@ -1021,7 +1021,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 			//IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): QOS ENABLE AND RECEIVE QOS DATA , we will get Ts, tid:%d\n",__func__, tid);
 		if(GetTs(
 				ieee,
-				(PTS_COMMON_INFO *) &pRxTS,
+				(struct TS_COMMON_INFO **) &pRxTS,
 				hdr->addr2,
 				Frame_QoSTID((u8 *)(skb->data)),
 				RX_DIR,
@@ -1266,7 +1266,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	{
 		TID = Frame_QoSTID(skb->data);
 		SeqNum = WLAN_GET_SEQ_SEQ(sc);
-		GetTs(ieee,(PTS_COMMON_INFO *) &pTS,hdr->addr2,TID,RX_DIR,true);
+		GetTs(ieee,(struct TS_COMMON_INFO **) &pTS,hdr->addr2,TID,RX_DIR,true);
 		if (TID !=0 && TID !=3)
 		{
 			ieee->bis_any_nonbepkts = true;
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +2 -2
index 9a1a84548bc6..d7a6ab5742a7 100644
@@ -330,7 +330,7 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
 	}
 	if(pHTInfo->bCurrentAMPDUEnable)
 	{
-		if (!GetTs(ieee, (PTS_COMMON_INFO *)(&pTxTs), hdr->addr1, skb->priority, TX_DIR, true))
+		if (!GetTs(ieee, (struct TS_COMMON_INFO **)(&pTxTs), hdr->addr1, skb->priority, TX_DIR, true))
 		{
 			printk("===>can't get TS\n");
 			return;
@@ -585,7 +585,7 @@ static void ieee80211_query_seqnum(struct ieee80211_device *ieee,
 	if (IsQoSDataFrame(skb->data)) //we deal qos data only
 	{
 		PTX_TS_RECORD pTS = NULL;
-		if (!GetTs(ieee, (PTS_COMMON_INFO *)(&pTS), dst, skb->priority, TX_DIR, true))
+		if (!GetTs(ieee, (struct TS_COMMON_INFO **)(&pTS), dst, skb->priority, TX_DIR, true))
 		{
 			return;
 		}
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +5 -5
index 07d64ae12fdd..6434ba47e5cb 100644
@@ -360,7 +360,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	// If there is no matched TS, reject the ADDBA request.
 	if (!GetTs(
 			ieee,
-			(PTS_COMMON_INFO *)(&pTS),
+			(struct TS_COMMON_INFO **)(&pTS),
 			dst,
 			(u8)(pBaParamSet->field.TID),
 			RX_DIR,
@@ -459,7 +459,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	//
 	if (!GetTs(
 			ieee,
-			(PTS_COMMON_INFO *)(&pTS),
+			(struct TS_COMMON_INFO **)(&pTS),
 			dst,
 			(u8)(pBaParamSet->field.TID),
 			TX_DIR,
@@ -570,7 +570,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
 
 		if (!GetTs(
 				ieee,
-				(PTS_COMMON_INFO *)&pRxTs,
+				(struct TS_COMMON_INFO **)&pRxTs,
 				dst,
 				(u8)pDelBaParamSet->field.TID,
 				RX_DIR,
@@ -585,7 +585,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
 
 		if (!GetTs(
 			ieee,
-			(PTS_COMMON_INFO *)&pTxTs,
+			(struct TS_COMMON_INFO **)&pTxTs,
 			dst,
 			(u8)pDelBaParamSet->field.TID,
 			TX_DIR,
@@ -638,7 +638,7 @@ TsInitAddBA(
 }
 
 void
-TsInitDelBA(struct ieee80211_device *ieee, PTS_COMMON_INFO pTsCommonInfo, enum TR_SELECT TxRxSelect)
+TsInitDelBA(struct ieee80211_device *ieee, struct TS_COMMON_INFO *pTsCommonInfo, enum TR_SELECT TxRxSelect)
 {
 	if (TxRxSelect == TX_DIR) {
 		PTX_TS_RECORD	pTxTs = (PTX_TS_RECORD)pTsCommonInfo;
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +4 -4
index 3a5347818718..39ce5d89883f 100644
@@ -15,7 +15,7 @@ enum TR_SELECT {
 	RX_DIR = 1,
 };
 
-typedef struct _TS_COMMON_INFO {
+struct TS_COMMON_INFO {
 	struct list_head		List;
 	struct timer_list		SetupTimer;
 	struct timer_list		InactTimer;
@@ -24,10 +24,10 @@ typedef struct _TS_COMMON_INFO {
 	QOS_TCLAS			TClass[TCLAS_NUM];
 	u8				TClasProc;
 	u8				TClasNum;
-} TS_COMMON_INFO, *PTS_COMMON_INFO;
+};
 
 typedef struct _TX_TS_RECORD {
-	TS_COMMON_INFO		TsCommonInfo;
+	struct TS_COMMON_INFO		TsCommonInfo;
 	u16				TxCurSeq;
 	BA_RECORD			TxPendingBARecord;	/*  For BA Originator */
 	BA_RECORD			TxAdmittedBARecord;	/*  For BA Originator */
@@ -40,7 +40,7 @@ typedef struct _TX_TS_RECORD {
 } TX_TS_RECORD, *PTX_TS_RECORD;
 
 typedef struct _RX_TS_RECORD {
-	TS_COMMON_INFO		TsCommonInfo;
+	struct TS_COMMON_INFO		TsCommonInfo;
 	u16				RxIndicateSeq;
 	u16				RxTimeoutIndicateSeq;
 	struct list_head		RxPendingPktList;
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +12 -12
index 75d269a7bf09..a3bcb15037af 100644
@@ -101,7 +101,7 @@ static void TsAddBaProcess(struct timer_list *t)
 }
 
 
-static void ResetTsCommonInfo(PTS_COMMON_INFO pTsCommonInfo)
+static void ResetTsCommonInfo(struct TS_COMMON_INFO *pTsCommonInfo)
 {
 	eth_zero_addr(pTsCommonInfo->Addr);
 	memset(&pTsCommonInfo->TSpec, 0, sizeof(TSPEC_BODY));
@@ -191,7 +191,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 }
 
 static void AdmitTS(struct ieee80211_device *ieee,
-		    PTS_COMMON_INFO pTsCommonInfo, u32 InactTime)
+		    struct TS_COMMON_INFO *pTsCommonInfo, u32 InactTime)
 {
 	del_timer_sync(&pTsCommonInfo->SetupTimer);
 	del_timer_sync(&pTsCommonInfo->InactTimer);
@@ -202,15 +202,15 @@ static void AdmitTS(struct ieee80211_device *ieee,
 }
 
 
-static PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee,
-					   u8 *Addr, u8 TID,
-					   enum TR_SELECT TxRxSelect)
+static struct TS_COMMON_INFO *SearchAdmitTRStream(struct ieee80211_device *ieee,
+						  u8 *Addr, u8 TID,
+						  enum TR_SELECT TxRxSelect)
 {
 	//DIRECTION_VALUE	dir;
 	u8	dir;
 	bool				search_dir[4] = {0};
 	struct list_head		*psearch_list; //FIXME
-	PTS_COMMON_INFO	pRet = NULL;
+	struct TS_COMMON_INFO	*pRet = NULL;
 	if(ieee->iw_mode == IW_MODE_MASTER) { //ap mode
 		if(TxRxSelect == TX_DIR) {
 			search_dir[DIR_DOWN] = true;
@@ -264,7 +264,7 @@ static PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee,
 		return NULL;
 }
 
-static void MakeTSEntry(PTS_COMMON_INFO pTsCommonInfo, u8 *Addr,
+static void MakeTSEntry(struct TS_COMMON_INFO *pTsCommonInfo, u8 *Addr,
 			PTSPEC_BODY pTSPEC, PQOS_TCLAS pTCLAS, u8 TCLAS_Num,
 			u8 TCLAS_Proc)
 {
@@ -288,7 +288,7 @@ static void MakeTSEntry(PTS_COMMON_INFO pTsCommonInfo, u8 *Addr,
 
 bool GetTs(
 	struct ieee80211_device		*ieee,
-	PTS_COMMON_INFO			*ppTS,
+	struct TS_COMMON_INFO		**ppTS,
 	u8				*Addr,
 	u8				TID,
 	enum TR_SELECT			TxRxSelect,  //Rx:1, Tx:0
@@ -371,7 +371,7 @@ bool GetTs(
 								((TxRxSelect==TX_DIR)?DIR_UP:DIR_DOWN);
 			IEEE80211_DEBUG(IEEE80211_DL_TS, "to add Ts\n");
 			if(!list_empty(pUnusedList)) {
-				(*ppTS) = list_entry(pUnusedList->next, TS_COMMON_INFO, List);
+				(*ppTS) = list_entry(pUnusedList->next, struct TS_COMMON_INFO, List);
 				list_del_init(&(*ppTS)->List);
 				if(TxRxSelect==TX_DIR) {
 					PTX_TS_RECORD tmp = container_of(*ppTS, TX_TS_RECORD, TsCommonInfo);
@@ -407,7 +407,7 @@ bool GetTs(
 	}
 }
 
-static void RemoveTsEntry(struct ieee80211_device *ieee, PTS_COMMON_INFO pTs,
+static void RemoveTsEntry(struct ieee80211_device *ieee, struct TS_COMMON_INFO *pTs,
 			  enum TR_SELECT TxRxSelect)
 {
 	//u32 flags = 0;
@@ -454,7 +454,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, PTS_COMMON_INFO pTs,
 
 void RemovePeerTS(struct ieee80211_device *ieee, u8 *Addr)
 {
-	PTS_COMMON_INFO	pTS, pTmpTS;
+	struct TS_COMMON_INFO	*pTS, *pTmpTS;
 
 	printk("===========>RemovePeerTS,%pM\n", Addr);
 	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) {
@@ -493,7 +493,7 @@ void RemovePeerTS(struct ieee80211_device *ieee, u8 *Addr)
 
 void RemoveAllTS(struct ieee80211_device *ieee)
 {
-	PTS_COMMON_INFO pTS, pTmpTS;
+	struct TS_COMMON_INFO *pTS, *pTmpTS;
 
 	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) {
 		RemoveTsEntry(ieee, pTS, TX_DIR);
Signature · 1 line
2.18.0
maintainer
#5 lore raw

Re: [PATCH 02/10] staging:rtl8192u: remove typedef of struct TS_COMMON_INFO - Style

Quoted 10 lines · John Whitmore

To clear a checkpatch issue removed the typedef of the structure TS_COMMON_INFO.

This change removes the previous declaration, which defined two types, both TS_COMMON_INFO and a pointer type PTS_COMMON_INFO:

typedef struct _TS_COMMON_INFO {
	...
} TS_COMMON_INFO, *PTS_COMMON_INFO;

Same here, this should be "struct ts_common_info", not TS_COMMON_INFO.

Can you fix both of these issues up and resend the series?

thanks,

greg k-h

#6 lore raw

Re: [PATCH 02/10] staging:rtl8192u: remove typedef of struct TS_COMMON_INFO - Style

Quoted 7 lines · Greg KH
Quoted 6 lines · John Whitmore

To clear a checkpatch issue removed the typedef of the structure TS_COMMON_INFO.

This change removes the previous declaration, which defined two types, both TS_COMMON_INFO and a pointer type PTS_COMMON_INFO:

Quoted 9 lines
Quoted 4 lines
typedef struct _TS_COMMON_INFO {
	...
} TS_COMMON_INFO, *PTS_COMMON_INFO;

Same here, this should be "struct ts_common_info", not TS_COMMON_INFO.

Can you fix both of these issues up and resend the series?

No problem, I'll fix up the series and resend.

John

#7 lore raw

PATCH 3/10 staging:rtl8192u: Rename List > list - Coding style

In reply to John Whitmore

In struct TS_COMMON_INFO rename the member List to list. This clears the checkpatch issue concerning CamelCase naming of variables.

---
 .../staging/rtl8192u/ieee80211/rtl819x_TS.h   |  2 +-
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       | 64 +++++++++----------
 2 files changed, 33 insertions(+), 33 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index 39ce5d89883f..bf1e01cde407 100644
@@ -16,7 +16,7 @@ enum TR_SELECT {
 };
 
 struct TS_COMMON_INFO {
-	struct list_head		List;
+	struct list_head		list;
 	struct timer_list		SetupTimer;
 	struct timer_list		InactTimer;
 	u8				Addr[6];
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +32 -32

143 lines not on this page · raw message

Signature · 1 line
2.18.0
#8 lore raw

PATCH 4/10 staging:rtl8192u: rename SetupTimer > setup_timer - Style

In reply to John Whitmore

Rename the struct TS_COMMON_INFO member SetupTimer to setup_timer. This clears the checkpatch issue with CamelCase variable names.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index bf1e01cde407..4601e5fd3e9c 100644
@@ -17,7 +17,7 @@ enum TR_SELECT {
 
 struct TS_COMMON_INFO {
 	struct list_head		list;
-	struct timer_list		SetupTimer;
+	struct timer_list		setup_timer;
 	struct timer_list		InactTimer;
 	u8				Addr[6];
 	TSPEC_BODY			TSpec;
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +4 -4
index cc6fdcb7c5fb..cda20ee023b2 100644
@@ -146,7 +146,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 		pTxTS->num = count;
 		// The timers for the operation of Traffic Stream and Block Ack.
 		// DLS related timer will be add here in the future!!
-		timer_setup(&pTxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut,
+		timer_setup(&pTxTS->TsCommonInfo.setup_timer, TsSetupTimeOut,
 			    0);
 		timer_setup(&pTxTS->TsCommonInfo.InactTimer, TsInactTimeout,
 			    0);
@@ -167,7 +167,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 	for(count = 0; count < TOTAL_TS_NUM; count++) {
 		pRxTS->num = count;
 		INIT_LIST_HEAD(&pRxTS->RxPendingPktList);
-		timer_setup(&pRxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut,
+		timer_setup(&pRxTS->TsCommonInfo.setup_timer, TsSetupTimeOut,
 			    0);
 		timer_setup(&pRxTS->TsCommonInfo.InactTimer, TsInactTimeout,
 			    0);
@@ -193,7 +193,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 static void AdmitTS(struct ieee80211_device *ieee,
 		    struct TS_COMMON_INFO *pTsCommonInfo, u32 InactTime)
 {
-	del_timer_sync(&pTsCommonInfo->SetupTimer);
+	del_timer_sync(&pTsCommonInfo->setup_timer);
 	del_timer_sync(&pTsCommonInfo->InactTimer);
 
 	if(InactTime!=0)
@@ -412,7 +412,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct TS_COMMON_INFO *
 {
 	//u32 flags = 0;
 	unsigned long flags = 0;
-	del_timer_sync(&pTs->SetupTimer);
+	del_timer_sync(&pTs->setup_timer);
 	del_timer_sync(&pTs->InactTimer);
 	TsInitDelBA(ieee, pTs, TxRxSelect);
 
Signature · 1 line
2.18.0
#9 lore raw

PATCH 5/10 staging:rtl8192u: Rename InactTimer > inact_timer - Style

In reply to John Whitmore

Rename the struct TS_COMMON_INFO member InactTimer to inact_timer. This change clears the checkpatch issue with CamelCase naming. The change should not have any impact on runtime execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     |  2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index 4601e5fd3e9c..9c0998db220f 100644
@@ -18,7 +18,7 @@ enum TR_SELECT {
 struct TS_COMMON_INFO {
 	struct list_head		list;
 	struct timer_list		setup_timer;
-	struct timer_list		InactTimer;
+	struct timer_list		inact_timer;
 	u8				Addr[6];
 	TSPEC_BODY			TSpec;
 	QOS_TCLAS			TClass[TCLAS_NUM];
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +5 -5
index cda20ee023b2..04cc101f680e 100644
@@ -148,7 +148,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 		// DLS related timer will be add here in the future!!
 		timer_setup(&pTxTS->TsCommonInfo.setup_timer, TsSetupTimeOut,
 			    0);
-		timer_setup(&pTxTS->TsCommonInfo.InactTimer, TsInactTimeout,
+		timer_setup(&pTxTS->TsCommonInfo.inact_timer, TsInactTimeout,
 			    0);
 		timer_setup(&pTxTS->TsAddBaTimer, TsAddBaProcess, 0);
 		timer_setup(&pTxTS->TxPendingBARecord.Timer, BaSetupTimeOut,
@@ -169,7 +169,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 		INIT_LIST_HEAD(&pRxTS->RxPendingPktList);
 		timer_setup(&pRxTS->TsCommonInfo.setup_timer, TsSetupTimeOut,
 			    0);
-		timer_setup(&pRxTS->TsCommonInfo.InactTimer, TsInactTimeout,
+		timer_setup(&pRxTS->TsCommonInfo.inact_timer, TsInactTimeout,
 			    0);
 		timer_setup(&pRxTS->RxAdmittedBARecord.Timer,
 			    RxBaInactTimeout, 0);
@@ -194,10 +194,10 @@ static void AdmitTS(struct ieee80211_device *ieee,
 		    struct TS_COMMON_INFO *pTsCommonInfo, u32 InactTime)
 {
 	del_timer_sync(&pTsCommonInfo->setup_timer);
-	del_timer_sync(&pTsCommonInfo->InactTimer);
+	del_timer_sync(&pTsCommonInfo->inact_timer);
 
 	if(InactTime!=0)
-		mod_timer(&pTsCommonInfo->InactTimer,
+		mod_timer(&pTsCommonInfo->inact_timer,
 			  jiffies + msecs_to_jiffies(InactTime));
 }
 
@@ -413,7 +413,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct TS_COMMON_INFO *
 	//u32 flags = 0;
 	unsigned long flags = 0;
 	del_timer_sync(&pTs->setup_timer);
-	del_timer_sync(&pTs->InactTimer);
+	del_timer_sync(&pTs->inact_timer);
 	TsInitDelBA(ieee, pTs, TxRxSelect);
 
 	if(TxRxSelect == RX_DIR) {
Signature · 1 line
2.18.0
#10 lore raw

PATCH 6/10 staging:rtl8192u: Rename Addr > addr - Style

In reply to John Whitmore

Rename the TX_COMMON_INFO structure's member Addr to addr. This change clears the checkpatch issue with CamelCase naming. This is a coding style change only and should not impact runtime execution.

---
 .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c    | 10 +++++-----
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h    |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_TSProc.c    | 14 +++++++-------
 3 files changed, 13 insertions(+), 13 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +5 -5
index 6434ba47e5cb..f9716db4509e 100644
@@ -634,7 +634,7 @@ TsInitAddBA(
 
 	ActivateBAEntry(ieee, pBA, BA_SETUP_TIMEOUT);
 
-	ieee80211_send_ADDBAReq(ieee, pTS->TsCommonInfo.Addr, pBA);
+	ieee80211_send_ADDBAReq(ieee, pTS->TsCommonInfo.addr, pBA);
 }
 
 void
@@ -646,7 +646,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct TS_COMMON_INFO *pTsCommonInfo,
 		if (TxTsDeleteBA(ieee, pTxTs))
 			ieee80211_send_DELBA(
 				ieee,
-				pTsCommonInfo->Addr,
+				pTsCommonInfo->addr,
 				(pTxTs->TxAdmittedBARecord.bValid)?(&pTxTs->TxAdmittedBARecord):(&pTxTs->TxPendingBARecord),
 				TxRxSelect,
 				DELBA_REASON_END_BA);
@@ -655,7 +655,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct TS_COMMON_INFO *pTsCommonInfo,
 		if (RxTsDeleteBA(ieee, pRxTs))
 			ieee80211_send_DELBA(
 				ieee,
-				pTsCommonInfo->Addr,
+				pTsCommonInfo->addr,
 				&pRxTs->RxAdmittedBARecord,
 				TxRxSelect,
 				DELBA_REASON_END_BA);
@@ -683,7 +683,7 @@ void TxBaInactTimeout(struct timer_list *t)
 	TxTsDeleteBA(ieee, pTxTs);
 	ieee80211_send_DELBA(
 		ieee,
-		pTxTs->TsCommonInfo.Addr,
+		pTxTs->TsCommonInfo.addr,
 		&pTxTs->TxAdmittedBARecord,
 		TX_DIR,
 		DELBA_REASON_TIMEOUT);
@@ -697,7 +697,7 @@ void RxBaInactTimeout(struct timer_list *t)
 	RxTsDeleteBA(ieee, pRxTs);
 	ieee80211_send_DELBA(
 		ieee,
-		pRxTs->TsCommonInfo.Addr,
+		pRxTs->TsCommonInfo.addr,
 		&pRxTs->RxAdmittedBARecord,
 		RX_DIR,
 		DELBA_REASON_TIMEOUT);
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index 9c0998db220f..4ad152920be4 100644
@@ -19,7 +19,7 @@ struct TS_COMMON_INFO {
 	struct list_head		list;
 	struct timer_list		setup_timer;
 	struct timer_list		inact_timer;
-	u8				Addr[6];
+	u8				addr[6];
 	TSPEC_BODY			TSpec;
 	QOS_TCLAS			TClass[TCLAS_NUM];
 	u8				TClasProc;
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +7 -7
index 04cc101f680e..80e03dc73bae 100644
@@ -103,7 +103,7 @@ static void TsAddBaProcess(struct timer_list *t)
 
 static void ResetTsCommonInfo(struct TS_COMMON_INFO *pTsCommonInfo)
 {
-	eth_zero_addr(pTsCommonInfo->Addr);
+	eth_zero_addr(pTsCommonInfo->addr);
 	memset(&pTsCommonInfo->TSpec, 0, sizeof(TSPEC_BODY));
 	memset(&pTsCommonInfo->TClass, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
 	pTsCommonInfo->TClasProc = 0;
@@ -247,7 +247,7 @@ static struct TS_COMMON_INFO *SearchAdmitTRStream(struct ieee80211_device *ieee,
 			continue;
 		list_for_each_entry(pRet, psearch_list, list){
 	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
-			if (memcmp(pRet->Addr, Addr, 6) == 0)
+			if (memcmp(pRet->addr, Addr, 6) == 0)
 				if (pRet->TSpec.f.TSInfo.field.ucTSID == TID)
 					if(pRet->TSpec.f.TSInfo.field.ucDirection == dir) {
 	//					printk("Bingo! got it\n");
@@ -273,7 +273,7 @@ static void MakeTSEntry(struct TS_COMMON_INFO *pTsCommonInfo, u8 *Addr,
 	if(pTsCommonInfo == NULL)
 		return;
 
-	memcpy(pTsCommonInfo->Addr, Addr, 6);
+	memcpy(pTsCommonInfo->addr, Addr, 6);
 
 	if(pTSPEC != NULL)
 		memcpy((u8 *)(&(pTsCommonInfo->TSpec)), (u8 *)pTSPEC, sizeof(TSPEC_BODY));
@@ -458,7 +458,7 @@ void RemovePeerTS(struct ieee80211_device *ieee, u8 *Addr)
 
 	printk("===========>RemovePeerTS,%pM\n", Addr);
 	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, list) {
-		if (memcmp(pTS->Addr, Addr, 6) == 0) {
+		if (memcmp(pTS->addr, Addr, 6) == 0) {
 			RemoveTsEntry(ieee, pTS, TX_DIR);
 			list_del_init(&pTS->list);
 			list_add_tail(&pTS->list, &ieee->Tx_TS_Unused_List);
@@ -466,7 +466,7 @@ void RemovePeerTS(struct ieee80211_device *ieee, u8 *Addr)
 	}
 
 	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, list) {
-		if (memcmp(pTS->Addr, Addr, 6) == 0) {
+		if (memcmp(pTS->addr, Addr, 6) == 0) {
 			printk("====>remove Tx_TS_admin_list\n");
 			RemoveTsEntry(ieee, pTS, TX_DIR);
 			list_del_init(&pTS->list);
@@ -475,7 +475,7 @@ void RemovePeerTS(struct ieee80211_device *ieee, u8 *Addr)
 	}
 
 	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Rx_TS_Pending_List, list) {
-		if (memcmp(pTS->Addr, Addr, 6) == 0) {
+		if (memcmp(pTS->addr, Addr, 6) == 0) {
 			RemoveTsEntry(ieee, pTS, RX_DIR);
 			list_del_init(&pTS->list);
 			list_add_tail(&pTS->list, &ieee->Rx_TS_Unused_List);
@@ -483,7 +483,7 @@ void RemovePeerTS(struct ieee80211_device *ieee, u8 *Addr)
 	}
 
 	list_for_each_entry_safe(pTS, pTmpTS, &ieee->Rx_TS_Admit_List, list) {
-		if (memcmp(pTS->Addr, Addr, 6) == 0) {
+		if (memcmp(pTS->addr, Addr, 6) == 0) {
 			RemoveTsEntry(ieee, pTS, RX_DIR);
 			list_del_init(&pTS->list);
 			list_add_tail(&pTS->list, &ieee->Rx_TS_Unused_List);
Signature · 1 line
2.18.0
#11 lore raw

PATCH 7/10 staging:rtl8192u: Rename TSpec > t_spec - Style

In reply to John Whitmore

Rename the TS_COMMON_INFO structure's member TSpec to t_spec. This change clears the checkpatch issue with CamelCase naming of variables. There should be no impact on runtime execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +1 -1
index f9716db4509e..03a22ef59dfb 100644
@@ -626,7 +626,7 @@ TsInitAddBA(
 	pBA->DialogToken++;						// DialogToken: Only keep the latest dialog token
 	pBA->BaParamSet.field.AMSDU_Support = 0;	// Do not support A-MSDU with A-MPDU now!!
 	pBA->BaParamSet.field.BAPolicy = Policy;	// Policy: Delayed or Immediate
-	pBA->BaParamSet.field.TID = pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID;	// TID
+	pBA->BaParamSet.field.TID = pTS->TsCommonInfo.t_spec.f.TSInfo.field.ucTSID;	// TID
 	// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaParamSet.field.BufferSize = 32;		// BufferSize: This need to be set according to A-MPDU vector
 	pBA->BaTimeoutValue = 0;					// Timeout value: Set 0 to disable Timer
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index 4ad152920be4..d84092d17441 100644
@@ -20,7 +20,7 @@ struct TS_COMMON_INFO {
 	struct timer_list		setup_timer;
 	struct timer_list		inact_timer;
 	u8				addr[6];
-	TSPEC_BODY			TSpec;
+	TSPEC_BODY			t_spec;
 	QOS_TCLAS			TClass[TCLAS_NUM];
 	u8				TClasProc;
 	u8				TClasNum;
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +4 -4
index 80e03dc73bae..8df665f4028d 100644
@@ -104,7 +104,7 @@ static void TsAddBaProcess(struct timer_list *t)
 static void ResetTsCommonInfo(struct TS_COMMON_INFO *pTsCommonInfo)
 {
 	eth_zero_addr(pTsCommonInfo->addr);
-	memset(&pTsCommonInfo->TSpec, 0, sizeof(TSPEC_BODY));
+	memset(&pTsCommonInfo->t_spec, 0, sizeof(TSPEC_BODY));
 	memset(&pTsCommonInfo->TClass, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
 	pTsCommonInfo->TClasProc = 0;
 	pTsCommonInfo->TClasNum = 0;
@@ -248,8 +248,8 @@ static struct TS_COMMON_INFO *SearchAdmitTRStream(struct ieee80211_device *ieee,
 		list_for_each_entry(pRet, psearch_list, list){
 	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
 			if (memcmp(pRet->addr, Addr, 6) == 0)
-				if (pRet->TSpec.f.TSInfo.field.ucTSID == TID)
-					if(pRet->TSpec.f.TSInfo.field.ucDirection == dir) {
+				if (pRet->t_spec.f.TSInfo.field.ucTSID == TID)
+					if(pRet->t_spec.f.TSInfo.field.ucDirection == dir) {
 	//					printk("Bingo! got it\n");
 						break;
 					}
@@ -276,7 +276,7 @@ static void MakeTSEntry(struct TS_COMMON_INFO *pTsCommonInfo, u8 *Addr,
 	memcpy(pTsCommonInfo->addr, Addr, 6);
 
 	if(pTSPEC != NULL)
-		memcpy((u8 *)(&(pTsCommonInfo->TSpec)), (u8 *)pTSPEC, sizeof(TSPEC_BODY));
+		memcpy((u8 *)(&(pTsCommonInfo->t_spec)), (u8 *)pTSPEC, sizeof(TSPEC_BODY));
 
 	for(count = 0; count < TCLAS_Num; count++)
 		memcpy((u8 *)(&(pTsCommonInfo->TClass[count])), (u8 *)pTCLAS, sizeof(QOS_TCLAS));
Signature · 1 line
2.18.0
#12 lore raw

PATCH 8/10 staging:rtl8192u: Rename TClass > t_class - Style

In reply to John Whitmore

Rename the struct TS_COMMON_INFO member variable from TClass to t_class. This change clears the checkpatch issue with CamelCase Variable names. There should be no impact on runtime execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index d84092d17441..4fee83f2589b 100644
@@ -21,7 +21,7 @@ struct TS_COMMON_INFO {
 	struct timer_list		inact_timer;
 	u8				addr[6];
 	TSPEC_BODY			t_spec;
-	QOS_TCLAS			TClass[TCLAS_NUM];
+	QOS_TCLAS			t_class[TCLAS_NUM];
 	u8				TClasProc;
 	u8				TClasNum;
 };
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +2 -2
index 8df665f4028d..bf4f60e6aacf 100644
@@ -105,7 +105,7 @@ static void ResetTsCommonInfo(struct TS_COMMON_INFO *pTsCommonInfo)
 {
 	eth_zero_addr(pTsCommonInfo->addr);
 	memset(&pTsCommonInfo->t_spec, 0, sizeof(TSPEC_BODY));
-	memset(&pTsCommonInfo->TClass, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
+	memset(&pTsCommonInfo->t_class, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
 	pTsCommonInfo->TClasProc = 0;
 	pTsCommonInfo->TClasNum = 0;
 }
@@ -279,7 +279,7 @@ static void MakeTSEntry(struct TS_COMMON_INFO *pTsCommonInfo, u8 *Addr,
 		memcpy((u8 *)(&(pTsCommonInfo->t_spec)), (u8 *)pTSPEC, sizeof(TSPEC_BODY));
 
 	for(count = 0; count < TCLAS_Num; count++)
-		memcpy((u8 *)(&(pTsCommonInfo->TClass[count])), (u8 *)pTCLAS, sizeof(QOS_TCLAS));
+		memcpy((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS, sizeof(QOS_TCLAS));
 
 	pTsCommonInfo->TClasProc = TCLAS_Proc;
 	pTsCommonInfo->TClasNum = TCLAS_Num;
Signature · 1 line
2.18.0
#13 lore raw

PATCH 9/10 staging:trl8192u: Rename TClasProc > t_clas_proc - Style

In reply to John Whitmore

Rename the struct TS_COMMON_INFO member variable TClasProc to t_clas_proc. This change clears the checkpatch issue with CamelCase variable names. There should be no impact on runtime execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index 4fee83f2589b..ffa2983b8f8f 100644
@@ -22,7 +22,7 @@ struct TS_COMMON_INFO {
 	u8				addr[6];
 	TSPEC_BODY			t_spec;
 	QOS_TCLAS			t_class[TCLAS_NUM];
-	u8				TClasProc;
+	u8				t_clas_proc;
 	u8				TClasNum;
 };
 
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +2 -2
index bf4f60e6aacf..1a6a0b938b63 100644
@@ -106,7 +106,7 @@ static void ResetTsCommonInfo(struct TS_COMMON_INFO *pTsCommonInfo)
 	eth_zero_addr(pTsCommonInfo->addr);
 	memset(&pTsCommonInfo->t_spec, 0, sizeof(TSPEC_BODY));
 	memset(&pTsCommonInfo->t_class, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
-	pTsCommonInfo->TClasProc = 0;
+	pTsCommonInfo->t_clas_proc = 0;
 	pTsCommonInfo->TClasNum = 0;
 }
 
@@ -281,7 +281,7 @@ static void MakeTSEntry(struct TS_COMMON_INFO *pTsCommonInfo, u8 *Addr,
 	for(count = 0; count < TCLAS_Num; count++)
 		memcpy((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS, sizeof(QOS_TCLAS));
 
-	pTsCommonInfo->TClasProc = TCLAS_Proc;
+	pTsCommonInfo->t_clas_proc = TCLAS_Proc;
 	pTsCommonInfo->TClasNum = TCLAS_Num;
 }
 
Signature · 1 line
2.18.0
#14 lore raw

PATCH 10/10 staging:rtl8192u: Rename TClasNum > t_clas_num - Style

In reply to John Whitmore

Rename the struct TS_COMMON_INFO member variable TClasNum to t_clas_num. This change clears the checkpatch issue with CamelCase naming. There should be no impact on runtime execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +1 -1
index ffa2983b8f8f..79f129312ee9 100644
@@ -23,7 +23,7 @@ struct TS_COMMON_INFO {
 	TSPEC_BODY			t_spec;
 	QOS_TCLAS			t_class[TCLAS_NUM];
 	u8				t_clas_proc;
-	u8				TClasNum;
+	u8				t_clas_num;
 };
 
 typedef struct _TX_TS_RECORD {
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +2 -2
index 1a6a0b938b63..96842e9a28fd 100644
@@ -107,7 +107,7 @@ static void ResetTsCommonInfo(struct TS_COMMON_INFO *pTsCommonInfo)
 	memset(&pTsCommonInfo->t_spec, 0, sizeof(TSPEC_BODY));
 	memset(&pTsCommonInfo->t_class, 0, sizeof(QOS_TCLAS)*TCLAS_NUM);
 	pTsCommonInfo->t_clas_proc = 0;
-	pTsCommonInfo->TClasNum = 0;
+	pTsCommonInfo->t_clas_num = 0;
 }
 
 static void ResetTxTsEntry(PTX_TS_RECORD pTS)
@@ -282,7 +282,7 @@ static void MakeTSEntry(struct TS_COMMON_INFO *pTsCommonInfo, u8 *Addr,
 		memcpy((u8 *)(&(pTsCommonInfo->t_class[count])), (u8 *)pTCLAS, sizeof(QOS_TCLAS));
 
 	pTsCommonInfo->t_clas_proc = TCLAS_Proc;
-	pTsCommonInfo->TClasNum = TCLAS_Num;
+	pTsCommonInfo->t_clas_num = TCLAS_Num;
 }
 
 
Signature · 1 line
2.18.0
maintainer
#15 lore raw
In reply to John Whitmore
Quoted 6 lines · John Whitmore

All coding style changes, but the second [2/10] is a bit more hairy then most. The original code combined two typedef declarations into one with both the structure and a pointer to the structure defined. I've totally removed the pointer to the structure type since it uses Hungarian notation, which the coding standard isn't keen on.

Quoted 7 lines

As a result of this there are changes in code from the type:
PStructType *ppname;
to:
struct StructType **ppname;

To keep the diff simple I've kept the current nameing of "ppname", which again is Hungarian notation. I'll leave that for a future patch.

Nit, your subject should look like:

Subject: [PATCH 00/10] staging:rtl8192u: Coding style changes.

What are you using to generate this email? git format-patch --cover-letter should generate it with a correct subject line prefix, right?

thanks,

greg k-h

#16 lore raw
Quoted 15 lines · Greg KH
Quoted 6 lines · John Whitmore

All coding style changes, but the second [2/10] is a bit more hairy then most. The original code combined two typedef declarations into one with both the structure and a pointer to the structure defined. I've totally removed the pointer to the structure type since it uses Hungarian notation, which the coding standard isn't keen on.

Quoted 7 lines

As a result of this there are changes in code from the type:
PStructType *ppname;
to:
struct StructType **ppname;

To keep the diff simple I've kept the current nameing of "ppname", which again is Hungarian notation. I'll leave that for a future patch.

Quoted 8 lines

Nit, your subject should look like:

Subject: [PATCH 00/10] staging:rtl8192u: Coding style changes.

What are you using to generate this email? git format-patch --cover-letter should generate it with a correct subject line prefix, right?

Oops! I was using "git send-email --compose" didn't realise that option was included in format-patch. I'll use that format-patch option in future.

John