diff mbox

[12/13] rtlwifi: btcoex: 21a 1ant: fix some coding style issues

Message ID 20170417000700.29057-13-Larry.Finger@lwfinger.net (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Larry Finger April 17, 2017, 12:06 a.m. UTC
From: Yan-Hsuan Chuang <yhchuang@realtek.com>

Fix alignment for coding style consistency.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Pkshih <pkshih@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
---
 .../wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Joe Perches April 17, 2017, 4:09 p.m. UTC | #1
On Sun, 2017-04-16 at 19:06 -0500, Larry Finger wrote:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> 
> Fix alignment for coding style consistency.

aside:

Are all the btcoexist variants for this code identical?

8192e2ant.c 8723b1ant.c 8723b2ant.c 8821a1ant.c 8821a2ant.c

Maybe some of these functions should be centralized.
Larry Finger April 17, 2017, 5:13 p.m. UTC | #2
On 04/17/2017 11:09 AM, Joe Perches wrote:
> On Sun, 2017-04-16 at 19:06 -0500, Larry Finger wrote:
>> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>>
>> Fix alignment for coding style consistency.
>
> aside:
>
> Are all the btcoexist variants for this code identical?
>
> 8192e2ant.c 8723b1ant.c 8723b2ant.c 8821a1ant.c 8821a2ant.c
>
> Maybe some of these functions should be centralized.

They are not identical, but some of the functions could certainly be centralized.

The problem is that the btcoex software at Realtek is multi platform, and 
written by a group that has not been too eager to implement this kind of 
suggestion. If we were to force the issue, then the maintenance load on the 
separate Linux group at Realtek would be greatly increased. This current set of 
updates has already been delayed for at least two years while they found the 
resources to be able to adhere to the "small change" policy of Linux. For that 
reason alone, I would not be in favor of forcing the issue.

Larry
Joe Perches April 17, 2017, 5:28 p.m. UTC | #3
On Mon, 2017-04-17 at 12:13 -0500, Larry Finger wrote:
> On 04/17/2017 11:09 AM, Joe Perches wrote:
> > On Sun, 2017-04-16 at 19:06 -0500, Larry Finger wrote:
> > > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> > > 
> > > Fix alignment for coding style consistency.
> > 
> > aside:
> > 
> > Are all the btcoexist variants for this code identical?
> > 
> > 8192e2ant.c 8723b1ant.c 8723b2ant.c 8821a1ant.c 8821a2ant.c
> > 
> > Maybe some of these functions should be centralized.
> 
> They are not identical, but some of the functions could certainly be centralized.

I was writing specifically about functions not modules.

> The problem is that the btcoex software at Realtek is multi platform, and 
> written by a group that has not been too eager to implement this kind of 
> suggestion. If we were to force the issue, then the maintenance load on the 
> separate Linux group at Realtek would be greatly increased. This current set of 
> updates has already been delayed for at least two years while they found the 
> resources to be able to adhere to the "small change" policy of Linux. For that 
> reason alone, I would not be in favor of forcing the issue.

No worries, it just looked pretty mindless to copy/paste
relatively large blocks of code and then do trivial
whitespace fixes to them individually and separately.
diff mbox

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
index 7d91d82e37fe..8022779004fb 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
@@ -2839,14 +2839,14 @@  void ex_btc8821a1ant_bt_info_notify(struct btc_coexist *btcoexist,
 	}
 
 	if (BT_INFO_SRC_8821A_1ANT_WIFI_FW != rsp_source) {
-		coex_sta->bt_retry_cnt =	/* [3:0]*/
-			coex_sta->bt_info_c2h[rsp_source][2]&0xf;
+		/* [3:0] */
+		coex_sta->bt_retry_cnt =
+			coex_sta->bt_info_c2h[rsp_source][2] & 0xf;
 
 		coex_sta->bt_rssi =
-			coex_sta->bt_info_c2h[rsp_source][3]*2+10;
+			coex_sta->bt_info_c2h[rsp_source][3] * 2 + 10;
 
-		coex_sta->bt_info_ext =
-			coex_sta->bt_info_c2h[rsp_source][4];
+		coex_sta->bt_info_ext = coex_sta->bt_info_c2h[rsp_source][4];
 
 		/* Here we need to resend some wifi info to BT
 		 * because bt is reset and lost the info
@@ -2928,11 +2928,11 @@  void ex_btc8821a1ant_bt_info_notify(struct btc_coexist *btcoexist,
 		RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
 			 "[BTCoex], BtInfoNotify(), BT Connected-idle!!!\n");
 	} else if ((bt_info&BT_INFO_8821A_1ANT_B_SCO_ESCO) ||
-		(bt_info&BT_INFO_8821A_1ANT_B_SCO_BUSY)) {
+		(bt_info & BT_INFO_8821A_1ANT_B_SCO_BUSY)) {
 		coex_dm->bt_status = BT_8821A_1ANT_BT_STATUS_SCO_BUSY;
 		RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
 			 "[BTCoex], BtInfoNotify(), BT SCO busy!!!\n");
-	} else if (bt_info&BT_INFO_8821A_1ANT_B_ACL_BUSY) {
+	} else if (bt_info & BT_INFO_8821A_1ANT_B_ACL_BUSY) {
 		if (BT_8821A_1ANT_BT_STATUS_ACL_BUSY != coex_dm->bt_status)
 			coex_dm->auto_tdma_adjust = false;
 		coex_dm->bt_status = BT_8821A_1ANT_BT_STATUS_ACL_BUSY;