From: An Ha <zero579911@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
An Ha <zero579911@gmail.com>
Subject: [PATCH 4/5] Staging: rtl8821ae: hal_bt_coexist: fix curly brace placement
Date: Tue, 2 Sep 2014 21:00:45 -0400 [thread overview]
Message-ID: <1409706046-23616-4-git-send-email-zero579911@gmail.com> (raw)
In-Reply-To: <1409706046-23616-1-git-send-email-zero579911@gmail.com>
Fix coding style issue where the if statement unnecessarily uses curly
braces for one line statements and where the else conditional statement
should follow the closing curly brace '}'. Also, the open curly brace
'{' should be on the same line as the if statement.
Signed-off-by: An Ha <zero579911@gmail.com>
---
.../staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c b/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
index 13cc5ba..d587072 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hal_bt_coexist.c
@@ -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;
@@ -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,
@@ -254,8 +251,7 @@ u8 rtl8821ae_dm_bt_check_coex_rssi_state(struct ieee80211_hw *hw,
("[DM][BT], RSSI state stay at High\n"));
}
}
- }
- else if (level_num == 3) {
+ } else if (level_num == 3) {
if (rssi_thresh > rssi_thresh1) {
RT_TRACE(COMP_BT_COEXIST, DBG_TRACE,
("[DM][BT], RSSI thresh error!!\n"));
@@ -292,8 +288,7 @@ u8 rtl8821ae_dm_bt_check_coex_rssi_state(struct ieee80211_hw *hw,
&= ~BT_COEX_STATE_WIFI_RSSI_MEDIUM;
RT_TRACE(COMP_BT_COEXIST, DBG_TRACE,
("[DM][BT], RSSI state switch to High\n"));
- } else if (undecoratedsmoothed_pwdb < rssi_thresh)
- {
+ } else if (undecoratedsmoothed_pwdb < rssi_thresh) {
bt_rssi_state = BT_RSSI_STATE_LOW;
rtlpcipriv->btcoexist.current_state
|= BT_COEX_STATE_WIFI_RSSI_LOW;
--
2.1.0
next prev parent reply other threads:[~2014-09-03 1:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 1:00 [PATCH 1/5] Staging: rtl8821ae: hal_bt_coexist: fix commenting style An Ha
2014-09-03 1:00 ` [PATCH 2/5] Staging: rtl8821ae: hal_bt_coexist: add/remove spaces An Ha
2014-09-03 1:00 ` [PATCH 3/5] Staging: rtl8821ae: hal_bt_coexist: fix pointer placement coding style issue An Ha
2014-09-03 1:00 ` An Ha [this message]
2014-09-03 1:00 ` [PATCH 5/5] Staging: rtl8821ae: hal_bt_coexist: add a blank newline An Ha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409706046-23616-4-git-send-email-zero579911@gmail.com \
--to=zero579911@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox