Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2194378ybb; Sat, 21 Mar 2020 15:25:23 -0700 (PDT) X-Google-Smtp-Source: ADFU+vulkk6szFPqc2t40ErLO2yAgs2YCF9Hl6Nh7UlQZrbXtk05a4NQr2SPo1ihtD7NLOzwvZzF X-Received: by 2002:a05:6808:151:: with SMTP id h17mr10419567oie.131.1584829523072; Sat, 21 Mar 2020 15:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584829523; cv=none; d=google.com; s=arc-20160816; b=YHU203iwFUuoF8BxReYDfFJkjpZiGtdOwDGP5fQ/7KGQzPcpHB0JqpznBQqKYAlztJ 8JW/LhTV9wDBmINr7v5b1UeELgD/PKZS0hZGUzNm9WuAt7JxShjuzKPfG5gQ66FPkNCI 6cUiLcdM1STE/BNeTQXUq3+pIOxxIgT252znM06sS/pErJkUFmv+h+Frc341SMZ0rhFn CavmnwLKEHRCw3NChMHMGhsAM+NFFIohyymjj02Sxv62ZOs7d6NgzWMuBx9xk3JoZCuT 3WhQ2FD8/8ewHIHpCj8xouUtKVyoMJgy7M6R9uI3pFLQJ9ahyfBe9XeegrCNQA4DTI8r yxcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=UUW8XP/KDrV3Nf5I8So1L9B3/7J7B+exBPy8n5BY8u4=; b=Nv7+e9pUHQuQQKLvEKhdOBzi9HNnCskrYaIgAGwD9b5y8KxNUqmWD3OdJq4jhCmuXv qSzWi5xSK+2UDW8n/lKsHtNZ0Y0ECVuI9rcGQFUOOwGIGx61l0ZxBF9lWfYUoNsh4Ugu cCIg9qt/pzOVoRxahbC51l49H96tTV8NQiPD/N17a1307KPieH7VhgO0Izl4eGISetfv /f52THdPuBtMSBDa6yvK/eUTtPieASvYTtlFMiy6EeYN7R+dtp+b3rmJEBYSloQ0emuM IZWsibMNGWXryIGebwTRln34hQU+4/ZWOVYacXyFi13A1NhHvY0T9ZbbUgZkteX8/Jng ahrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="KKbY/PI7"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x188si4956495oig.140.2020.03.21.15.25.11; Sat, 21 Mar 2020 15:25:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="KKbY/PI7"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728080AbgCUWY2 (ORCPT + 99 others); Sat, 21 Mar 2020 18:24:28 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46341 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727258AbgCUWY1 (ORCPT ); Sat, 21 Mar 2020 18:24:27 -0400 Received: by mail-pg1-f193.google.com with SMTP id k191so3897819pgc.13 for ; Sat, 21 Mar 2020 15:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UUW8XP/KDrV3Nf5I8So1L9B3/7J7B+exBPy8n5BY8u4=; b=KKbY/PI7v1SVgnHytnL/fZjEuA1iRGJTZUjH44NdpTrgrRAhCiimFvq1dIyeJQFaln zDULdVJ47kF0GhQ7ZKtA5+ohF3v4ekLZ+EFQgfy3nL9hh38sWaZBPSBUymZwrS3lvIRH S+0lo//+epgOo/q7WC/oczR/hcnG7Eczp4Et/xwNzbNndNadJ1Ii5qbFmNXtITEzHlEB S8ZCPXizJA+m8kD0DHsbo15A/Rfhph2qNzPlZGGJhO3QJfxYPcglwQ6ztRfMsjfZLpjJ iQ+gPe+AChgdaCbgQsWCAfMloIY4/lmcvuNzfpC6JEcpSHSkWADe5W5Hb68G/wkoYxHn afzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UUW8XP/KDrV3Nf5I8So1L9B3/7J7B+exBPy8n5BY8u4=; b=aN6N+tWTU99s4ab8kLumu6V0fQUHVjDaXqBV6sBwP6z18A/HEee05hQEUgHK2cXTvh bFETUMt3hZfVg/fvQl4SKxhvS8seN9FUdq1O3tkEgl7+NC5HPTw99xH6maLh66TMHYYH ON+t+GEAT2TStr+qPlZ0uCPL+PBeQ3LbC6t03kjAKWDrv7jbSjxQBbN4V0U/F2LWknzQ WuP4I2VyrAN4iJ30pJ55ofd+EMOUHDiADL26upZeTRJev2jHu9BZVKEUtz+M7wYwlc0d BxXMvxajui7v4xHq252ZqMvUiRe5psKSN4tc+w+fqxk1+igdru16J7rUXgA7ub48vBfM 956g== X-Gm-Message-State: ANhLgQ3U3K8e3SV8FgUccScBf6iq8uDokxYnGUGyPZAbv9V2vM+gcOhO SCvJeopzXkuRDXRI5fn3MtU= X-Received: by 2002:a63:ec12:: with SMTP id j18mr14511541pgh.137.1584829466536; Sat, 21 Mar 2020 15:24:26 -0700 (PDT) Received: from localhost.localdomain ([113.193.33.115]) by smtp.gmail.com with ESMTPSA id y123sm9044088pfb.13.2020.03.21.15.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 15:24:26 -0700 (PDT) From: Shreeya Patel To: Larry.Finger@lwfinger.net, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Cc: Shreeya Patel Subject: [Outreachy kernel] [PATCH 04/11] Staging: rtl8188eu: phy: Add space around operators Date: Sun, 22 Mar 2020 03:54:20 +0530 Message-Id: <9ae02593b7645c9b1b5fa4fb86623466fa70ef19.1584826154.git.shreeya.patel23498@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add space around operators for improving the code readability. Reported by checkpatch.pl git diff -w shows no difference. diff of the .o files before and after the changes shows no difference. Signed-off-by: Shreeya Patel --- shreeya@Shreeya-Patel:~git/kernels/staging$ git diff -w drivers/staging/rtl8188eu/hal/phy.c shreeya@Shreeya-Patel:~git/kernels/staging$ shreeya@Shreeya-Patel:~git/kernels/staging/drivers/staging/rtl8188eu/hal$ diff phy_old.o phy.o shreeya@Shreeya-Patel:~git/kernels/staging/drivers/staging/rtl8188eu/hal$ drivers/staging/rtl8188eu/hal/phy.c | 138 ++++++++++++++-------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index afaf9e55195a..b9025815b682 100644 --- a/drivers/staging/rtl8188eu/hal/phy.c +++ b/drivers/staging/rtl8188eu/hal/phy.c @@ -69,10 +69,10 @@ static u32 rf_serial_read(struct adapter *adapt, bMaskDWord); tmplong2 = (tmplong2 & (~bLSSIReadAddress)) | - (offset<<23) | bLSSIReadEdge; + (offset << 23) | bLSSIReadEdge; phy_set_bb_reg(adapt, rFPGA0_XA_HSSIParameter2, bMaskDWord, - tmplong&(~bLSSIReadEdge)); + tmplong & (~bLSSIReadEdge)); udelay(10); phy_set_bb_reg(adapt, phyreg->rfHSSIPara2, bMaskDWord, tmplong2); @@ -102,7 +102,7 @@ static void rf_serial_write(struct adapter *adapt, struct bb_reg_def *phyreg = &adapt->HalData->PHYRegDef[rfpath]; offset &= 0xff; - data_and_addr = ((offset<<20) | (data&0x000fffff)) & 0x0fffffff; + data_and_addr = ((offset << 20) | (data & 0x000fffff)) & 0x0fffffff; phy_set_bb_reg(adapt, phyreg->rf3wireOffset, bMaskDWord, data_and_addr); } @@ -143,20 +143,20 @@ static void get_tx_power_index(struct adapter *adapt, u8 channel, u8 *cck_pwr, for (TxCount = 0; TxCount < path_nums; TxCount++) { if (TxCount == RF_PATH_A) { cck_pwr[TxCount] = hal_data->Index24G_CCK_Base[TxCount][index]; - ofdm_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+ + ofdm_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index] + hal_data->OFDM_24G_Diff[TxCount][RF_PATH_A]; - bw20_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+ + bw20_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index] + hal_data->BW20_24G_Diff[TxCount][RF_PATH_A]; bw40_pwr[TxCount] = hal_data->Index24G_BW40_Base[TxCount][index]; } else if (TxCount == RF_PATH_B) { cck_pwr[TxCount] = hal_data->Index24G_CCK_Base[TxCount][index]; - ofdm_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+ - hal_data->BW20_24G_Diff[RF_PATH_A][index]+ + ofdm_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index] + + hal_data->BW20_24G_Diff[RF_PATH_A][index] + hal_data->BW20_24G_Diff[TxCount][index]; - bw20_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index]+ - hal_data->BW20_24G_Diff[TxCount][RF_PATH_A]+ + bw20_pwr[TxCount] = hal_data->Index24G_BW40_Base[RF_PATH_A][index] + + hal_data->BW20_24G_Diff[TxCount][RF_PATH_A] + hal_data->BW20_24G_Diff[TxCount][index]; bw40_pwr[TxCount] = hal_data->Index24G_BW40_Base[TxCount][index]; } @@ -205,7 +205,7 @@ static void phy_set_bw_mode_callback(struct adapter *adapt) /* Set MAC register */ reg_bw_opmode = usb_read8(adapt, REG_BWOPMODE); - reg_prsr_rsc = usb_read8(adapt, REG_RRSR+2); + reg_prsr_rsc = usb_read8(adapt, REG_RRSR + 2); switch (hal_data->CurrentChannelBW) { case HT_CHANNEL_WIDTH_20: @@ -215,9 +215,9 @@ static void phy_set_bw_mode_callback(struct adapter *adapt) case HT_CHANNEL_WIDTH_40: reg_bw_opmode &= ~BW_OPMODE_20MHZ; usb_write8(adapt, REG_BWOPMODE, reg_bw_opmode); - reg_prsr_rsc = (reg_prsr_rsc&0x90) | - (hal_data->nCur40MhzPrimeSC<<5); - usb_write8(adapt, REG_RRSR+2, reg_prsr_rsc); + reg_prsr_rsc = (reg_prsr_rsc & 0x90) | + (hal_data->nCur40MhzPrimeSC << 5); + usb_write8(adapt, REG_RRSR + 2, reg_prsr_rsc); break; default: break; @@ -236,7 +236,7 @@ static void phy_set_bw_mode_callback(struct adapter *adapt) * These settings are required only for 40MHz */ phy_set_bb_reg(adapt, rCCK0_System, bCCKSideBand, - (hal_data->nCur40MhzPrimeSC>>1)); + (hal_data->nCur40MhzPrimeSC >> 1)); phy_set_bb_reg(adapt, rOFDM1_LSTF, 0xC00, hal_data->nCur40MhzPrimeSC); phy_set_bb_reg(adapt, 0x818, (BIT(26) | BIT(27)), @@ -337,8 +337,8 @@ void rtl88eu_dm_txpower_track_adjust(struct odm_dm_struct *dm_odm, u8 type, if (pwr_value >= ODM_TXPWRTRACK_MAX_IDX_88E && *direction == 1) pwr_value = ODM_TXPWRTRACK_MAX_IDX_88E; - *out_write_val = pwr_value | (pwr_value<<8) | (pwr_value<<16) | - (pwr_value<<24); + *out_write_val = pwr_value | (pwr_value << 8) | (pwr_value << 16) | + (pwr_value << 24); } static void dm_txpwr_track_setpwr(struct odm_dm_struct *dm_odm) @@ -389,9 +389,9 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt) if (thermal_val) { /* Query OFDM path A default setting */ - ele_d = phy_query_bb_reg(adapt, rOFDM0_XATxIQImbalance, bMaskDWord)&bMaskOFDM_D; + ele_d = phy_query_bb_reg(adapt, rOFDM0_XATxIQImbalance, bMaskDWord) & bMaskOFDM_D; for (i = 0; i < OFDM_TABLE_SIZE_92D; i++) { - if (ele_d == (OFDMSwingTable[i]&bMaskOFDM_D)) { + if (ele_d == (OFDMSwingTable[i] & bMaskOFDM_D)) { ofdm_index_old[0] = (u8)i; dm_odm->BbSwingIdxOfdmBase = (u8)i; break; @@ -472,18 +472,18 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt) } } if (offset >= index_mapping_NUM_88E) - offset = index_mapping_NUM_88E-1; + offset = index_mapping_NUM_88E - 1; /* Updating ofdm_index values with new OFDM / CCK offset */ ofdm_index[0] = dm_odm->RFCalibrateInfo.OFDM_index[0] + ofdm_index_mapping[j][offset]; - if (ofdm_index[0] > OFDM_TABLE_SIZE_92D-1) - ofdm_index[0] = OFDM_TABLE_SIZE_92D-1; + if (ofdm_index[0] > OFDM_TABLE_SIZE_92D - 1) + ofdm_index[0] = OFDM_TABLE_SIZE_92D - 1; else if (ofdm_index[0] < ofdm_min_index) ofdm_index[0] = ofdm_min_index; cck_index = dm_odm->RFCalibrateInfo.CCK_index + ofdm_index_mapping[j][offset]; - if (cck_index > CCK_TABLE_SIZE-1) - cck_index = CCK_TABLE_SIZE-1; + if (cck_index > CCK_TABLE_SIZE - 1) + cck_index = CCK_TABLE_SIZE - 1; else if (cck_index < 0) cck_index = 0; @@ -548,8 +548,8 @@ static u8 phy_path_a_iqk(struct adapter *adapt, bool config_pathb) reg_e9c = phy_query_bb_reg(adapt, rTx_Power_After_IQK_A, bMaskDWord); if (!(reg_eac & BIT(28)) && - (((reg_e94 & 0x03FF0000)>>16) != 0x142) && - (((reg_e9c & 0x03FF0000)>>16) != 0x42)) + (((reg_e94 & 0x03FF0000) >> 16) != 0x142) && + (((reg_e9c & 0x03FF0000) >> 16) != 0x42)) result |= 0x01; return result; } @@ -600,13 +600,13 @@ static u8 phy_path_a_rx_iqk(struct adapter *adapt, bool configPathB) reg_e9c = phy_query_bb_reg(adapt, rTx_Power_After_IQK_A, bMaskDWord); if (!(reg_eac & BIT(28)) && - (((reg_e94 & 0x03FF0000)>>16) != 0x142) && - (((reg_e9c & 0x03FF0000)>>16) != 0x42)) + (((reg_e94 & 0x03FF0000) >> 16) != 0x142) && + (((reg_e9c & 0x03FF0000) >> 16) != 0x42)) result |= 0x01; else /* if Tx not OK, ignore Rx */ return result; - u4tmp = 0x80007C00 | (reg_e94&0x3FF0000) | ((reg_e9c&0x3FF0000) >> 16); + u4tmp = 0x80007C00 | (reg_e94 & 0x3FF0000) | ((reg_e9c & 0x3FF0000) >> 16); phy_set_bb_reg(adapt, rTx_IQK, bMaskDWord, u4tmp); /* 1 RX IQK */ @@ -648,8 +648,8 @@ static u8 phy_path_a_rx_iqk(struct adapter *adapt, bool configPathB) phy_set_rf_reg(adapt, RF_PATH_A, 0xdf, bRFRegOffsetMask, 0x180); if (!(reg_eac & BIT(27)) && /* if Tx is OK, check whether Rx is OK */ - (((reg_ea4 & 0x03FF0000)>>16) != 0x132) && - (((reg_eac & 0x03FF0000)>>16) != 0x36)) + (((reg_ea4 & 0x03FF0000) >> 16) != 0x132) && + (((reg_eac & 0x03FF0000) >> 16) != 0x36)) result |= 0x02; else ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, @@ -677,15 +677,15 @@ static u8 phy_path_b_iqk(struct adapter *adapt) regecc = phy_query_bb_reg(adapt, rRx_Power_After_IQK_B_2, bMaskDWord); if (!(regeac & BIT(31)) && - (((regeb4 & 0x03FF0000)>>16) != 0x142) && - (((regebc & 0x03FF0000)>>16) != 0x42)) + (((regeb4 & 0x03FF0000) >> 16) != 0x142) && + (((regebc & 0x03FF0000) >> 16) != 0x42)) result |= 0x01; else return result; if (!(regeac & BIT(30)) && - (((regec4 & 0x03FF0000)>>16) != 0x132) && - (((regecc & 0x03FF0000)>>16) != 0x36)) + (((regec4 & 0x03FF0000) >> 16) != 0x132) && + (((regecc & 0x03FF0000) >> 16) != 0x36)) result |= 0x02; else ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, @@ -711,7 +711,7 @@ static void patha_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], tx0_a = (x * oldval_0) >> 8; phy_set_bb_reg(adapt, rOFDM0_XATxIQImbalance, 0x3FF, tx0_a); phy_set_bb_reg(adapt, rOFDM0_ECCAThreshold, BIT(31), - ((x * oldval_0>>7) & 0x1)); + ((x * oldval_0 >> 7) & 0x1)); y = result[final_candidate][1]; if ((y & 0x00000200) != 0) @@ -719,11 +719,11 @@ static void patha_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], tx0_c = (y * oldval_0) >> 8; phy_set_bb_reg(adapt, rOFDM0_XCTxAFE, 0xF0000000, - ((tx0_c&0x3C0)>>6)); + ((tx0_c & 0x3C0) >> 6)); phy_set_bb_reg(adapt, rOFDM0_XATxIQImbalance, 0x003F0000, - (tx0_c&0x3F)); + (tx0_c & 0x3F)); phy_set_bb_reg(adapt, rOFDM0_ECCAThreshold, BIT(29), - ((y * oldval_0>>7) & 0x1)); + ((y * oldval_0 >> 7) & 0x1)); if (txonly) return; @@ -757,7 +757,7 @@ static void pathb_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], phy_set_bb_reg(adapt, rOFDM0_XBTxIQImbalance, 0x3FF, tx1_a); phy_set_bb_reg(adapt, rOFDM0_ECCAThreshold, BIT(27), - ((x * oldval_1>>7) & 0x1)); + ((x * oldval_1 >> 7) & 0x1)); y = result[final_candidate][5]; if ((y & 0x00000200) != 0) @@ -766,11 +766,11 @@ static void pathb_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], tx1_c = (y * oldval_1) >> 8; phy_set_bb_reg(adapt, rOFDM0_XDTxAFE, 0xF0000000, - ((tx1_c&0x3C0)>>6)); + ((tx1_c & 0x3C0) >> 6)); phy_set_bb_reg(adapt, rOFDM0_XBTxIQImbalance, 0x003F0000, - (tx1_c&0x3F)); + (tx1_c & 0x3F)); phy_set_bb_reg(adapt, rOFDM0_ECCAThreshold, BIT(25), - ((y * oldval_1>>7) & 0x1)); + ((y * oldval_1 >> 7) & 0x1)); if (txonly) return; @@ -851,9 +851,9 @@ static void mac_setting_calibration(struct adapter *adapt, u32 *mac_reg, u32 *ba usb_write8(adapt, mac_reg[i], 0x3F); for (i = 1; i < (IQK_MAC_REG_NUM - 1); i++) - usb_write8(adapt, mac_reg[i], (u8)(backup[i]&(~BIT(3)))); + usb_write8(adapt, mac_reg[i], (u8)(backup[i] & (~BIT(3)))); - usb_write8(adapt, mac_reg[i], (u8)(backup[i]&(~BIT(5)))); + usb_write8(adapt, mac_reg[i], (u8)(backup[i] & (~BIT(5)))); } static void path_a_standby(struct adapter *adapt) @@ -902,22 +902,22 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8], if (diff > MAX_TOLERANCE) { if ((i == 2 || i == 6) && !sim_bitmap) { - if (resulta[c1][i] + resulta[c1][i+1] == 0) - final_candidate[(i/4)] = c2; - else if (resulta[c2][i] + resulta[c2][i+1] == 0) - final_candidate[(i/4)] = c1; + if (resulta[c1][i] + resulta[c1][i + 1] == 0) + final_candidate[(i / 4)] = c2; + else if (resulta[c2][i] + resulta[c2][i + 1] == 0) + final_candidate[(i / 4)] = c1; else - sim_bitmap = sim_bitmap | (1<>16; + bMaskDWord) & 0x3FF0000) >> 16; result[t][1] = (phy_query_bb_reg(adapt, rTx_Power_After_IQK_A, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; break; } } @@ -1049,9 +1049,9 @@ static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8], path_a_ok = phy_path_a_rx_iqk(adapt, is2t); if (path_a_ok == 0x03) { result[t][2] = (phy_query_bb_reg(adapt, rRx_Power_Before_IQK_A_2, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; result[t][3] = (phy_query_bb_reg(adapt, rRx_Power_After_IQK_A_2, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; break; } ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, @@ -1073,19 +1073,19 @@ static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8], path_b_ok = phy_path_b_iqk(adapt); if (path_b_ok == 0x03) { result[t][4] = (phy_query_bb_reg(adapt, rTx_Power_Before_IQK_B, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; result[t][5] = (phy_query_bb_reg(adapt, rTx_Power_After_IQK_B, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; result[t][6] = (phy_query_bb_reg(adapt, rRx_Power_Before_IQK_B_2, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; result[t][7] = (phy_query_bb_reg(adapt, rRx_Power_After_IQK_B_2, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; break; } else if (i == (retry_count - 1) && path_b_ok == 0x01) { /* Tx IQK OK */ result[t][4] = (phy_query_bb_reg(adapt, rTx_Power_Before_IQK_B, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; result[t][5] = (phy_query_bb_reg(adapt, rTx_Power_After_IQK_B, - bMaskDWord)&0x3FF0000)>>16; + bMaskDWord) & 0x3FF0000) >> 16; } } @@ -1138,12 +1138,12 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t) /* Check continuous TX and Packet TX */ tmpreg = usb_read8(adapt, 0xd03); - if ((tmpreg&0x70) != 0) - usb_write8(adapt, 0xd03, tmpreg&0x8F); + if ((tmpreg & 0x70) != 0) + usb_write8(adapt, 0xd03, tmpreg & 0x8F); else usb_write8(adapt, REG_TXPAUSE, 0xFF); - if ((tmpreg&0x70) != 0) { + if ((tmpreg & 0x70) != 0) { /* 1. Read original RF mode */ /* Path-A */ rf_a_mode = rtw_hal_read_rfreg(adapt, RF_PATH_A, RF_AC, @@ -1157,12 +1157,12 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t) /* 2. Set RF mode = standby mode */ /* Path-A */ phy_set_rf_reg(adapt, RF_PATH_A, RF_AC, bMask12Bits, - (rf_a_mode&0x8FFFF)|0x10000); + (rf_a_mode & 0x8FFFF) | 0x10000); /* Path-B */ if (is2t) phy_set_rf_reg(adapt, RF_PATH_B, RF_AC, bMask12Bits, - (rf_b_mode&0x8FFFF)|0x10000); + (rf_b_mode & 0x8FFFF) | 0x10000); } /* 3. Read RF reg18 */ @@ -1170,12 +1170,12 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t) /* 4. Set LC calibration begin bit15 */ phy_set_rf_reg(adapt, RF_PATH_A, RF_CHNLBW, bMask12Bits, - lc_cal|0x08000); + lc_cal | 0x08000); msleep(100); /* Restore original situation */ - if ((tmpreg&0x70) != 0) { + if ((tmpreg & 0x70) != 0) { /* Deal with continuous TX case */ /* Path-A */ usb_write8(adapt, 0xd03, tmpreg); -- 2.17.1