Skip to contentSkip to conversation

Staging: rtl8192u: Convert comments from C99 to C89 style

PATCH Superseded Ksenija Stanojevic 2 participants 4 messages Feb 22, 2015 1 message not in the archive Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#1 lore raw

PATCH v2 1/2 Staging: rtl8192u: Convert comments from C99 to C89 style

In reply to a message not in the archive

Kernel style for comments is C89 style. Issue found by checkpatch.pl.

---
v2: Remove linux/config.h because it is not used in modern linux versions.

 .../staging/rtl8192u/ieee80211/ieee80211_module.c  | 52 +++++++++++-----------
 1 file changed, 26 insertions(+), 26 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +26 -26
index afbd09d..4d6bd2e 100644
@@ -31,7 +31,6 @@
 *******************************************************************************/
 
 #include <linux/compiler.h>
-//#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
 #include <linux/in6.h>
@@ -141,7 +140,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 	spin_lock_init(&ieee->wpax_suitlist_lock);
 	spin_lock_init(&ieee->bw_spinlock);
 	spin_lock_init(&ieee->reorder_spinlock);
-	//added by WB
+	/* added by WB */
 	atomic_set(&(ieee->atm_chnlop), 0);
 	atomic_set(&(ieee->atm_swbw), 0);
 
@@ -152,8 +151,8 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 	ieee->privacy_invoked = 0;
 	ieee->ieee802_1x = 1;
 	ieee->raw_tx = 0;
-	//ieee->hwsec_support = 1; //defalt support hw security. //use module_param instead.
-	ieee->hwsec_active = 0; //disable hwsec, switch it on when necessary.
+	/* ieee->hwsec_support = 1; //defalt support hw security. //use module_param instead. */
+	ieee->hwsec_active = 0; /* disable hwsec, switch it on when necessary. */
 
 	ieee80211_softmac_init(ieee);
 
@@ -164,7 +163,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 		goto failed;
 	}
 	HTUpdateDefaultSetting(ieee);
-	HTInitializeHTInfo(ieee); //may move to other place.
+	HTInitializeHTInfo(ieee); /* may move to other place. */
 	TSInitialize(ieee);
 
 	for (i = 0; i < IEEE_IBSS_MAC_HASH_SIZE; i++)
@@ -176,7 +175,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 	  ieee->last_packet_time[i] = 0;
 	}
 
-//These function were added to load crypte module autoly
+/* These function were added to load crypte module autoly */
 	ieee80211_tkip_null();
 	ieee80211_wep_null();
 	ieee80211_ccmp_null();
@@ -195,8 +194,8 @@ void free_ieee80211(struct net_device *dev)
 {
 	struct ieee80211_device *ieee = netdev_priv(dev);
 	int i;
-	//struct list_head *p, *q;
-//	del_timer_sync(&ieee->SwBwTimer);
+	/* struct list_head *p, *q; */
+     /* del_timer_sync(&ieee->SwBwTimer); */
 	kfree(ieee->pHTInfo);
 	ieee->pHTInfo = NULL;
 	RemoveAllTS(ieee);
@@ -222,24 +221,25 @@ void free_ieee80211(struct net_device *dev)
 
 u32 ieee80211_debug_level;
 static int debug = \
-	//		    IEEE80211_DL_INFO	|
-	//		    IEEE80211_DL_WX	|
-	//		    IEEE80211_DL_SCAN	|
-	//		    IEEE80211_DL_STATE	|
-	//		    IEEE80211_DL_MGMT	|
-	//		    IEEE80211_DL_FRAG	|
-	//		    IEEE80211_DL_EAP	|
-	//		    IEEE80211_DL_DROP	|
-	//		    IEEE80211_DL_TX	|
-	//		    IEEE80211_DL_RX	|
-			    //IEEE80211_DL_QOS    |
-	//		    IEEE80211_DL_HT	|
-	//		    IEEE80211_DL_TS	|
-//			    IEEE80211_DL_BA	|
-	//		    IEEE80211_DL_REORDER|
-//			    IEEE80211_DL_TRACE  |
-			    //IEEE80211_DL_DATA	|
-			    IEEE80211_DL_ERR	  //awayls open this flags to show error out
+			 /* IEEE80211_DL_INFO	| */
+			 /* IEEE80211_DL_WX	| */
+			 /* IEEE80211_DL_SCAN	| */
+			 /* IEEE80211_DL_STATE	| */
+			 /* IEEE80211_DL_MGMT	| */
+			 /* IEEE80211_DL_FRAG	| */
+			 /* IEEE80211_DL_EAP	| */
+			 /* IEEE80211_DL_DROP	| */
+			 /* IEEE80211_DL_TX	| */
+			 /* IEEE80211_DL_RX	| */
+			 /* IEEE80211_DL_QOS    | */
+			 /* IEEE80211_DL_HT	| */
+			 /* IEEE80211_DL_TS	| */
+			 /* IEEE80211_DL_BA	| */
+			 /* IEEE80211_DL_REORDER| */
+			 /* IEEE80211_DL_TRACE  | */
+			 /* IEEE80211_DL_DATA	| */
+			    IEEE80211_DL_ERR	  /* awayls open this flags
+						   * to show error out */
 			    ;
 static struct proc_dir_entry *ieee80211_proc;
 
Signature · 1 line
1.9.1
#2 lore raw
Quoted 5 lines · Ksenija Stanojevic

Kernel style for comments is C89 style. Issue found by checkpatch.pl.

---
v2: Remove linux/config.h because it is not used in modern linux versions.

Actually, the choice about what to do with linux/config.h should be above the ---

julia

Quoted 118 lines
 .../staging/rtl8192u/ieee80211/ieee80211_module.c  | 52 +++++++++++-----------
 1 file changed, 26 insertions(+), 26 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +26 -27
index afbd09d..4d6bd2e 100644
@@ -31,7 +31,6 @@
 *******************************************************************************/
 
 #include <linux/compiler.h>
-//#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
 #include <linux/in6.h>
@@ -141,7 +140,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 	spin_lock_init(&ieee->wpax_suitlist_lock);
 	spin_lock_init(&ieee->bw_spinlock);
 	spin_lock_init(&ieee->reorder_spinlock);
-	//added by WB
+	/* added by WB */
 	atomic_set(&(ieee->atm_chnlop), 0);
 	atomic_set(&(ieee->atm_swbw), 0);
 
@@ -152,8 +151,8 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 	ieee->privacy_invoked = 0;
 	ieee->ieee802_1x = 1;
 	ieee->raw_tx = 0;
-	//ieee->hwsec_support = 1; //defalt support hw security. //use module_param instead.
-	ieee->hwsec_active = 0; //disable hwsec, switch it on when necessary.
+	/* ieee->hwsec_support = 1; //defalt support hw security. //use module_param instead. */
+	ieee->hwsec_active = 0; /* disable hwsec, switch it on when necessary. */
 
 	ieee80211_softmac_init(ieee);
 
@@ -164,7 +163,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 		goto failed;
 	}
 	HTUpdateDefaultSetting(ieee);
-	HTInitializeHTInfo(ieee); //may move to other place.
+	HTInitializeHTInfo(ieee); /* may move to other place. */
 	TSInitialize(ieee);
 
 	for (i = 0; i < IEEE_IBSS_MAC_HASH_SIZE; i++)
@@ -176,7 +175,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 	  ieee->last_packet_time[i] = 0;
 	}
 
-//These function were added to load crypte module autoly
+/* These function were added to load crypte module autoly */
 	ieee80211_tkip_null();
 	ieee80211_wep_null();
 	ieee80211_ccmp_null();
@@ -195,8 +194,8 @@ void free_ieee80211(struct net_device *dev)
 {
 	struct ieee80211_device *ieee = netdev_priv(dev);
 	int i;
-	//struct list_head *p, *q;
-//	del_timer_sync(&ieee->SwBwTimer);
+	/* struct list_head *p, *q; */
+     /* del_timer_sync(&ieee->SwBwTimer); */
 	kfree(ieee->pHTInfo);
 	ieee->pHTInfo = NULL;
 	RemoveAllTS(ieee);
@@ -222,24 +221,25 @@ void free_ieee80211(struct net_device *dev)
 
 u32 ieee80211_debug_level;
 static int debug = \
-	//		    IEEE80211_DL_INFO	|
-	//		    IEEE80211_DL_WX	|
-	//		    IEEE80211_DL_SCAN	|
-	//		    IEEE80211_DL_STATE	|
-	//		    IEEE80211_DL_MGMT	|
-	//		    IEEE80211_DL_FRAG	|
-	//		    IEEE80211_DL_EAP	|
-	//		    IEEE80211_DL_DROP	|
-	//		    IEEE80211_DL_TX	|
-	//		    IEEE80211_DL_RX	|
-			    //IEEE80211_DL_QOS    |
-	//		    IEEE80211_DL_HT	|
-	//		    IEEE80211_DL_TS	|
-//			    IEEE80211_DL_BA	|
-	//		    IEEE80211_DL_REORDER|
-//			    IEEE80211_DL_TRACE  |
-			    //IEEE80211_DL_DATA	|
-			    IEEE80211_DL_ERR	  //awayls open this flags to show error out
+			 /* IEEE80211_DL_INFO	| */
+			 /* IEEE80211_DL_WX	| */
+			 /* IEEE80211_DL_SCAN	| */
+			 /* IEEE80211_DL_STATE	| */
+			 /* IEEE80211_DL_MGMT	| */
+			 /* IEEE80211_DL_FRAG	| */
+			 /* IEEE80211_DL_EAP	| */
+			 /* IEEE80211_DL_DROP	| */
+			 /* IEEE80211_DL_TX	| */
+			 /* IEEE80211_DL_RX	| */
+			 /* IEEE80211_DL_QOS    | */
+			 /* IEEE80211_DL_HT	| */
+			 /* IEEE80211_DL_TS	| */
+			 /* IEEE80211_DL_BA	| */
+			 /* IEEE80211_DL_REORDER| */
+			 /* IEEE80211_DL_TRACE  | */
+			 /* IEEE80211_DL_DATA	| */
+			    IEEE80211_DL_ERR	  /* awayls open this flags
+						   * to show error out */
 			    ;
 static struct proc_dir_entry *ieee80211_proc;
 
--

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/b62ce2160ca51b14093fb75772bef5b27cb14993.1424618906.git.ksenija.stanojevic%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#3 lore raw

Should I make version 3?

Quoted 131 lines · Julia Lawall
Quoted 5 lines · Ksenija Stanojevic

Kernel style for comments is C89 style. Issue found by checkpatch.pl.

---
v2: Remove linux/config.h because it is not used in modern linux versions.

Actually, the choice about what to do with linux/config.h should be above the ---

julia

Quoted 118 lines
 .../staging/rtl8192u/ieee80211/ieee80211_module.c  | 52 +++++++++++-----------
 1 file changed, 26 insertions(+), 26 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +26 -27
index afbd09d..4d6bd2e 100644
@@ -31,7 +31,6 @@
 *******************************************************************************/
 
 #include <linux/compiler.h>
-//#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
 #include <linux/in6.h>
@@ -141,7 +140,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
      spin_lock_init(&ieee->wpax_suitlist_lock);
      spin_lock_init(&ieee->bw_spinlock);
      spin_lock_init(&ieee->reorder_spinlock);
-     //added by WB
+     /* added by WB */
      atomic_set(&(ieee->atm_chnlop), 0);
      atomic_set(&(ieee->atm_swbw), 0);
 
@@ -152,8 +151,8 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
      ieee->privacy_invoked = 0;
      ieee->ieee802_1x = 1;
      ieee->raw_tx = 0;
-     //ieee->hwsec_support = 1; //defalt support hw security. //use module_param instead.
-     ieee->hwsec_active = 0; //disable hwsec, switch it on when necessary.
+     /* ieee->hwsec_support = 1; //defalt support hw security. //use module_param instead. */
+     ieee->hwsec_active = 0; /* disable hwsec, switch it on when necessary. */
 
      ieee80211_softmac_init(ieee);
 
@@ -164,7 +163,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
              goto failed;
      }
      HTUpdateDefaultSetting(ieee);
-     HTInitializeHTInfo(ieee); //may move to other place.
+     HTInitializeHTInfo(ieee); /* may move to other place. */
      TSInitialize(ieee);
 
      for (i = 0; i < IEEE_IBSS_MAC_HASH_SIZE; i++)
@@ -176,7 +175,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
        ieee->last_packet_time[i] = 0;
      }
 
-//These function were added to load crypte module autoly
+/* These function were added to load crypte module autoly */
      ieee80211_tkip_null();
      ieee80211_wep_null();
      ieee80211_ccmp_null();
@@ -195,8 +194,8 @@ void free_ieee80211(struct net_device *dev)
 {
      struct ieee80211_device *ieee = netdev_priv(dev);
      int i;
-     //struct list_head *p, *q;
-//   del_timer_sync(&ieee->SwBwTimer);
+     /* struct list_head *p, *q; */
+     /* del_timer_sync(&ieee->SwBwTimer); */
      kfree(ieee->pHTInfo);
      ieee->pHTInfo = NULL;
      RemoveAllTS(ieee);
@@ -222,24 +221,25 @@ void free_ieee80211(struct net_device *dev)
 
 u32 ieee80211_debug_level;
 static int debug = \
-     //                  IEEE80211_DL_INFO   |
-     //                  IEEE80211_DL_WX     |
-     //                  IEEE80211_DL_SCAN   |
-     //                  IEEE80211_DL_STATE  |
-     //                  IEEE80211_DL_MGMT   |
-     //                  IEEE80211_DL_FRAG   |
-     //                  IEEE80211_DL_EAP    |
-     //                  IEEE80211_DL_DROP   |
-     //                  IEEE80211_DL_TX     |
-     //                  IEEE80211_DL_RX     |
-                         //IEEE80211_DL_QOS    |
-     //                  IEEE80211_DL_HT     |
-     //                  IEEE80211_DL_TS     |
-//                       IEEE80211_DL_BA     |
-     //                  IEEE80211_DL_REORDER|
-//                       IEEE80211_DL_TRACE  |
-                         //IEEE80211_DL_DATA |
-                         IEEE80211_DL_ERR      //awayls open this flags to show error out
+                      /* IEEE80211_DL_INFO   | */
+                      /* IEEE80211_DL_WX     | */
+                      /* IEEE80211_DL_SCAN   | */
+                      /* IEEE80211_DL_STATE  | */
+                      /* IEEE80211_DL_MGMT   | */
+                      /* IEEE80211_DL_FRAG   | */
+                      /* IEEE80211_DL_EAP    | */
+                      /* IEEE80211_DL_DROP   | */
+                      /* IEEE80211_DL_TX     | */
+                      /* IEEE80211_DL_RX     | */
+                      /* IEEE80211_DL_QOS    | */
+                      /* IEEE80211_DL_HT     | */
+                      /* IEEE80211_DL_TS     | */
+                      /* IEEE80211_DL_BA     | */
+                      /* IEEE80211_DL_REORDER| */
+                      /* IEEE80211_DL_TRACE  | */
+                      /* IEEE80211_DL_DATA   | */
+                         IEEE80211_DL_ERR      /* awayls open this flags
+                                                * to show error out */
                          ;
 static struct proc_dir_entry *ieee80211_proc;
 
--

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/b62ce2160ca51b14093fb75772bef5b27cb14993.1424618906.git.ksenija.stanojevic%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#4 lore raw
Quoted 1 line · Ksenija Stanojević

Should I make version 3?

I think it would be best, thanks.

julia

Quoted 141 lines · Julia Lawall
Quoted 124 lines · Ksenija Stanojevic
Quoted 6 lines

Kernel style for comments is C89 style. Issue found by checkpatch.pl.

---
v2: Remove linux/config.h because it is not used in modern linux versions.

Actually, the choice about what to do with linux/config.h should be above the ---

julia

Quoted 111 lines
 .../staging/rtl8192u/ieee80211/ieee80211_module.c  | 52 +++++++++++-----------
 1 file changed, 26 insertions(+), 26 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +26 -27
index afbd09d..4d6bd2e 100644
@@ -31,7 +31,6 @@
 *******************************************************************************/
 
 #include <linux/compiler.h>
-//#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
 #include <linux/in6.h>
@@ -141,7 +140,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
      spin_lock_init(&ieee->wpax_suitlist_lock);
      spin_lock_init(&ieee->bw_spinlock);
      spin_lock_init(&ieee->reorder_spinlock);
-     //added by WB
+     /* added by WB */
      atomic_set(&(ieee->atm_chnlop), 0);
      atomic_set(&(ieee->atm_swbw), 0);
 
@@ -152,8 +151,8 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
      ieee->privacy_invoked = 0;
      ieee->ieee802_1x = 1;
      ieee->raw_tx = 0;
-     //ieee->hwsec_support = 1; //defalt support hw security. //use module_param instead.
-     ieee->hwsec_active = 0; //disable hwsec, switch it on when necessary.
+     /* ieee->hwsec_support = 1; //defalt support hw security. //use module_param instead. */
+     ieee->hwsec_active = 0; /* disable hwsec, switch it on when necessary. */
 
      ieee80211_softmac_init(ieee);
 
@@ -164,7 +163,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
              goto failed;
      }
      HTUpdateDefaultSetting(ieee);
-     HTInitializeHTInfo(ieee); //may move to other place.
+     HTInitializeHTInfo(ieee); /* may move to other place. */
      TSInitialize(ieee);
 
      for (i = 0; i < IEEE_IBSS_MAC_HASH_SIZE; i++)
@@ -176,7 +175,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
        ieee->last_packet_time[i] = 0;
      }
 
-//These function were added to load crypte module autoly
+/* These function were added to load crypte module autoly */
      ieee80211_tkip_null();
      ieee80211_wep_null();
      ieee80211_ccmp_null();
@@ -195,8 +194,8 @@ void free_ieee80211(struct net_device *dev)
 {
      struct ieee80211_device *ieee = netdev_priv(dev);
      int i;
-     //struct list_head *p, *q;
-//   del_timer_sync(&ieee->SwBwTimer);
+     /* struct list_head *p, *q; */
+     /* del_timer_sync(&ieee->SwBwTimer); */
      kfree(ieee->pHTInfo);
      ieee->pHTInfo = NULL;
      RemoveAllTS(ieee);
@@ -222,24 +221,25 @@ void free_ieee80211(struct net_device *dev)
 
 u32 ieee80211_debug_level;
 static int debug = \
-     //                  IEEE80211_DL_INFO   |
-     //                  IEEE80211_DL_WX     |
-     //                  IEEE80211_DL_SCAN   |
-     //                  IEEE80211_DL_STATE  |
-     //                  IEEE80211_DL_MGMT   |
-     //                  IEEE80211_DL_FRAG   |
-     //                  IEEE80211_DL_EAP    |
-     //                  IEEE80211_DL_DROP   |
-     //                  IEEE80211_DL_TX     |
-     //                  IEEE80211_DL_RX     |
-                         //IEEE80211_DL_QOS    |
-     //                  IEEE80211_DL_HT     |
-     //                  IEEE80211_DL_TS     |
-//                       IEEE80211_DL_BA     |
-     //                  IEEE80211_DL_REORDER|
-//                       IEEE80211_DL_TRACE  |
-                         //IEEE80211_DL_DATA |
-                         IEEE80211_DL_ERR      //awayls open this flags to show error out
+                      /* IEEE80211_DL_INFO   | */
+                      /* IEEE80211_DL_WX     | */
+                      /* IEEE80211_DL_SCAN   | */
+                      /* IEEE80211_DL_STATE  | */
+                      /* IEEE80211_DL_MGMT   | */
+                      /* IEEE80211_DL_FRAG   | */
+                      /* IEEE80211_DL_EAP    | */
+                      /* IEEE80211_DL_DROP   | */
+                      /* IEEE80211_DL_TX     | */
+                      /* IEEE80211_DL_RX     | */
+                      /* IEEE80211_DL_QOS    | */
+                      /* IEEE80211_DL_HT     | */
+                      /* IEEE80211_DL_TS     | */
+                      /* IEEE80211_DL_BA     | */
+                      /* IEEE80211_DL_REORDER| */
+                      /* IEEE80211_DL_TRACE  | */
+                      /* IEEE80211_DL_DATA   | */
+                         IEEE80211_DL_ERR      /* awayls open this flags
+                                                * to show error out */
                          ;
 static struct proc_dir_entry *ieee80211_proc;
 
--

1.9.1

Quoted 7 lines
Quoted 7 lines

--
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/b62ce2160ca51b14093fb75772bef5b27cb14993.1424618906.git.ksenija.stanojevic%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAL7P5jKWZFpOKGj9YCnPiX3dsS3akkGiRcCPmBrq6y%2BYvtsN9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.