[OPW,kernel,05/11] staging: rtl8187se: move trailing statement to next line in ieee80211/ieee80211_softmac.c
diff mbox

Message ID db22ae9d1cecbe77c6ab38bfb54830b0a1391885.1394195021.git.anarey@gmail.com
State New, archived
Headers show

Commit Message

Ana Rey March 7, 2014, 12:33 p.m. UTC
This patch moves trailing statement to next line as the codingStyle of
the kernel recommends.

Thus, this patch fixes these errors found by checkpatch.pl:
ERROR: trailing statements should be on next line
---
 .../rtl8187se/ieee80211/ieee80211_softmac.c        | 29 ++++++++++++++--------
 1 file changed, 19 insertions(+), 10 deletions(-)

Comments

Paul E. McKenney March 7, 2014, 4:38 p.m. UTC | #1
On Fri, Mar 07, 2014 at 01:33:05PM +0100, Ana Rey wrote:
> This patch moves trailing statement to next line as the codingStyle of
> the kernel recommends.
> 
> Thus, this patch fixes these errors found by checkpatch.pl:
> ERROR: trailing statements should be on next line

You need a Signed-off-by: line here.  Other than that, looks good.

> ---
>  .../rtl8187se/ieee80211/ieee80211_softmac.c        | 29 ++++++++++++++--------
>  1 file changed, 19 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> index 63fb033..9143b40 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
> @@ -649,13 +649,15 @@ ieee80211_authentication_req(struct ieee80211_network *beacon,
> 
>  	skb = dev_alloc_skb(sizeof(struct ieee80211_authentication) + challengelen);
> 
> -	if (!skb) return NULL;
> +	if (!skb)
> +		return NULL;
> 
>  	auth = (struct ieee80211_authentication *)
>  		skb_put(skb, sizeof(struct ieee80211_authentication));
> 
>  	auth->header.frame_ctl = IEEE80211_STYPE_AUTH;
> -	if (challengelen) auth->header.frame_ctl |= IEEE80211_FCTL_WEP;
> +	if (challengelen)
> +		auth->header.frame_ctl |= IEEE80211_FCTL_WEP;
> 
>  	auth->header.duration_id = 0x013a; /* FIXME */
> 
> @@ -689,7 +691,8 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee,
>  	int rate_len = ieee->current_network.rates_len + 2;
>  	int rate_ex_len = ieee->current_network.rates_ex_len;
>  	int wpa_ie_len = ieee->wpa_ie_len;
> -	if (rate_ex_len > 0) rate_ex_len += 2;
> +	if (rate_ex_len > 0)
> +		rate_ex_len += 2;
> 
>  	if (ieee->current_network.capability & WLAN_CAPABILITY_IBSS)
>  		atim_len = 4;
> @@ -826,7 +829,8 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
> 
>  	if (ieee->host_encrypt)
>  		crypt = ieee->crypt[ieee->tx_keyidx];
> -	else crypt = NULL;
> +	else
> +		crypt = NULL;
> 
>  	encrypt = (crypt && crypt->ops);
> 
> @@ -835,8 +839,10 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
> 
>  	assoc->status = 0;
>  	assoc->aid = cpu_to_le16(ieee->assoc_id);
> -	if (ieee->assoc_id == 0x2007) ieee->assoc_id = 0;
> -	else ieee->assoc_id++;
> +	if (ieee->assoc_id == 0x2007)
> +		ieee->assoc_id = 0;
> +	else
> +		ieee->assoc_id++;
> 
>  	tag = (u8*) skb_put(skb, rate_len);
> 
> @@ -1378,11 +1384,13 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
>  		tag++; /* point to the next tag */
>  	}
> 
> -	if (ssidlen == 0) return 1;
> +	if (ssidlen == 0)
> +		return 1;
> 
> -	if (!ssid) return 1; /* ssid not found in tagged param */
> -	return (!strncmp(ssid, ieee->current_network.ssid, ssidlen));
> +	if (!ssid)
> +		return 1; /* ssid not found in tagged param */
> 
> +	return (!strncmp(ssid, ieee->current_network.ssid, ssidlen));
>  }
> 
>  static int assoc_rq_parse(struct sk_buff *skb, u8 *dest)
> @@ -1868,7 +1876,8 @@ void ieee80211_rtl_wake_queue(struct ieee80211_device *ieee)
>  	struct ieee80211_hdr_3addr *header;
> 
>  	spin_lock_irqsave(&ieee->lock, flags);
> -	if (!ieee->queue_stop) goto exit;
> +	if (!ieee->queue_stop)
> +		goto exit;
> 
>  	ieee->queue_stop = 0;
> 
> -- 
> 1.8.5.3
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Patch
diff mbox

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
index 63fb033..9143b40 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@ -649,13 +649,15 @@  ieee80211_authentication_req(struct ieee80211_network *beacon,
 
 	skb = dev_alloc_skb(sizeof(struct ieee80211_authentication) + challengelen);
 
-	if (!skb) return NULL;
+	if (!skb)
+		return NULL;
 
 	auth = (struct ieee80211_authentication *)
 		skb_put(skb, sizeof(struct ieee80211_authentication));
 
 	auth->header.frame_ctl = IEEE80211_STYPE_AUTH;
-	if (challengelen) auth->header.frame_ctl |= IEEE80211_FCTL_WEP;
+	if (challengelen)
+		auth->header.frame_ctl |= IEEE80211_FCTL_WEP;
 
 	auth->header.duration_id = 0x013a; /* FIXME */
 
@@ -689,7 +691,8 @@  static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee,
 	int rate_len = ieee->current_network.rates_len + 2;
 	int rate_ex_len = ieee->current_network.rates_ex_len;
 	int wpa_ie_len = ieee->wpa_ie_len;
-	if (rate_ex_len > 0) rate_ex_len += 2;
+	if (rate_ex_len > 0)
+		rate_ex_len += 2;
 
 	if (ieee->current_network.capability & WLAN_CAPABILITY_IBSS)
 		atim_len = 4;
@@ -826,7 +829,8 @@  static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
 
 	if (ieee->host_encrypt)
 		crypt = ieee->crypt[ieee->tx_keyidx];
-	else crypt = NULL;
+	else
+		crypt = NULL;
 
 	encrypt = (crypt && crypt->ops);
 
@@ -835,8 +839,10 @@  static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
 
 	assoc->status = 0;
 	assoc->aid = cpu_to_le16(ieee->assoc_id);
-	if (ieee->assoc_id == 0x2007) ieee->assoc_id = 0;
-	else ieee->assoc_id++;
+	if (ieee->assoc_id == 0x2007)
+		ieee->assoc_id = 0;
+	else
+		ieee->assoc_id++;
 
 	tag = (u8*) skb_put(skb, rate_len);
 
@@ -1378,11 +1384,13 @@  static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
 		tag++; /* point to the next tag */
 	}
 
-	if (ssidlen == 0) return 1;
+	if (ssidlen == 0)
+		return 1;
 
-	if (!ssid) return 1; /* ssid not found in tagged param */
-	return (!strncmp(ssid, ieee->current_network.ssid, ssidlen));
+	if (!ssid)
+		return 1; /* ssid not found in tagged param */
 
+	return (!strncmp(ssid, ieee->current_network.ssid, ssidlen));
 }
 
 static int assoc_rq_parse(struct sk_buff *skb, u8 *dest)
@@ -1868,7 +1876,8 @@  void ieee80211_rtl_wake_queue(struct ieee80211_device *ieee)
 	struct ieee80211_hdr_3addr *header;
 
 	spin_lock_irqsave(&ieee->lock, flags);
-	if (!ieee->queue_stop) goto exit;
+	if (!ieee->queue_stop)
+		goto exit;
 
 	ieee->queue_stop = 0;