All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c
@ 2016-03-18 10:54 Yousof El-Sayed
  2016-03-18 17:31 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Yousof El-Sayed @ 2016-03-18 10:54 UTC (permalink / raw)
  To: gregkh, mateusz.kulikowski, gdhanapa, amitoj1606; +Cc: devel, linux-kernel

This is a patch to the rtllib_softmac.c file that fixes up all instances of the 'line over 80 characters' warnings found by the checkpatch.pl tool

Signed-off-by: Yousof El-Sayed <yousof.el-sayed@elastichosts.com>
---
 drivers/staging/rtl8192e/rtllib_softmac.c | 35 +++++++++++++++++++------------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index cfab715..9ba2230 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -389,7 +389,8 @@ static void rtllib_send_beacon(struct rtllib_device *ieee)
 
 	if (ieee->beacon_txing && ieee->ieee_up)
 		mod_timer(&ieee->beacon_timer, jiffies +
-			  (msecs_to_jiffies(ieee->current_network.beacon_interval - 5)));
+			  (msecs_to_jiffies
+			   (ieee->current_network.beacon_interval - 5)));
 }
 
 
@@ -601,7 +602,8 @@ static void rtllib_softmac_scan_wq(void *data)
 			(ieee->current_network.channel + 1) %
 			MAX_CHANNEL_NUMBER;
 		if (ieee->scan_watch_dog++ > MAX_CHANNEL_NUMBER) {
-			if (!ieee->active_channel_map[ieee->current_network.channel])
+			if (!ieee->active_channel_map[ieee->
+					current_network.channel])
 				ieee->current_network.channel = 6;
 			goto out; /* no good chans */
 		}
@@ -1716,8 +1718,9 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
 			if (ieee->iw_mode == IW_MODE_INFRA) {
 				/* Join the network for the first time */
 				ieee->AsocRetryCount = 0;
-				if ((ieee->current_network.qos_data.supported == 1) &&
-				    ieee->current_network.bssht.bdSupportHT)
+				if ((ieee->current_network.qos_data.supported 
+				      == 1) && 
+				       ieee->current_network.bssht.bdSupportHT)
 					HTResetSelfAndSavePeerSetting(ieee,
 						 &(ieee->current_network));
 				else
@@ -2044,8 +2047,8 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
 			}
 
 		*time = ieee->current_network.last_dtim_sta_time
-			+ msecs_to_jiffies(ieee->current_network.beacon_interval *
-			LPSAwakeIntvl_tmp);
+			+ msecs_to_jiffies(ieee->
+			current_network.beacon_interval * LPSAwakeIntvl_tmp);
 	}
 	}
 
@@ -2237,11 +2240,15 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
 			ieee->assoc_id = aid;
 			ieee->softmac_stats.rx_ass_ok++;
 			/* station support qos */
-			/* Let the register setting default with Legacy station */
-			assoc_resp = (struct rtllib_assoc_response_frame *)skb->data;
+			/* Let the register setting default */
+		        /*	with Legacy station */
+			assoc_resp = (struct 
+				rtllib_assoc_response_frame *)skb->data;
 			if (ieee->current_network.qos_data.supported == 1) {
-				if (rtllib_parse_info_param(ieee, assoc_resp->info_element,
-							rx_stats->len - sizeof(*assoc_resp),
+				if (rtllib_parse_info_param
+						(ieee, assoc_resp->info_element,
+							rx_stats->len - sizeof
+							(*assoc_resp),
 							network, rx_stats)) {
 					kfree(network);
 					return 1;
@@ -2254,8 +2261,9 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
 				       network->bssht.bdHTInfoLen);
 				if (ieee->handle_assoc_response != NULL)
 					ieee->handle_assoc_response(ieee->dev,
-						 (struct rtllib_assoc_response_frame *)header,
-						 network);
+						 (struct 
+						  rtllib_assoc_response_frame *)
+						   header, network);
 			}
 			kfree(network);
 
@@ -2595,7 +2603,8 @@ static void rtllib_start_ibss_wq(void *data)
 
 	if (ieee->current_network.ssid_len == 0) {
 		strcpy(ieee->current_network.ssid, RTLLIB_DEFAULT_TX_ESSID);
-		ieee->current_network.ssid_len = strlen(RTLLIB_DEFAULT_TX_ESSID);
+		ieee->current_network.ssid_len = 
+			                    strlen(RTLLIB_DEFAULT_TX_ESSID);
 		ieee->ssid_set = 1;
 	}
 
-- 
1.8.3.1

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

* Re: [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c
  2016-03-18 10:54 [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c Yousof El-Sayed
@ 2016-03-18 17:31 ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2016-03-18 17:31 UTC (permalink / raw)
  To: Yousof El-Sayed
  Cc: mateusz.kulikowski, gdhanapa, amitoj1606, devel, linux-kernel

On Fri, Mar 18, 2016 at 10:54:42AM +0000, Yousof El-Sayed wrote:
> This is a patch to the rtllib_softmac.c file that fixes up all instances of the 'line over 80 characters' warnings found by the checkpatch.pl tool

Your changelog should be wrapped, ironic given the contents of your
patch :(

Please fix up and resend.

thanks,

greg k-h

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

* Re: [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c
  2016-03-18 17:48 Yousof El-Sayed
@ 2016-03-18 18:04 ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2016-03-18 18:04 UTC (permalink / raw)
  To: Yousof El-Sayed, gregkh, mateusz.kulikowski, gdhanapa, amitoj1606
  Cc: devel, linux-kernel

On Fri, 2016-03-18 at 17:48 +0000, Yousof El-Sayed wrote:
> This is a patch to the rtllib_softmac.c file that fixes up all instances of
>  the 'line over 80 characters' warnings found by the checkpatch.pl tool.
[]
> diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
[]
> @@ -389,7 +389,8 @@ static void rtllib_send_beacon(struct rtllib_device *ieee)
>  
>  	if (ieee->beacon_txing && ieee->ieee_up)
>  		mod_timer(&ieee->beacon_timer, jiffies +
> -			  (msecs_to_jiffies(ieee->current_network.beacon_interval - 5)));
> +			  (msecs_to_jiffies
> +			   (ieee->current_network.beacon_interval - 5)));

Long identifier names like "current_network.beacon_interval",
which is 31 chars long, make the 80 column limit somewhat silly.

It's OK to ignore checkpatch warnings when changing the code
is less readable.

Most all of these are less nice than the original.

For instance, if this were to be changed (and it doesn't
need to be) perhaps:

>  	if (ieee->beacon_txing && ieee->ieee_up)
>  		mod_timer(&ieee->beacon_timer, jiffies +
> -			  (msecs_to_jiffies(ieee->current_network.beacon_interval - 5)));
> +			  (msecs_to_jiffies
> +			   (ieee->current_network.beacon_interval - 5)));


		mod_timer(&ieee->beacon_timer,
			  jiffies +
			  msecs_to_jiffies(ieee->current_network.beacon_interval - 5));

which is still > 80 columns, but it removes an unnecessary
set of parentheses.

Breaking the msecs_to_jiffies() at the function name is
otherwise rather unsightly.

Always strive for readability and clarity over serving
some mindless script.

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

* [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c
@ 2016-03-18 17:48 Yousof El-Sayed
  2016-03-18 18:04 ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Yousof El-Sayed @ 2016-03-18 17:48 UTC (permalink / raw)
  To: gregkh, mateusz.kulikowski, gdhanapa, amitoj1606; +Cc: devel, linux-kernel

This is a patch to the rtllib_softmac.c file that fixes up all instances of
 the 'line over 80 characters' warnings found by the checkpatch.pl tool.

Signed-off-by: Yousof El-Sayed <yousof.el-sayed@elastichosts.com>
---
 drivers/staging/rtl8192e/rtllib_softmac.c | 35 +++++++++++++++++++------------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index cfab715..9ba2230 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -389,7 +389,8 @@ static void rtllib_send_beacon(struct rtllib_device *ieee)
 
 	if (ieee->beacon_txing && ieee->ieee_up)
 		mod_timer(&ieee->beacon_timer, jiffies +
-			  (msecs_to_jiffies(ieee->current_network.beacon_interval - 5)));
+			  (msecs_to_jiffies
+			   (ieee->current_network.beacon_interval - 5)));
 }
 
 
@@ -601,7 +602,8 @@ static void rtllib_softmac_scan_wq(void *data)
 			(ieee->current_network.channel + 1) %
 			MAX_CHANNEL_NUMBER;
 		if (ieee->scan_watch_dog++ > MAX_CHANNEL_NUMBER) {
-			if (!ieee->active_channel_map[ieee->current_network.channel])
+			if (!ieee->active_channel_map[ieee->
+					current_network.channel])
 				ieee->current_network.channel = 6;
 			goto out; /* no good chans */
 		}
@@ -1716,8 +1718,9 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
 			if (ieee->iw_mode == IW_MODE_INFRA) {
 				/* Join the network for the first time */
 				ieee->AsocRetryCount = 0;
-				if ((ieee->current_network.qos_data.supported == 1) &&
-				    ieee->current_network.bssht.bdSupportHT)
+				if ((ieee->current_network.qos_data.supported 
+				      == 1) && 
+				       ieee->current_network.bssht.bdSupportHT)
 					HTResetSelfAndSavePeerSetting(ieee,
 						 &(ieee->current_network));
 				else
@@ -2044,8 +2047,8 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
 			}
 
 		*time = ieee->current_network.last_dtim_sta_time
-			+ msecs_to_jiffies(ieee->current_network.beacon_interval *
-			LPSAwakeIntvl_tmp);
+			+ msecs_to_jiffies(ieee->
+			current_network.beacon_interval * LPSAwakeIntvl_tmp);
 	}
 	}
 
@@ -2237,11 +2240,15 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
 			ieee->assoc_id = aid;
 			ieee->softmac_stats.rx_ass_ok++;
 			/* station support qos */
-			/* Let the register setting default with Legacy station */
-			assoc_resp = (struct rtllib_assoc_response_frame *)skb->data;
+			/* Let the register setting default */
+		        /*	with Legacy station */
+			assoc_resp = (struct 
+				rtllib_assoc_response_frame *)skb->data;
 			if (ieee->current_network.qos_data.supported == 1) {
-				if (rtllib_parse_info_param(ieee, assoc_resp->info_element,
-							rx_stats->len - sizeof(*assoc_resp),
+				if (rtllib_parse_info_param
+						(ieee, assoc_resp->info_element,
+							rx_stats->len - sizeof
+							(*assoc_resp),
 							network, rx_stats)) {
 					kfree(network);
 					return 1;
@@ -2254,8 +2261,9 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
 				       network->bssht.bdHTInfoLen);
 				if (ieee->handle_assoc_response != NULL)
 					ieee->handle_assoc_response(ieee->dev,
-						 (struct rtllib_assoc_response_frame *)header,
-						 network);
+						 (struct 
+						  rtllib_assoc_response_frame *)
+						   header, network);
 			}
 			kfree(network);
 
@@ -2595,7 +2603,8 @@ static void rtllib_start_ibss_wq(void *data)
 
 	if (ieee->current_network.ssid_len == 0) {
 		strcpy(ieee->current_network.ssid, RTLLIB_DEFAULT_TX_ESSID);
-		ieee->current_network.ssid_len = strlen(RTLLIB_DEFAULT_TX_ESSID);
+		ieee->current_network.ssid_len = 
+			                    strlen(RTLLIB_DEFAULT_TX_ESSID);
 		ieee->ssid_set = 1;
 	}
 
-- 
1.8.3.1

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

end of thread, other threads:[~2016-03-18 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 10:54 [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c Yousof El-Sayed
2016-03-18 17:31 ` Greg KH
2016-03-18 17:48 Yousof El-Sayed
2016-03-18 18:04 ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.