Skip to contentSkip to conversation

staging: rtl8192u: ieee80211: Remove typedef to structure _bandwidth_autoswitch

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

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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. Also rename the structure to bandwidth_autoswitch since an underscore is normally prepended to indicate a hidden name, which is not the case here.

---
Changes in v2:
Renamed the structure from _bandwidth_autoswitch to bandwidth_autoswitch

 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +4 -5
index 176083e..c1fa229 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
Acked-by on v2 1/1
#1 lore raw
Quoted 8 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. The typedef pointer pbandwidth_autoswitch is not used anywhere, so omit it. Also rename the structure to bandwidth_autoswitch since an underscore is normally prepended to indicate a hidden name, which is not the case here.

Quoted 47 lines

---
Changes in v2:
Renamed the structure from _bandwidth_autoswitch to bandwidth_autoswitch

 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +4 -6
index 176083e..c1fa229 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/20170218065444.GA26078%40sayli-HP-15-Notebook-PC.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
In reply to sayli karnik
Quoted 21 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. The typedef pointer pbandwidth_autoswitch is not used anywhere, so omit it. Also rename the structure to bandwidth_autoswitch since an underscore is normally prepended to indicate a hidden name, which is not the case here.

---
Changes in v2:
Renamed the structure from _bandwidth_autoswitch to bandwidth_autoswitch

 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211.h +0 -0
index 176083e..c1fa229 100644

drivers/staging/rtl8192u/ieee80211/ieee80211.h struct tx_pending { · line 1466

Quoted 8 lines
drivers/staging/rtl8192u/ieee80211/ieee80211.h +2 -2
@@ -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;

Why did you change the whitespace here? Please don't do that. Only do what you said you were going to do in your changelog text.

thanks,

greg k-h