Skip to contentSkip to conversation

staging: vt6655: remove unnecessary typedef struct.

PATCH Superseded Martin Kepplinger 2 participants 3 messages Jun 13, 2014 – Jun 16, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vt6655: remove unnecessary typedef struct.

Remove a totally unnecessary typedef. This is more readable now.

---
applies to next-20140611

 drivers/staging/vt6655/card.c   |    2 +-
 drivers/staging/vt6655/device.h |    6 +++---
 drivers/staging/vt6655/wmgr.c   |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/vt6655/card.c +1 -1
index 05bf48a..765b5eb 100644
@@ -998,7 +998,7 @@ CARDbAdd_PMKID_Candidate(
 )
 {
 	PSDevice            pDevice = (PSDevice) pDeviceHandler;
-	PPMKID_CANDIDATE    pCandidateList;
+	struct PMKID_CANDIDATE *pCandidateList;
 	unsigned int ii = 0;
 
 	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
drivers/staging/vt6655/device.h +3 -3
index 45fc8a0..5651e51 100644
@@ -227,10 +227,10 @@ typedef enum _NDIS_802_11_STATUS_TYPE
 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
 
 //Added new types for PMKID Candidate lists.
-typedef struct _PMKID_CANDIDATE {
+struct PMKID_CANDIDATE {
 	NDIS_802_11_MAC_ADDRESS BSSID;
 	unsigned long Flags;
-} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
+};
 
 typedef struct _BSSID_INFO
 {
@@ -248,7 +248,7 @@ typedef struct tagSPMKIDCandidateEvent {
 	NDIS_802_11_STATUS_TYPE     StatusType;
 	unsigned long Version;       // Version of the structure
 	unsigned long NumCandidates; // No. of pmkid candidates
-	PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
+	struct PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
 } SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
 
 //--
drivers/staging/vt6655/wmgr.c +1 -1
index 6738478..370ef26 100644
@@ -4438,7 +4438,7 @@ bAdd_PMKID_Candidate(
 )
 {
 	PSDevice         pDevice = (PSDevice)hDeviceContext;
-	PPMKID_CANDIDATE pCandidateList;
+	struct PMKID_CANDIDATE *pCandidateList;
 	unsigned int ii = 0;
 
 	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 1 line · Martin Kepplinger

Remove a totally unnecessary typedef. This is more readable now.

Choose a lower case name for the struct, otherwise we have to change all these again in a while.

regards,
dan carpenter

#2 lore raw

PATCH v2 1/1 staging: vt6655: remove unnecessary typedef struct.

Remove a totally unnecessary typedef and rename it to lowercase. This is more readable now.

---
so in that way, one could change the more heavily used typedefs as well.

thanks for your review.

 drivers/staging/vt6655/card.c   |    2 +-
 drivers/staging/vt6655/device.h |    6 +++---
 drivers/staging/vt6655/wmgr.c   |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/vt6655/card.c +1 -1
index 05bf48a..e21abd8 100644
@@ -998,7 +998,7 @@ CARDbAdd_PMKID_Candidate(
 )
 {
 	PSDevice            pDevice = (PSDevice) pDeviceHandler;
-	PPMKID_CANDIDATE    pCandidateList;
+	struct pmkid_candidate *pCandidateList;
 	unsigned int ii = 0;
 
 	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
drivers/staging/vt6655/device.h +3 -3
index 45fc8a0..aab63ca 100644
@@ -227,10 +227,10 @@ typedef enum _NDIS_802_11_STATUS_TYPE
 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
 
 //Added new types for PMKID Candidate lists.
-typedef struct _PMKID_CANDIDATE {
+struct pmkid_candidate {
 	NDIS_802_11_MAC_ADDRESS BSSID;
 	unsigned long Flags;
-} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
+};
 
 typedef struct _BSSID_INFO
 {
@@ -248,7 +248,7 @@ typedef struct tagSPMKIDCandidateEvent {
 	NDIS_802_11_STATUS_TYPE     StatusType;
 	unsigned long Version;       // Version of the structure
 	unsigned long NumCandidates; // No. of pmkid candidates
-	PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
+	struct pmkid_candidate CandidateList[MAX_PMKIDLIST];
 } SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
 
 //--
drivers/staging/vt6655/wmgr.c +1 -1
index 6738478..cc4f5b9 100644
@@ -4438,7 +4438,7 @@ bAdd_PMKID_Candidate(
 )
 {
 	PSDevice         pDevice = (PSDevice)hDeviceContext;
-	PPMKID_CANDIDATE pCandidateList;
+	struct pmkid_candidate *pCandidateList;
 	unsigned int ii = 0;
 
 	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
Signature · 1 line
1.7.10.4