diff mbox

[OPW,kernel] staging:wlan-ng:cfg80211.c: Shorten lines to 80 characters

Message ID 20131102012105.GA31690@himangi-Inspiron-N5110gmail.com
State New, archived
Headers show

Commit Message

HIMANGI SARAOGI Nov. 2, 2013, 1:21 a.m. UTC
This patch removes checkpatch.pl warnings "line over 80 characters" in
cfg80211.c.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
---
 drivers/staging/wlan-ng/cfg80211.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Comments

Josh Triplett Nov. 2, 2013, 12:19 p.m. UTC | #1
On Sat, Nov 02, 2013 at 06:51:05AM +0530, Himangi Saraogi wrote:
> This patch removes checkpatch.pl warnings "line over 80 characters" in
> cfg80211.c.

One comment below.

> --- a/drivers/staging/wlan-ng/cfg80211.c
> +++ b/drivers/staging/wlan-ng/cfg80211.c
> @@ -73,7 +73,8 @@ static int prism2_result2err(int prism2_result)
>  static int prism2_domibset_uint32(wlandevice_t *wlandev, u32 did, u32 data)
>  {
>  	struct p80211msg_dot11req_mibset msg;
> -	p80211item_uint32_t *mibitem = (p80211item_uint32_t *) &msg.mibattribute.data;
> +	p80211item_uint32_t *mibitem =
> +			(p80211item_uint32_t *) &msg.mibattribute.data;
>  
>  	msg.msgcode = DIDmsg_dot11req_mibset;
>  	mibitem->did = did;
> @@ -86,7 +87,8 @@ static int prism2_domibset_pstr32(wlandevice_t *wlandev,
>  				  u32 did, u8 len, u8 *data)
>  {
>  	struct p80211msg_dot11req_mibset msg;
> -	p80211item_pstr32_t *mibitem = (p80211item_pstr32_t *) &msg.mibattribute.data;
> +	p80211item_pstr32_t *mibitem =
> +			(p80211item_pstr32_t *) &msg.mibattribute.data;
>  
>  	msg.msgcode = DIDmsg_dot11req_mibset;
>  	mibitem->did = did;
> @@ -182,7 +184,8 @@ static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev,
>  			goto exit;
>  		}
>  
> -		result = prism2_domibset_pstr32(wlandev, did, params->key_len, params->key);
> +		result = prism2_domibset_pstr32(wlandev, did,
> +						params->key_len, params->key);
>  		if (result)
>  			goto exit;
>  		break;
> @@ -328,7 +331,8 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
>  	return result;
>  }
>  
> -static int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
> +static int prism2_scan(struct wiphy *wiphy,
> +		       struct cfg80211_scan_request *request)



>  {
>  	struct net_device *dev;
>  	struct prism2_wiphy_private *priv = wiphy_priv(wiphy);
> @@ -380,7 +384,8 @@ static int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *reques
>  		(i < request->n_channels) && i < ARRAY_SIZE(prism2_channels);
>  		i++)
>  		msg1.channellist.data.data[i] =
> -			ieee80211_frequency_to_channel(request->channels[i]->center_freq);
> +			ieee80211_frequency_to_channel(
> +				request->channels[i]->center_freq);
>  	msg1.channellist.data.len = request->n_channels;
>  
>  	msg1.maxchanneltime.data = 250;
> @@ -410,7 +415,8 @@ static int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *reques
>  		ie_len = ie_buf[1] + 2;
>  		memcpy(&ie_buf[2], &(msg2.ssid.data.data), msg2.ssid.data.len);
>  		bss = cfg80211_inform_bss(wiphy,
> -			ieee80211_get_channel(wiphy, ieee80211_dsss_chan_to_freq(msg2.dschannel.data)),
> +			ieee80211_get_channel(wiphy,
> +			ieee80211_dsss_chan_to_freq(msg2.dschannel.data)),

That indentation makes this nested function call confusing.  The call to
ieee80211_dsss_chan_to_freq is an argument to ieee80211_get_channel, not
to cfg80211_inform_bss, but your indentation implies the latter.  Please
indent an extra tab to make it more clear.

>  			(const u8 *) &(msg2.bssid.data.data),
>  			msg2.timestamp.data, msg2.capinfo.data,
>  			msg2.beaconperiod.data,
diff mbox

Patch

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index a4fd5c4..65a8b9f 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -73,7 +73,8 @@  static int prism2_result2err(int prism2_result)
 static int prism2_domibset_uint32(wlandevice_t *wlandev, u32 did, u32 data)
 {
 	struct p80211msg_dot11req_mibset msg;
-	p80211item_uint32_t *mibitem = (p80211item_uint32_t *) &msg.mibattribute.data;
+	p80211item_uint32_t *mibitem =
+			(p80211item_uint32_t *) &msg.mibattribute.data;
 
 	msg.msgcode = DIDmsg_dot11req_mibset;
 	mibitem->did = did;
@@ -86,7 +87,8 @@  static int prism2_domibset_pstr32(wlandevice_t *wlandev,
 				  u32 did, u8 len, u8 *data)
 {
 	struct p80211msg_dot11req_mibset msg;
-	p80211item_pstr32_t *mibitem = (p80211item_pstr32_t *) &msg.mibattribute.data;
+	p80211item_pstr32_t *mibitem =
+			(p80211item_pstr32_t *) &msg.mibattribute.data;
 
 	msg.msgcode = DIDmsg_dot11req_mibset;
 	mibitem->did = did;
@@ -182,7 +184,8 @@  static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev,
 			goto exit;
 		}
 
-		result = prism2_domibset_pstr32(wlandev, did, params->key_len, params->key);
+		result = prism2_domibset_pstr32(wlandev, did,
+						params->key_len, params->key);
 		if (result)
 			goto exit;
 		break;
@@ -328,7 +331,8 @@  static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
 	return result;
 }
 
-static int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
+static int prism2_scan(struct wiphy *wiphy,
+		       struct cfg80211_scan_request *request)
 {
 	struct net_device *dev;
 	struct prism2_wiphy_private *priv = wiphy_priv(wiphy);
@@ -380,7 +384,8 @@  static int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *reques
 		(i < request->n_channels) && i < ARRAY_SIZE(prism2_channels);
 		i++)
 		msg1.channellist.data.data[i] =
-			ieee80211_frequency_to_channel(request->channels[i]->center_freq);
+			ieee80211_frequency_to_channel(
+				request->channels[i]->center_freq);
 	msg1.channellist.data.len = request->n_channels;
 
 	msg1.maxchanneltime.data = 250;
@@ -410,7 +415,8 @@  static int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *reques
 		ie_len = ie_buf[1] + 2;
 		memcpy(&ie_buf[2], &(msg2.ssid.data.data), msg2.ssid.data.len);
 		bss = cfg80211_inform_bss(wiphy,
-			ieee80211_get_channel(wiphy, ieee80211_dsss_chan_to_freq(msg2.dschannel.data)),
+			ieee80211_get_channel(wiphy,
+			ieee80211_dsss_chan_to_freq(msg2.dschannel.data)),
 			(const u8 *) &(msg2.bssid.data.data),
 			msg2.timestamp.data, msg2.capinfo.data,
 			msg2.beaconperiod.data,