Skip to contentSkip to conversation

Staging: rtl8188eu: Remove unused struct ndis_802_11_key

PATCH In review Vaishali Thakkar 2 participants 5 messages Feb 20, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: rtl8188eu: Remove unused struct ndis_802_11_key

This patch removes struct ndis_802_11_key as it is defined in a header file but never used.

---
 drivers/staging/rtl8188eu/include/wlan_bssdef.h | 10 ----------
 1 file changed, 10 deletions(-)
drivers/staging/rtl8188eu/include/wlan_bssdef.h +0 -10
index 53b1bd8..85b99da 100644
@@ -156,16 +156,6 @@ enum ndis_802_11_reload_def {
 	Ndis802_11ReloadWEPKeys
 };
 
-/*  Key mapping keys require a BSSID */
-struct ndis_802_11_key {
-	u32           Length;             /*  Length of this structure */
-	u32           KeyIndex;
-	u32           KeyLength;          /*  length of key in bytes */
-	unsigned char BSSID[ETH_ALEN];
-	unsigned long long KeyRSC;
-	u8           KeyMaterial[32];  /* var len depending on above field */
-};
-
 struct ndis_802_11_remove_key {
 	u32                   Length;        /*  Length */
 	u32                   KeyIndex;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 2 lines · Vaishali Thakkar

This patch removes struct ndis_802_11_key as it is defined in a header file but never used.

How did you find it?

julia

Quoted 36 lines
---
 drivers/staging/rtl8188eu/include/wlan_bssdef.h | 10 ----------
 1 file changed, 10 deletions(-)
drivers/staging/rtl8188eu/include/wlan_bssdef.h +0 -10
index 53b1bd8..85b99da 100644
@@ -156,16 +156,6 @@ enum ndis_802_11_reload_def {
 	Ndis802_11ReloadWEPKeys
 };
 
-/*  Key mapping keys require a BSSID */
-struct ndis_802_11_key {
-	u32           Length;             /*  Length of this structure */
-	u32           KeyIndex;
-	u32           KeyLength;          /*  length of key in bytes */
-	unsigned char BSSID[ETH_ALEN];
-	unsigned long long KeyRSC;
-	u8           KeyMaterial[32];  /* var len depending on above field */
-};
-
 struct ndis_802_11_remove_key {
 	u32                   Length;        /*  Length */
 	u32                   KeyIndex;
Signature · 8 lines
1.9.1

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150220072850.GA8648%40vaishali-Ideapad-Z570.
For more options, visit https://groups.google.com/d/optout.
#2 lore raw
Quoted 6 lines · Julia Lawall
Quoted 2 lines · Vaishali Thakkar

This patch removes struct ndis_802_11_key as it is defined in a header file but never used.

How did you find it?

While looking at struct definitions in file wlan_bssdef.h, I accidentally came across this structure and when I used git grep to see the use of it, I didn't find any files using it. That's why I just sent the patch.

Quoted 38 lines

julia

Quoted 36 lines
---
 drivers/staging/rtl8188eu/include/wlan_bssdef.h | 10 ----------
 1 file changed, 10 deletions(-)
drivers/staging/rtl8188eu/include/wlan_bssdef.h +0 -11
index 53b1bd8..85b99da 100644
@@ -156,16 +156,6 @@ enum ndis_802_11_reload_def {
      Ndis802_11ReloadWEPKeys
 };
 
-/*  Key mapping keys require a BSSID */
-struct ndis_802_11_key {
-     u32           Length;             /*  Length of this structure */
-     u32           KeyIndex;
-     u32           KeyLength;          /*  length of key in bytes */
-     unsigned char BSSID[ETH_ALEN];
-     unsigned long long KeyRSC;
-     u8           KeyMaterial[32];  /* var len depending on above field */
-};
-
 struct ndis_802_11_remove_key {
      u32                   Length;        /*  Length */
      u32                   KeyIndex;
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150220072850.GA8648%40vaishali-Ideapad-Z570.
For more options, visit https://groups.google.com/d/optout.

Signature · 1 line
Vaishali
#3 lore raw
Quoted 11 lines · Vaishali Thakkar
Quoted 6 lines · Julia Lawall
Quoted 2 lines · Vaishali Thakkar

This patch removes struct ndis_802_11_key as it is defined in a header file but never used.

How did you find it?

While looking at struct definitions in file wlan_bssdef.h, I accidentally came across this structure and when I used git grep to see the use of it, I didn't find any files using it. That's why I just sent the patch.

OK, it seems at least possible that there are more. Coccinelle could probably be used for this, or maybe just a script with grep would suffice. We could discuss later, if you want to look for more of them.

julia

#4 lore raw
Quoted 10 lines · Julia Lawall
Quoted 8 lines · Vaishali Thakkar
Quoted 6 lines · Julia Lawall
Quoted 2 lines · Vaishali Thakkar

This patch removes struct ndis_802_11_key as it is defined in a header file but never used.

How did you find it?

Quoted 7 lines
Quoted 3 lines

While looking at struct definitions in file wlan_bssdef.h, I accidentally came across this structure and when I used git grep to see the use of it, I didn't find any files using it. That's why I just sent the patch.

OK, it seems at least possible that there are more. Coccinelle could probably be used for this, or maybe just a script with grep would suffice. We could discuss later, if you want to look for more of them.

Yes. There is possibility of finding such cases. I have also seen some patches in network drivers where there are some write-only or write-once structs/variables
which are removed by developers. May be we can handle some of such cases using Coccinelle too. I would definitely like to discuss such things.

Quoted 1 line

julia

Signature · 1 line
Vaishali