Skip to contentSkip to conversation

staging: rtl8192u: ieee80211: Remove typedef to structure _bandwidth_autoswitch

PATCH Superseded sayli karnik 2 participants 3 messages Feb 18, 2017 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192u: ieee80211: Remove typedef to structure _bandwidth_autoswitch

Using typedef for a structure type is not suggested in Linux kernel coding style guidelines. So remove typedef from the _bandwidth_autoswitch structure. The typedef pointer pbandwidth_autoswitch is not used anywhere, so omit it.

---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +4 -5
index 176083e..0df9812 100644
@@ -1461,13 +1461,12 @@ struct tx_pending {
 	struct ieee80211_txb *txb;
 };
 
-typedef struct _bandwidth_autoswitch {
+struct _bandwidth_autoswitch {
 	long threshold_20Mhzto40Mhz;
-	long	threshold_40Mhzto20Mhz;
+	long threshold_40Mhzto20Mhz;
 	bool bforced_tx20Mhz;
 	bool bautoswitch_enable;
-} bandwidth_autoswitch, *pbandwidth_autoswitch;
-
+};
 
 //added by amy for order
 
@@ -1873,7 +1872,7 @@ struct ieee80211_device {
 	Fsync_State			fsync_state;
 	bool		bis_any_nonbepkts;
 	//20Mhz 40Mhz AutoSwitch Threshold
-	bandwidth_autoswitch bandwidth_auto_switch;
+	struct _bandwidth_autoswitch bandwidth_auto_switch;
 	//for txpower tracking
 	bool FwRWRF;
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · sayli karnik

Using typedef for a structure type is not suggested in Linux kernel coding style guidelines. So remove typedef from the _bandwidth_autoswitch structure.

I think you could remove the _ from the front of the name too. That is normally to indicate a hidden name, but the name is not hidden any more.

julia

Quoted 48 lines

The typedef pointer pbandwidth_autoswitch is not used anywhere, so omit it.

---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +4 -6
index 176083e..0df9812 100644
@@ -1461,13 +1461,12 @@ struct tx_pending {
 	struct ieee80211_txb *txb;
 };
 
-typedef struct _bandwidth_autoswitch {
+struct _bandwidth_autoswitch {
 	long threshold_20Mhzto40Mhz;
-	long	threshold_40Mhzto20Mhz;
+	long threshold_40Mhzto20Mhz;
 	bool bforced_tx20Mhz;
 	bool bautoswitch_enable;
-} bandwidth_autoswitch, *pbandwidth_autoswitch;
-
+};
 
 //added by amy for order
 
@@ -1873,7 +1872,7 @@ struct ieee80211_device {
 	Fsync_State			fsync_state;
 	bool		bis_any_nonbepkts;
 	//20Mhz 40Mhz AutoSwitch Threshold
-	bandwidth_autoswitch bandwidth_auto_switch;
+	struct _bandwidth_autoswitch bandwidth_auto_switch;
 	//for txpower tracking
 	bool FwRWRF;
 
--

2.7.4

--
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/20170218061710.GA24477%40sayli-HP-15-Notebook-PC.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
Quoted 10 lines · Julia Lawall
Quoted 2 lines · sayli karnik

Using typedef for a structure type is not suggested in Linux kernel coding style guidelines. So remove typedef from the _bandwidth_autoswitch structure.

I think you could remove the _ from the front of the name too. That is normally to indicate a hidden name, but the name is not hidden any more.

Yes, sent a v2.

Quoted 51 lines

julia

Quoted 48 lines

The typedef pointer pbandwidth_autoswitch is not used anywhere, so omit it.

---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +4 -6
index 176083e..0df9812 100644
@@ -1461,13 +1461,12 @@ struct tx_pending {
      struct ieee80211_txb *txb;
 };
 
-typedef struct _bandwidth_autoswitch {
+struct _bandwidth_autoswitch {
      long threshold_20Mhzto40Mhz;
-     long    threshold_40Mhzto20Mhz;
+     long threshold_40Mhzto20Mhz;
      bool bforced_tx20Mhz;
      bool bautoswitch_enable;
-} bandwidth_autoswitch, *pbandwidth_autoswitch;
-
+};
 
 //added by amy for order
 
@@ -1873,7 +1872,7 @@ struct ieee80211_device {
      Fsync_State                     fsync_state;
      bool            bis_any_nonbepkts;
      //20Mhz 40Mhz AutoSwitch Threshold
-     bandwidth_autoswitch bandwidth_auto_switch;
+     struct _bandwidth_autoswitch bandwidth_auto_switch;
      //for txpower tracking
      bool FwRWRF;
 
--

2.7.4

--
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/20170218061710.GA24477%40sayli-HP-15-Notebook-PC.
For more options, visit https://groups.google.com/d/optout.