Re: [PATCH] Staging: rtl8821ae: hal_bt_coexist: fix coding style issue

2014-08-30 Thread Greg KH
On Sat, Aug 30, 2014 at 02:10:52PM -0400, An Ha wrote:
> Fix coding style issues, these changes include:
> -Add space between "if" and brackets
> -Add space after comma in an argument
> -Add space between equal sign to separate the variable and the assignment
> -Remove unnecessary curly braces around one-line if statements
> -Remove unnecessary whitespace between two brackets
> -Remove unnecessary whitespace before newline
> -Join else-if statement onto same line as end curly brace
> -Join open curly brace onto same line as if statement
> -Use "foo *" instead of "foo*" for the pointer placement
> -Switch commenting style from C99 comments to C89 comments
> 
> Signed-off-by: An Ha 

That's a lot of different things all to be doing in one single patch.
Please break this up into "one thing at a time per patch" so that it is
reviewable and readable.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: rtl8821ae: hal_bt_coexist: fix coding style issue

2014-08-30 Thread An Ha
Fix coding style issues, these changes include:
-Add space between "if" and brackets
-Add space after comma in an argument
-Add space between equal sign to separate the variable and the assignment
-Remove unnecessary curly braces around one-line if statements
-Remove unnecessary whitespace between two brackets
-Remove unnecessary whitespace before newline
-Join else-if statement onto same line as end curly brace
-Join open curly brace onto same line as if statement
-Use "foo *" instead of "foo*" for the pointer placement
-Switch commenting style from C99 comments to C89 comments

Signed-off-by: An Ha 
---
 .../staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c   | 102 ++---
 1 file changed, 49 insertions(+), 53 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c 
b/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
index 8bee772..293bf9d 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
@@ -43,13 +43,13 @@ void rtl8821ae_dm_bt_reject_ap_aggregated_packet(struct 
ieee80211_hw *hw, bool b
struct rtl_priv rtlpriv = rtl_priv(hw);
PRX_TS_RECORD   pRxTs = NULL;
 
-   if(b_reject){
-   // Do not allow receiving A-MPDU aggregation.
+   if (b_reject) {
+   /* Do not allow receiving A-MPDU aggregation. */
if (rtlpriv->mac80211.vendor == PEER_CISCO) {
if (pHTInfo->bAcceptAddbaReq) {
-   RTPRINT(FBT, BT_TRACE, ("BT_Disallow 
AMPDU \n"));
+   RTPRINT(FBT, BT_TRACE, ("BT_Disallow 
AMPDU\n"));
pHTInfo->bAcceptAddbaReq = FALSE;
-   if(GetTs(Adapter, 
(PTS_COMMON_INFO*)(), pMgntInfo->Bssid, 0, RX_DIR, FALSE))
+   if (GetTs(Adapter, (PTS_COMMON_INFO 
*)(), pMgntInfo->Bssid, 0, RX_DIR, FALSE))
TsInitDelBA(Adapter, 
(PTS_COMMON_INFO)pRxTs, RX_DIR);
}
} else {
@@ -59,9 +59,9 @@ void rtl8821ae_dm_bt_reject_ap_aggregated_packet(struct 
ieee80211_hw *hw, bool b
}
}
} else {
-   if(rtlpriv->mac80211.vendor == PEER_CISCO) {
+   if (rtlpriv->mac80211.vendor == PEER_CISCO) {
if (!pHTInfo->bAcceptAddbaReq) {
-   RTPRINT(FBT, BT_TRACE, ("BT_Allow AMPDU 
\n"));
+   RTPRINT(FBT, BT_TRACE, ("BT_Allow 
AMPDU\n"));
pHTInfo->bAcceptAddbaReq = TRUE;
}
}
@@ -78,17 +78,15 @@ struct rtl_phy *rtlphy = &(rtlpriv->phy);
 if (rtlpriv->link_info.b_busytraffic) {
rtlpcipriv->btcoexist.current_state &= ~BT_COEX_STATE_WIFI_IDLE;
 
-   if(rtlpriv->link_info.b_tx_busy_traffic) {
+   if (rtlpriv->link_info.b_tx_busy_traffic)
rtlpcipriv->btcoexist.current_state |= 
BT_COEX_STATE_WIFI_UPLINK;
-   } else {
+   else
rtlpcipriv->btcoexist.current_state &= 
~BT_COEX_STATE_WIFI_UPLINK;
-   }
 
-   if(rtlpriv->link_info.b_rx_busy_traffic) {
+   if (rtlpriv->link_info.b_rx_busy_traffic)
rtlpcipriv->btcoexist.current_state |= 
BT_COEX_STATE_WIFI_DOWNLINK;
-   } else {
+   else
rtlpcipriv->btcoexist.current_state &= 
~BT_COEX_STATE_WIFI_DOWNLINK;
-   }
 } else {
rtlpcipriv->btcoexist.current_state |= BT_COEX_STATE_WIFI_IDLE;
rtlpcipriv->btcoexist.current_state &= ~BT_COEX_STATE_WIFI_UPLINK;
@@ -102,7 +100,7 @@ if (rtlpriv->mac80211.mode == WIRELESS_MODE_G
rtlpcipriv->btcoexist.current_state &= ~BT_COEX_STATE_WIFI_HT40;
 } else {
rtlpcipriv->btcoexist.current_state &= ~BT_COEX_STATE_WIFI_LEGACY;
-   if(rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
+   if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
rtlpcipriv->btcoexist.current_state |= BT_COEX_STATE_WIFI_HT40;
rtlpcipriv->btcoexist.current_state &= ~BT_COEX_STATE_WIFI_HT20;
} else {
@@ -111,12 +109,11 @@ if (rtlpriv->mac80211.mode == WIRELESS_MODE_G
}
 }
 
-if (bt_operation_on) {
+if (bt_operation_on)
rtlpcipriv->btcoexist.current_state |= BT_COEX_STATE_BT30;
-} else {
+else
rtlpcipriv->btcoexist.current_state &= ~BT_COEX_STATE_BT30;
 }
-}
 
 
 u8 rtl8821ae_dm_bt_check_coex_rssi_state1(struct ieee80211_hw *hw,
@@ -130,12 +127,12 @@ u8 rtl8821ae_dm_bt_check_coex_rssi_state1(struct 
ieee80211_hw *hw,
 
undecoratedsmoothed_pwdb =  rtl8821ae_dm_bt_get_rx_ss(hw);
 
-   if(level_num == 2) {
+   if (level_num == 2) {
rtlpcipriv->btcoexist.current_state 

[PATCH] Staging: rtl8821ae: hal_bt_coexist: fix coding style issue

2014-08-30 Thread An Ha
Fix coding style issues, these changes include:
-Add space between if and brackets
-Add space after comma in an argument
-Add space between equal sign to separate the variable and the assignment
-Remove unnecessary curly braces around one-line if statements
-Remove unnecessary whitespace between two brackets
-Remove unnecessary whitespace before newline
-Join else-if statement onto same line as end curly brace
-Join open curly brace onto same line as if statement
-Use foo * instead of foo* for the pointer placement
-Switch commenting style from C99 comments to C89 comments

Signed-off-by: An Ha zero579...@gmail.com
---
 .../staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c   | 102 ++---
 1 file changed, 49 insertions(+), 53 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c 
b/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
index 8bee772..293bf9d 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
@@ -43,13 +43,13 @@ void rtl8821ae_dm_bt_reject_ap_aggregated_packet(struct 
ieee80211_hw *hw, bool b
struct rtl_priv rtlpriv = rtl_priv(hw);
PRX_TS_RECORD   pRxTs = NULL;
 
-   if(b_reject){
-   // Do not allow receiving A-MPDU aggregation.
+   if (b_reject) {
+   /* Do not allow receiving A-MPDU aggregation. */
if (rtlpriv-mac80211.vendor == PEER_CISCO) {
if (pHTInfo-bAcceptAddbaReq) {
-   RTPRINT(FBT, BT_TRACE, (BT_Disallow 
AMPDU \n));
+   RTPRINT(FBT, BT_TRACE, (BT_Disallow 
AMPDU\n));
pHTInfo-bAcceptAddbaReq = FALSE;
-   if(GetTs(Adapter, 
(PTS_COMMON_INFO*)(pRxTs), pMgntInfo-Bssid, 0, RX_DIR, FALSE))
+   if (GetTs(Adapter, (PTS_COMMON_INFO 
*)(pRxTs), pMgntInfo-Bssid, 0, RX_DIR, FALSE))
TsInitDelBA(Adapter, 
(PTS_COMMON_INFO)pRxTs, RX_DIR);
}
} else {
@@ -59,9 +59,9 @@ void rtl8821ae_dm_bt_reject_ap_aggregated_packet(struct 
ieee80211_hw *hw, bool b
}
}
} else {
-   if(rtlpriv-mac80211.vendor == PEER_CISCO) {
+   if (rtlpriv-mac80211.vendor == PEER_CISCO) {
if (!pHTInfo-bAcceptAddbaReq) {
-   RTPRINT(FBT, BT_TRACE, (BT_Allow AMPDU 
\n));
+   RTPRINT(FBT, BT_TRACE, (BT_Allow 
AMPDU\n));
pHTInfo-bAcceptAddbaReq = TRUE;
}
}
@@ -78,17 +78,15 @@ struct rtl_phy *rtlphy = (rtlpriv-phy);
 if (rtlpriv-link_info.b_busytraffic) {
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_IDLE;
 
-   if(rtlpriv-link_info.b_tx_busy_traffic) {
+   if (rtlpriv-link_info.b_tx_busy_traffic)
rtlpcipriv-btcoexist.current_state |= 
BT_COEX_STATE_WIFI_UPLINK;
-   } else {
+   else
rtlpcipriv-btcoexist.current_state = 
~BT_COEX_STATE_WIFI_UPLINK;
-   }
 
-   if(rtlpriv-link_info.b_rx_busy_traffic) {
+   if (rtlpriv-link_info.b_rx_busy_traffic)
rtlpcipriv-btcoexist.current_state |= 
BT_COEX_STATE_WIFI_DOWNLINK;
-   } else {
+   else
rtlpcipriv-btcoexist.current_state = 
~BT_COEX_STATE_WIFI_DOWNLINK;
-   }
 } else {
rtlpcipriv-btcoexist.current_state |= BT_COEX_STATE_WIFI_IDLE;
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_UPLINK;
@@ -102,7 +100,7 @@ if (rtlpriv-mac80211.mode == WIRELESS_MODE_G
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_HT40;
 } else {
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_LEGACY;
-   if(rtlphy-current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
+   if (rtlphy-current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
rtlpcipriv-btcoexist.current_state |= BT_COEX_STATE_WIFI_HT40;
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_WIFI_HT20;
} else {
@@ -111,12 +109,11 @@ if (rtlpriv-mac80211.mode == WIRELESS_MODE_G
}
 }
 
-if (bt_operation_on) {
+if (bt_operation_on)
rtlpcipriv-btcoexist.current_state |= BT_COEX_STATE_BT30;
-} else {
+else
rtlpcipriv-btcoexist.current_state = ~BT_COEX_STATE_BT30;
 }
-}
 
 
 u8 rtl8821ae_dm_bt_check_coex_rssi_state1(struct ieee80211_hw *hw,
@@ -130,12 +127,12 @@ u8 rtl8821ae_dm_bt_check_coex_rssi_state1(struct 
ieee80211_hw *hw,
 
undecoratedsmoothed_pwdb =  rtl8821ae_dm_bt_get_rx_ss(hw);
 
-   if(level_num == 2) {
+   if (level_num == 2) {
rtlpcipriv-btcoexist.current_state = 

Re: [PATCH] Staging: rtl8821ae: hal_bt_coexist: fix coding style issue

2014-08-30 Thread Greg KH
On Sat, Aug 30, 2014 at 02:10:52PM -0400, An Ha wrote:
 Fix coding style issues, these changes include:
 -Add space between if and brackets
 -Add space after comma in an argument
 -Add space between equal sign to separate the variable and the assignment
 -Remove unnecessary curly braces around one-line if statements
 -Remove unnecessary whitespace between two brackets
 -Remove unnecessary whitespace before newline
 -Join else-if statement onto same line as end curly brace
 -Join open curly brace onto same line as if statement
 -Use foo * instead of foo* for the pointer placement
 -Switch commenting style from C99 comments to C89 comments
 
 Signed-off-by: An Ha zero579...@gmail.com

That's a lot of different things all to be doing in one single patch.
Please break this up into one thing at a time per patch so that it is
reviewable and readable.

thanks,

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/