linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some dead code
@ 2014-06-02 16:11 Chaitanya Hazarey
  2014-06-02 16:11 ` [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments Chaitanya Hazarey
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Chaitanya Hazarey @ 2014-06-02 16:11 UTC (permalink / raw)
  To: gregkh, burzalodowa, andrea.merello
  Cc: devel, linux-kernel, Chaitanya Hazarey

Removed dead code, commented out printks and DMESG.

Signed-off-by: Chaitanya Hazarey <c@24.io>
---
 drivers/staging/rtl8192u/r8192U_wx.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index 675a12d..7dc2a96 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -341,10 +341,8 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 	if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
 		struct iw_scan_req *req = (struct iw_scan_req *)b;
 		if (req->essid_len) {
-			//printk("==**&*&*&**===>scan set ssid:%s\n", req->essid);
 			ieee->current_network.ssid_len = req->essid_len;
 			memcpy(ieee->current_network.ssid, req->essid, req->essid_len);
-			//printk("=====>network ssid:%s\n", ieee->current_network.ssid);
 		}
 	}
 
@@ -703,7 +701,6 @@ static int r8192_wx_get_retry(struct net_device *dev,
 		wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_MIN;
 		wrqu->retry.value = priv->retry_data;
 	}
-	//printk("returning %d",wrqu->retry.value);
 
 
 	return 0;
@@ -730,7 +727,6 @@ static int r8192_wx_set_sens(struct net_device *dev,
 
 	short err = 0;
 	down(&priv->wx_sem);
-	//DMESG("attempt to set sensivity to %ddb",wrqu->sens.value);
 	if (priv->rf_set_sens == NULL) {
 		err = -1; /* we have not this support for this radio */
 		goto exit;
@@ -754,7 +750,6 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
 	int ret = 0;
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	struct ieee80211_device *ieee = priv->ieee80211;
-	//printk("===>%s()\n", __func__);
 
 
 	down(&priv->wx_sem);
@@ -828,7 +823,6 @@ static int r8192_wx_set_auth(struct net_device *dev,
 					union iwreq_data *data, char *extra)
 {
 	int ret = 0;
-	//printk("====>%s()\n", __func__);
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	down(&priv->wx_sem);
 	ret = ieee80211_wx_set_auth(priv->ieee80211, info, &(data->param), extra);
@@ -840,7 +834,6 @@ static int r8192_wx_set_mlme(struct net_device *dev,
 					struct iw_request_info *info,
 					union iwreq_data *wrqu, char *extra)
 {
-	//printk("====>%s()\n", __func__);
 
 	int ret = 0;
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -855,13 +848,11 @@ static int r8192_wx_set_gen_ie(struct net_device *dev,
 					struct iw_request_info *info,
 					union iwreq_data *data, char *extra)
 {
-	   //printk("====>%s(), len:%d\n", __func__, data->length);
 	int ret = 0;
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	down(&priv->wx_sem);
 	ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, data->data.length);
 	up(&priv->wx_sem);
-	//printk("<======%s(), ret:%d\n", __func__, ret);
 	return ret;
 
 
@@ -992,7 +983,6 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
 	tmp_level = (&ieee->current_network)->stats.rssi;
 	tmp_qual = (&ieee->current_network)->stats.signal;
 	tmp_noise = (&ieee->current_network)->stats.noise;
-	//printk("level:%d, qual:%d, noise:%d\n", tmp_level, tmp_qual, tmp_noise);
 
 	wstats->qual.level = tmp_level;
 	wstats->qual.qual = tmp_qual;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments
  2014-06-02 16:11 [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some dead code Chaitanya Hazarey
@ 2014-06-02 16:11 ` Chaitanya Hazarey
  2014-06-03  8:12   ` Geert Uytterhoeven
  2014-06-02 16:11 ` [PATCH 3/4] Staging: rtl8192u: r8192U_wx.c Added a single space for code-style issue Chaitanya Hazarey
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Chaitanya Hazarey @ 2014-06-02 16:11 UTC (permalink / raw)
  To: gregkh, burzalodowa, andrea.merello
  Cc: devel, linux-kernel, Chaitanya Hazarey

To address the error -

ERROR: do not use C99 // comments

Removed all C99 comments.

Signed-off-by: Chaitanya Hazarey <c@24.io>
---
 drivers/staging/rtl8192u/r8192U_wx.c | 130 +++++++++++++++++------------------
 1 file changed, 65 insertions(+), 65 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index 7dc2a96..b533784 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -180,8 +180,8 @@ static int r8192_wx_set_crcmon(struct net_device *dev,
 	      priv->crcmon ? "accepted" : "rejected");
 
 	if (prev != priv->crcmon && priv->up) {
-		//rtl8180_down(dev);
-		//rtl8180_up(dev);
+		/* rtl8180_down(dev); */
+		/* rtl8180_up(dev); */
 	}
 
 	up(&priv->wx_sem);
@@ -249,15 +249,15 @@ static int rtl8180_wx_get_range(struct net_device *dev,
 	/* ~5 Mb/s real (802.11b) */
 	range->throughput = 5 * 1000 * 1000;
 
-	// TODO: Not used in 802.11b?
-//	range->min_nwid;	/* Minimal NWID we are able to set */
-	// TODO: Not used in 802.11b?
-//	range->max_nwid;	/* Maximal NWID we are able to set */
+	/* TODO: Not used in 802.11b? */
+	/* range->min_nwid; */	/* Minimal NWID we are able to set */
+	/* TODO: Not used in 802.11b? */
+	/* range->max_nwid; */	/* Maximal NWID we are able to set */
 
 	/* Old Frequency (backward compat - moved lower ) */
-//	range->old_num_channels;
-//	range->old_num_frequency;
-//	range->old_freq[6]; /* Filler to keep "version" at the same offset */
+	/* range->old_num_channels; */
+	/* range->old_num_frequency; */
+	/* range->old_freq[6]; */ /* Filler to keep "version" at the same offset */
 	if (priv->rf_set_sens != NULL)
 		range->sensitivity = priv->max_sens;	/* signal level threshold range */
 
@@ -292,26 +292,26 @@ static int rtl8180_wx_get_range(struct net_device *dev,
 	range->we_version_compiled = WIRELESS_EXT;
 	range->we_version_source = 16;
 
-//	range->retry_capa;	/* What retry options are supported */
-//	range->retry_flags;	/* How to decode max/min retry limit */
-//	range->r_time_flags;	/* How to decode max/min retry life */
-//	range->min_retry;	/* Minimal number of retries */
-//	range->max_retry;	/* Maximal number of retries */
-//	range->min_r_time;	/* Minimal retry lifetime */
-//	range->max_r_time;	/* Maximal retry lifetime */
+	/* range->retry_capa; */	/* What retry options are supported */
+	/* range->retry_flags; */	/* How to decode max/min retry limit */
+	/* range->r_time_flags; */	/* How to decode max/min retry life */
+	/* range->min_retry; */ 	/* Minimal number of retries */
+	/* range->max_retry; */		/* Maximal number of retries */
+	/* range->min_r_time; */	/* Minimal retry lifetime */
+	/* range->max_r_time; */	/* Maximal retry lifetime */
 
 
 	for (i = 0, val = 0; i < 14; i++) {
 
-		// Include only legal frequencies for some countries
+		/* Include only legal frequencies for some countries */
 		if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) {
 			range->freq[val].i = i + 1;
 			range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000;
 			range->freq[val].e = 1;
 			val++;
 		} else {
-			// FIXME: do we need to set anything for channels
-			// we don't use ?
+			/* FIXME: do we need to set anything for channels */
+			/* we don't use ? */
 		}
 
 		if (val == IW_MAX_FREQUENCIES)
@@ -478,7 +478,7 @@ static int r8192_wx_set_wap(struct net_device *dev,
 
 	int ret;
 	struct r8192_priv *priv = ieee80211_priv(dev);
-//        struct sockaddr *temp = (struct sockaddr *)awrq;
+	/* struct sockaddr *temp = (struct sockaddr *)awrq; */
 	down(&priv->wx_sem);
 
 	ret = ieee80211_wx_set_wap(priv->ieee80211, info, awrq, extra);
@@ -517,11 +517,11 @@ static int r8192_wx_set_enc(struct net_device *dev,
 	struct ieee80211_device *ieee = priv->ieee80211;
 	int ret;
 
-	//u32 TargetContent;
+	/* u32 TargetContent; */
 	u32 hwkey[4] = {0, 0, 0, 0};
 	u8 mask = 0xff;
 	u32 key_idx = 0;
-	//u8 broadcast_addr[6] ={	0xff,0xff,0xff,0xff,0xff,0xff};
+	/* u8 broadcast_addr[6] ={	0xff,0xff,0xff,0xff,0xff,0xff}; */
 	u8 zero_addr[4][6] = {	{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 				{0x00, 0x00, 0x00, 0x00, 0x00, 0x01},
 				{0x00, 0x00, 0x00, 0x00, 0x00, 0x02},
@@ -540,7 +540,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
 
 
 
-	//sometimes, the length is zero while we do not type key value
+	/* sometimes, the length is zero while we do not type key value */
 	if (wrqu->encoding.length != 0) {
 
 		for (i = 0; i < 4; i++) {
@@ -582,12 +582,12 @@ static int r8192_wx_set_enc(struct net_device *dev,
 			EnableHWSecurityConfig8192(dev);
 
 			setKey(dev,
-				key_idx,                //EntryNo
-				key_idx,                //KeyIndex
-				KEY_TYPE_WEP40,         //KeyType
+				key_idx,                /* EntryNo */
+				key_idx,                /* KeyIndex */
+				KEY_TYPE_WEP40,         /* KeyType */
 				zero_addr[key_idx],
-				0,                      //DefaultKey
-				hwkey);                 //KeyContent
+				0,                      /* DefaultKey */
+				hwkey);                 /* KeyContent */
 
 		}
 
@@ -596,12 +596,12 @@ static int r8192_wx_set_enc(struct net_device *dev,
 				EnableHWSecurityConfig8192(dev);
 
 			setKey(dev,
-				key_idx,                //EntryNo
-				key_idx,                //KeyIndex
-				KEY_TYPE_WEP104,        //KeyType
+				key_idx,                /* EntryNo */
+				key_idx,                /* KeyIndex */
+				KEY_TYPE_WEP104,        /* KeyType */
 				zero_addr[key_idx],
-				0,                      //DefaultKey
-				hwkey);                 //KeyContent
+				0,                      /* DefaultKey */
+				hwkey);                 /* KeyContent */
 
 		} else {
 			printk("wrong type in WEP, not WEP40 and WEP104\n");
@@ -742,7 +742,7 @@ exit:
 	return err;
 }
 
-//hw security need to reorganized.
+/* hw security need to reorganized. */
 static int r8192_wx_set_enc_ext(struct net_device *dev,
 					struct iw_request_info *info,
 					union iwreq_data *wrqu, char *extra)
@@ -763,10 +763,10 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
 		struct iw_point *encoding = &wrqu->encoding;
 		u8 idx = 0, alg = 0, group = 0;
 		if ((encoding->flags & IW_ENCODE_DISABLED) || ext->alg == IW_ENCODE_ALG_NONE)
-			//none is not allowed to use hwsec WB 2008.07.01
+			/* none is not allowed to use hwsec WB 2008.07.01 */
 			goto end_hw_sec;
 
-		// as IW_ENCODE_ALG_CCMP is defined to be 3 and KEY_TYPE_CCMP is defined to 4;
+		/* as IW_ENCODE_ALG_CCMP is defined to be 3 and KEY_TYPE_CCMP is defined to 4; */
 		alg =  (ext->alg == IW_ENCODE_ALG_CCMP)?KEY_TYPE_CCMP:ext->alg;
 		idx = encoding->flags & IW_ENCODE_INDEX;
 		if (idx)
@@ -779,34 +779,34 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
 			ieee->pairwise_key_type = alg;
 			EnableHWSecurityConfig8192(dev);
 		}
-		memcpy((u8 *)key, ext->key, 16); //we only get 16 bytes key.why? WB 2008.7.1
+		memcpy((u8 *)key, ext->key, 16); /* we only get 16 bytes key.why? WB 2008.7.1 */
 
 		if ((alg & KEY_TYPE_WEP40) && (ieee->auth_mode != 2)) {
 
 			setKey(dev,
-					idx,//EntryNo
-					idx, //KeyIndex
-					alg,  //KeyType
-					zero, //MacAddr
-					0,              //DefaultKey
-					key);           //KeyContent
+					idx,	/* EntryNao */
+					idx,	/* KeyIndex */
+					alg,	/* KeyType */
+					zero,	/* MacAddr */
+					0,	/* DefaultKey */
+					key);	/* KeyContent */
 		} else if (group) {
 			ieee->group_key_type = alg;
 			setKey(dev,
-					idx,//EntryNo
-					idx, //KeyIndex
-					alg,  //KeyType
-					broadcast_addr, //MacAddr
-					0,              //DefaultKey
-					key);           //KeyContent
-		} else {//pairwise key
+					idx,	/* EntryNo */
+					idx,	/* KeyIndex */
+					alg,	/* KeyType */
+					broadcast_addr,	/* MacAddr */
+					0,		/* DefaultKey */
+					key);		/* KeyContent */
+		} else {	/* pairwise key */
 			setKey(dev,
-					4,//EntryNo
-					idx, //KeyIndex
-					alg,  //KeyType
-					(u8 *)ieee->ap_mac_addr, //MacAddr
-					0,              //DefaultKey
-					key);           //KeyContent
+					4,	/* EntryNo */
+					idx,	/* KeyIndex */
+					alg,	/* KeyType */
+					(u8 *)ieee->ap_mac_addr,/* MacAddr */
+					0,			/* DefaultKey */
+					key);           	/* KeyContent */
 		}
 
 
@@ -914,13 +914,13 @@ static iw_handler r8192_wx_handlers[] = {
 	r8192_wx_get_power,                    /* SIOCGIWPOWER */
 	NULL,			/*---hole---*/
 	NULL,			/*---hole---*/
-	r8192_wx_set_gen_ie,//NULL,			/* SIOCSIWGENIE */
+	r8192_wx_set_gen_ie, /* NULL, */		/* SIOCSIWGENIE */
 	NULL,			/* SIOCSIWGENIE */
 
-	r8192_wx_set_auth,//NULL,			/* SIOCSIWAUTH */
-	NULL,//r8192_wx_get_auth,//NULL,			/* SIOCSIWAUTH */
+	r8192_wx_set_auth,/* NULL, */			/* SIOCSIWAUTH */
+	NULL,/* r8192_wx_get_auth, */ /* NULL, */	/* SIOCSIWAUTH */
 	r8192_wx_set_enc_ext,			/* SIOCSIWENCODEEXT */
-	NULL,//r8192_wx_get_enc_ext,//NULL,			/* SIOCSIWENCODEEXT */
+	NULL,/* r8192_wx_get_enc_ext, *//* NULL, */			/* SIOCSIWENCODEEXT */
 	NULL,			/* SIOCSIWPMKSA */
 	NULL,			 /*---hole---*/
 
@@ -953,14 +953,14 @@ static const struct iw_priv_args r8192_private_args[] = {
 
 
 static iw_handler r8192_private_handler[] = {
-//	r8192_wx_set_monitor,  /* SIOCIWFIRSTPRIV */
+	/* r8192_wx_set_monitor, */ /* SIOCIWFIRSTPRIV */
 	r8192_wx_set_crcmon,   /*SIOCIWSECONDPRIV*/
-//	r8192_wx_set_forceassociate,
-//	r8192_wx_set_beaconinterval,
-//	r8192_wx_set_monitor_type,
+	/* r8192_wx_set_forceassociate, */
+	/* r8192_wx_set_beaconinterval, */
+	/* r8192_wx_set_monitor_type, */
 	r8192_wx_set_scan_type,
 	r8192_wx_set_rawtx,
-	//r8192_wx_null,
+	/* r8192_wx_null, */
 	r8192_wx_force_reset,
 };
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/4] Staging: rtl8192u: r8192U_wx.c Added a single space for code-style issue
  2014-06-02 16:11 [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some dead code Chaitanya Hazarey
  2014-06-02 16:11 ` [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments Chaitanya Hazarey
@ 2014-06-02 16:11 ` Chaitanya Hazarey
  2014-06-02 16:11 ` [PATCH 4/4] Staging: rtl8192u: r8192U_wx.c Removed some more commented out dead code Chaitanya Hazarey
  2014-06-19 22:15 ` [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some " Greg KH
  3 siblings, 0 replies; 10+ messages in thread
From: Chaitanya Hazarey @ 2014-06-02 16:11 UTC (permalink / raw)
  To: gregkh, burzalodowa, andrea.merello
  Cc: devel, linux-kernel, Chaitanya Hazarey

Added a space around '|' to address:

ERROR: need consistent spacing around '|' (ctx:VxW)

Signed-off-by: Chaitanya Hazarey <c@24.io>
---
 drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index b533784..09b1e81 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -987,7 +987,7 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
 	wstats->qual.level = tmp_level;
 	wstats->qual.qual = tmp_qual;
 	wstats->qual.noise = tmp_noise;
-	wstats->qual.updated = IW_QUAL_ALL_UPDATED| IW_QUAL_DBM;
+	wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
 	return wstats;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/4] Staging: rtl8192u: r8192U_wx.c Removed some more commented out dead code
  2014-06-02 16:11 [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some dead code Chaitanya Hazarey
  2014-06-02 16:11 ` [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments Chaitanya Hazarey
  2014-06-02 16:11 ` [PATCH 3/4] Staging: rtl8192u: r8192U_wx.c Added a single space for code-style issue Chaitanya Hazarey
@ 2014-06-02 16:11 ` Chaitanya Hazarey
  2014-06-19 22:15 ` [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some " Greg KH
  3 siblings, 0 replies; 10+ messages in thread
From: Chaitanya Hazarey @ 2014-06-02 16:11 UTC (permalink / raw)
  To: gregkh, burzalodowa, andrea.merello
  Cc: devel, linux-kernel, Chaitanya Hazarey

Removed dead code from the file.

Signed-off-by: Chaitanya Hazarey <c@24.io>
---
 drivers/staging/rtl8192u/r8192U_wx.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index 09b1e81..ceb06d8 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -516,12 +516,9 @@ static int r8192_wx_set_enc(struct net_device *dev,
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	struct ieee80211_device *ieee = priv->ieee80211;
 	int ret;
-
-	/* u32 TargetContent; */
 	u32 hwkey[4] = {0, 0, 0, 0};
 	u8 mask = 0xff;
 	u32 key_idx = 0;
-	/* u8 broadcast_addr[6] ={	0xff,0xff,0xff,0xff,0xff,0xff}; */
 	u8 zero_addr[4][6] = {	{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 				{0x00, 0x00, 0x00, 0x00, 0x00, 0x01},
 				{0x00, 0x00, 0x00, 0x00, 0x00, 0x02},
@@ -667,14 +664,6 @@ static int r8192_wx_set_retry(struct net_device *dev,
 	 */
 
 	rtl8192_commit(dev);
-	/*
-	if(priv->up){
-		rtl8180_rtx_disable(dev);
-		rtl8180_rx_enable(dev);
-		rtl8180_tx_enable(dev);
-
-	}
-	*/
 exit:
 	up(&priv->wx_sem);
 
@@ -953,14 +942,9 @@ static const struct iw_priv_args r8192_private_args[] = {
 
 
 static iw_handler r8192_private_handler[] = {
-	/* r8192_wx_set_monitor, */ /* SIOCIWFIRSTPRIV */
-	r8192_wx_set_crcmon,   /*SIOCIWSECONDPRIV*/
-	/* r8192_wx_set_forceassociate, */
-	/* r8192_wx_set_beaconinterval, */
-	/* r8192_wx_set_monitor_type, */
+	r8192_wx_set_crcmon, 
 	r8192_wx_set_scan_type,
 	r8192_wx_set_rawtx,
-	/* r8192_wx_null, */
 	r8192_wx_force_reset,
 };
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments
  2014-06-02 16:11 ` [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments Chaitanya Hazarey
@ 2014-06-03  8:12   ` Geert Uytterhoeven
  2014-06-03 18:36     ` Dan Carpenter
  0 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2014-06-03  8:12 UTC (permalink / raw)
  To: Chaitanya Hazarey
  Cc: Greg KH, burzalodowa, andrea.merello, driverdevel, linux-kernel

Hi Chaitanya,

On Mon, Jun 2, 2014 at 6:11 PM, Chaitanya Hazarey <c@24.io> wrote:
> To address the error -
>
> ERROR: do not use C99 // comments
>
> Removed all C99 comments.

IMHO, blindly converting C99 comments is a good idea...

> --- a/drivers/staging/rtl8192u/r8192U_wx.c
> +++ b/drivers/staging/rtl8192u/r8192U_wx.c
> @@ -180,8 +180,8 @@ static int r8192_wx_set_crcmon(struct net_device *dev,
>               priv->crcmon ? "accepted" : "rejected");
>
>         if (prev != priv->crcmon && priv->up) {
> -               //rtl8180_down(dev);
> -               //rtl8180_up(dev);
> +               /* rtl8180_down(dev); */
> +               /* rtl8180_up(dev); */

These calls were probably commented out for a reason. Keeping the
"//" makes them stand out, so hopefully one day someone will look into them.

>         }
>
>         up(&priv->wx_sem);
> @@ -249,15 +249,15 @@ static int rtl8180_wx_get_range(struct net_device *dev,
>         /* ~5 Mb/s real (802.11b) */
>         range->throughput = 5 * 1000 * 1000;
>
> -       // TODO: Not used in 802.11b?
> -//     range->min_nwid;        /* Minimal NWID we are able to set */
> -       // TODO: Not used in 802.11b?
> -//     range->max_nwid;        /* Maximal NWID we are able to set */
> +       /* TODO: Not used in 802.11b? */
> +       /* range->min_nwid; */  /* Minimal NWID we are able to set */
> +       /* TODO: Not used in 802.11b? */
> +       /* range->max_nwid; */  /* Maximal NWID we are able to set */

These are OK, the "TODO" is a good indicator.

>         /* Old Frequency (backward compat - moved lower ) */
> -//     range->old_num_channels;
> -//     range->old_num_frequency;
> -//     range->old_freq[6]; /* Filler to keep "version" at the same offset */
> +       /* range->old_num_channels; */
> +       /* range->old_num_frequency; */
> +       /* range->old_freq[6]; */ /* Filler to keep "version" at the same offset */

Please keep the "//" as an indicator.

>         if (priv->rf_set_sens != NULL)
>                 range->sensitivity = priv->max_sens;    /* signal level threshold range */
>
> @@ -292,26 +292,26 @@ static int rtl8180_wx_get_range(struct net_device *dev,
>         range->we_version_compiled = WIRELESS_EXT;
>         range->we_version_source = 16;
>
> -//     range->retry_capa;      /* What retry options are supported */
> -//     range->retry_flags;     /* How to decode max/min retry limit */
> -//     range->r_time_flags;    /* How to decode max/min retry life */
> -//     range->min_retry;       /* Minimal number of retries */
> -//     range->max_retry;       /* Maximal number of retries */
> -//     range->min_r_time;      /* Minimal retry lifetime */
> -//     range->max_r_time;      /* Maximal retry lifetime */
> +       /* range->retry_capa; */        /* What retry options are supported */
> +       /* range->retry_flags; */       /* How to decode max/min retry limit */
> +       /* range->r_time_flags; */      /* How to decode max/min retry life */
> +       /* range->min_retry; */         /* Minimal number of retries */
> +       /* range->max_retry; */         /* Maximal number of retries */
> +       /* range->min_r_time; */        /* Minimal retry lifetime */
> +       /* range->max_r_time; */        /* Maximal retry lifetime */

Same here.

>         for (i = 0, val = 0; i < 14; i++) {
>
> -               // Include only legal frequencies for some countries
> +               /* Include only legal frequencies for some countries */

Converting normal comments is OK.

>                 if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) {
>                         range->freq[val].i = i + 1;
>                         range->freq[val].m = ieee80211_wlan_frequencies[i] * 100

What do other people think?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments
  2014-06-03  8:12   ` Geert Uytterhoeven
@ 2014-06-03 18:36     ` Dan Carpenter
  2014-06-03 21:34       ` Chaitanya Hazarey
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2014-06-03 18:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Chaitanya Hazarey, andrea.merello, Greg KH, driverdevel,
	linux-kernel, burzalodowa

On Tue, Jun 03, 2014 at 10:12:23AM +0200, Geert Uytterhoeven wrote:
> What do other people think?

In staging we just automatically delete commented code.  It's in the git
log if you need it.  It always feels much better after the dead code is
gone.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments
  2014-06-03 18:36     ` Dan Carpenter
@ 2014-06-03 21:34       ` Chaitanya Hazarey
  2014-06-03 21:42         ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Chaitanya Hazarey @ 2014-06-03 21:34 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Geert Uytterhoeven, Andrea Merello, Greg KH, driverdevel,
	linux-kernel, Ksenia Ragiadakou

On Tue, Jun 3, 2014 at 11:36 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> It always feels much better after the dead code is gone.

So patches are still good ? No change required for my side, right ? I
just need to wait for Greg's needle to come to this point and pick
them up.

Best,

Chaitanya

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments
  2014-06-03 21:42         ` Greg KH
@ 2014-06-03 21:42           ` Chaitanya Hazarey
  0 siblings, 0 replies; 10+ messages in thread
From: Chaitanya Hazarey @ 2014-06-03 21:42 UTC (permalink / raw)
  To: Greg KH
  Cc: Dan Carpenter, driverdevel, Andrea Merello, linux-kernel,
	Geert Uytterhoeven, Ksenia Ragiadakou

On Tue, Jun 3, 2014 at 2:42 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> So keep working on things,
> these aren't lost, I'll get to them in a few weeks.
>

Ok will do,

Chaitanya

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments
  2014-06-03 21:34       ` Chaitanya Hazarey
@ 2014-06-03 21:42         ` Greg KH
  2014-06-03 21:42           ` Chaitanya Hazarey
  0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2014-06-03 21:42 UTC (permalink / raw)
  To: Chaitanya Hazarey
  Cc: Dan Carpenter, driverdevel, Andrea Merello, linux-kernel,
	Geert Uytterhoeven, Ksenia Ragiadakou

On Tue, Jun 03, 2014 at 02:34:55PM -0700, Chaitanya Hazarey wrote:
> On Tue, Jun 3, 2014 at 11:36 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > It always feels much better after the dead code is gone.
> 
> So patches are still good ? No change required for my side, right ? I
> just need to wait for Greg's needle to come to this point and pick
> them up.

That will be a few weeks, as the merge window is open so I can't take
anything in my tree until 3.16-rc1 is out.  So keep working on things,
these aren't lost, I'll get to them in a few weeks.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some dead code
  2014-06-02 16:11 [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some dead code Chaitanya Hazarey
                   ` (2 preceding siblings ...)
  2014-06-02 16:11 ` [PATCH 4/4] Staging: rtl8192u: r8192U_wx.c Removed some more commented out dead code Chaitanya Hazarey
@ 2014-06-19 22:15 ` Greg KH
  3 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2014-06-19 22:15 UTC (permalink / raw)
  To: Chaitanya Hazarey; +Cc: burzalodowa, andrea.merello, devel, linux-kernel

On Mon, Jun 02, 2014 at 09:11:42AM -0700, Chaitanya Hazarey wrote:
> Removed dead code, commented out printks and DMESG.
> 
> Signed-off-by: Chaitanya Hazarey <c@24.io>

This patch does not apply :(


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-06-19 22:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 16:11 [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some dead code Chaitanya Hazarey
2014-06-02 16:11 ` [PATCH 2/4] Staging: rtl8192u: r8192U_wx.c Removed all C99 comments Chaitanya Hazarey
2014-06-03  8:12   ` Geert Uytterhoeven
2014-06-03 18:36     ` Dan Carpenter
2014-06-03 21:34       ` Chaitanya Hazarey
2014-06-03 21:42         ` Greg KH
2014-06-03 21:42           ` Chaitanya Hazarey
2014-06-02 16:11 ` [PATCH 3/4] Staging: rtl8192u: r8192U_wx.c Added a single space for code-style issue Chaitanya Hazarey
2014-06-02 16:11 ` [PATCH 4/4] Staging: rtl8192u: r8192U_wx.c Removed some more commented out dead code Chaitanya Hazarey
2014-06-19 22:15 ` [PATCH 1/4] Staging: rtl8192u: r8192U_wx.c removed some " Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).