diff mbox

[OPW,kernel,4/6] staging: rtl8187se: fix code allignment

Message ID 1382645851-928-5-git-send-email-teobaluta@gmail.com
State New, archived
Headers show

Commit Message

Teodora Baluta Oct. 24, 2013, 8:17 p.m. UTC
Fix confusingly indented code after if. This patch fixes the following
coccinelle issues:

drivers/staging/rtl8187se/r8180_wx.c:1148:2-11: code aligned with following code on line 1150
drivers/staging/rtl8187se/r8180_dm.c:668:1-84: code aligned with following code on line 674
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:623:2-38: code aligned with following code on line 625
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:148:1-85: code aligned with following code on line 149

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c |    5 +++--
 drivers/staging/rtl8187se/r8180_dm.c               |    2 +-
 drivers/staging/rtl8187se/r8180_wx.c               |    8 ++++----
 3 files changed, 8 insertions(+), 7 deletions(-)

Comments

Rusty Russell Oct. 25, 2013, 1 a.m. UTC | #1
Teodora Baluta <teobaluta@gmail.com> writes:

> Fix confusingly indented code after if. This patch fixes the following
> coccinelle issues:
>
> drivers/staging/rtl8187se/r8180_wx.c:1148:2-11: code aligned with following code on line 1150
> drivers/staging/rtl8187se/r8180_dm.c:668:1-84: code aligned with following code on line 674
> drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:623:2-38: code aligned with following code on line 625
> drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:148:1-85: code aligned with following code on line 149
>
> Signed-off-by: Teodora Baluta <teobaluta@gmail.com>

Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Cheers,
Rusty.

> ---
>  drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c |    5 +++--
>  drivers/staging/rtl8187se/r8180_dm.c               |    2 +-
>  drivers/staging/rtl8187se/r8180_wx.c               |    8 ++++----
>  3 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
> index e014f7e..24d39cc 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
> @@ -145,7 +145,8 @@ static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee,
>  	/* Add quality statistics */
>  	/* TODO: Fix these values... */
>  	if (network->stats.signal == 0 || network->stats.rssi == 0)
> -	printk("========>signal:%d, rssi:%d\n", network->stats.signal, network->stats.rssi);
> +		printk("========>signal:%d, rssi:%d\n", network->stats.signal,
> +		       network->stats.rssi);
>  	iwe.cmd = IWEVQUAL;
>  //	printk("SIGNAL: %d,RSSI: %d,NOISE: %d\n",network->stats.signal,network->stats.rssi,network->stats.noise);
>  	iwe.u.qual.qual = network->stats.signalstrength;
> @@ -622,7 +623,7 @@ done:
>  	if (ieee->set_security)
>  		ieee->set_security(ieee->dev, &sec);
>  
> -	 if (ieee->reset_on_keychange &&
> +	if (ieee->reset_on_keychange &&
>  	    ieee->iw_mode != IW_MODE_INFRA &&
>  	    ieee->reset_port && ieee->reset_port(dev)) {
>  		IEEE80211_DEBUG_WX("%s: reset_port failed\n", dev->name);
> diff --git a/drivers/staging/rtl8187se/r8180_dm.c b/drivers/staging/rtl8187se/r8180_dm.c
> index 980bafd..2ccd2cb 100644
> --- a/drivers/staging/rtl8187se/r8180_dm.c
> +++ b/drivers/staging/rtl8187se/r8180_dm.c
> @@ -665,7 +665,7 @@ static void StaRateAdaptive87SE(struct net_device *dev)
>  	}
>  
>  	if (bTryUp && bTryDown)
> -	printk("StaRateAdaptive87B(): Tx Rate tried upping and downing simultaneously!\n");
> +		printk("StaRateAdaptive87B(): Tx Rate tried upping and downing simultaneously!\n");
>  
>  	/* 1 Test Upgrading Tx Rate
>  	 * Sometimes the cause of the low throughput (high retry rate) is the compatibility between the AP and NIC.
> diff --git a/drivers/staging/rtl8187se/r8180_wx.c b/drivers/staging/rtl8187se/r8180_wx.c
> index 098e368..4e01653 100644
> --- a/drivers/staging/rtl8187se/r8180_wx.c
> +++ b/drivers/staging/rtl8187se/r8180_wx.c
> @@ -1147,12 +1147,12 @@ static int r8180_wx_set_gen_ie(struct net_device *dev,
>  	if (priv->ieee80211->bHwRadioOff)
>  		return 0;
>  
> -		down(&priv->wx_sem);
> +	down(&priv->wx_sem);
>  #if 1
> -		ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, wrqu->data.length);
> +	ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, wrqu->data.length);
>  #endif
> -		up(&priv->wx_sem);
> -		return ret;
> +	up(&priv->wx_sem);
> +	return ret;
>  
>  
>  }
> -- 
> 1.7.10.4
>
> -- 
> 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/groups/opt_out.
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
index e014f7e..24d39cc 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
@@ -145,7 +145,8 @@  static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee,
 	/* Add quality statistics */
 	/* TODO: Fix these values... */
 	if (network->stats.signal == 0 || network->stats.rssi == 0)
-	printk("========>signal:%d, rssi:%d\n", network->stats.signal, network->stats.rssi);
+		printk("========>signal:%d, rssi:%d\n", network->stats.signal,
+		       network->stats.rssi);
 	iwe.cmd = IWEVQUAL;
 //	printk("SIGNAL: %d,RSSI: %d,NOISE: %d\n",network->stats.signal,network->stats.rssi,network->stats.noise);
 	iwe.u.qual.qual = network->stats.signalstrength;
@@ -622,7 +623,7 @@  done:
 	if (ieee->set_security)
 		ieee->set_security(ieee->dev, &sec);
 
-	 if (ieee->reset_on_keychange &&
+	if (ieee->reset_on_keychange &&
 	    ieee->iw_mode != IW_MODE_INFRA &&
 	    ieee->reset_port && ieee->reset_port(dev)) {
 		IEEE80211_DEBUG_WX("%s: reset_port failed\n", dev->name);
diff --git a/drivers/staging/rtl8187se/r8180_dm.c b/drivers/staging/rtl8187se/r8180_dm.c
index 980bafd..2ccd2cb 100644
--- a/drivers/staging/rtl8187se/r8180_dm.c
+++ b/drivers/staging/rtl8187se/r8180_dm.c
@@ -665,7 +665,7 @@  static void StaRateAdaptive87SE(struct net_device *dev)
 	}
 
 	if (bTryUp && bTryDown)
-	printk("StaRateAdaptive87B(): Tx Rate tried upping and downing simultaneously!\n");
+		printk("StaRateAdaptive87B(): Tx Rate tried upping and downing simultaneously!\n");
 
 	/* 1 Test Upgrading Tx Rate
 	 * Sometimes the cause of the low throughput (high retry rate) is the compatibility between the AP and NIC.
diff --git a/drivers/staging/rtl8187se/r8180_wx.c b/drivers/staging/rtl8187se/r8180_wx.c
index 098e368..4e01653 100644
--- a/drivers/staging/rtl8187se/r8180_wx.c
+++ b/drivers/staging/rtl8187se/r8180_wx.c
@@ -1147,12 +1147,12 @@  static int r8180_wx_set_gen_ie(struct net_device *dev,
 	if (priv->ieee80211->bHwRadioOff)
 		return 0;
 
-		down(&priv->wx_sem);
+	down(&priv->wx_sem);
 #if 1
-		ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, wrqu->data.length);
+	ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, wrqu->data.length);
 #endif
-		up(&priv->wx_sem);
-		return ret;
+	up(&priv->wx_sem);
+	return ret;
 
 
 }