Commit dd03eed3 authored by Daniele Alessandrelli's avatar Daniele Alessandrelli Committed by Greg Kroah-Hartman

staging: rtl8723au: rtl8723a_hal_init.c: remove unnecessary braces

Fix all checkpatch "braces {} are not necessary" warnings for
rtl8723au/hal/rtl8723a_hal_init.c
Signed-off-by: default avatarDaniele Alessandrelli <daniele.alessandrelli@gmail.com>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Acked-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 19c7b644
...@@ -424,9 +424,8 @@ hal_ReadEFuse_WiFi(struct rtw_adapter *padapter, ...@@ -424,9 +424,8 @@ hal_ReadEFuse_WiFi(struct rtw_adapter *padapter,
offset = GET_HDR_OFFSET_2_0(efuseHeader); offset = GET_HDR_OFFSET_2_0(efuseHeader);
ReadEFuseByte23a(padapter, eFuse_Addr++, &efuseExtHdr); ReadEFuseByte23a(padapter, eFuse_Addr++, &efuseExtHdr);
if (ALL_WORDS_DISABLED(efuseExtHdr)) { if (ALL_WORDS_DISABLED(efuseExtHdr))
continue; continue;
}
offset |= ((efuseExtHdr & 0xF0) >> 1); offset |= ((efuseExtHdr & 0xF0) >> 1);
wden = (efuseExtHdr & 0x0F); wden = (efuseExtHdr & 0x0F);
...@@ -524,9 +523,8 @@ hal_ReadEFuse_BT(struct rtw_adapter *padapter, ...@@ -524,9 +523,8 @@ hal_ReadEFuse_BT(struct rtw_adapter *padapter,
ReadEFuseByte23a(padapter, eFuse_Addr++, ReadEFuseByte23a(padapter, eFuse_Addr++,
&efuseExtHdr); &efuseExtHdr);
if (ALL_WORDS_DISABLED(efuseExtHdr)) { if (ALL_WORDS_DISABLED(efuseExtHdr))
continue; continue;
}
offset |= ((efuseExtHdr & 0xF0) >> 1); offset |= ((efuseExtHdr & 0xF0) >> 1);
wden = (efuseExtHdr & 0x0F); wden = (efuseExtHdr & 0x0F);
...@@ -630,9 +628,8 @@ u16 rtl8723a_EfuseGetCurrentSize_WiFi(struct rtw_adapter *padapter) ...@@ -630,9 +628,8 @@ u16 rtl8723a_EfuseGetCurrentSize_WiFi(struct rtw_adapter *padapter)
hoffset = GET_HDR_OFFSET_2_0(efuse_data); hoffset = GET_HDR_OFFSET_2_0(efuse_data);
efuse_addr++; efuse_addr++;
efuse_OneByteRead23a(padapter, efuse_addr, &efuse_data); efuse_OneByteRead23a(padapter, efuse_addr, &efuse_data);
if (ALL_WORDS_DISABLED(efuse_data)) { if (ALL_WORDS_DISABLED(efuse_data))
continue; continue;
}
hoffset |= ((efuse_data & 0xF0) >> 1); hoffset |= ((efuse_data & 0xF0) >> 1);
hworden = efuse_data & 0x0F; hworden = efuse_data & 0x0F;
...@@ -721,10 +718,9 @@ u16 rtl8723a_EfuseGetCurrentSize_BT(struct rtw_adapter *padapter) ...@@ -721,10 +718,9 @@ u16 rtl8723a_EfuseGetCurrentSize_BT(struct rtw_adapter *padapter)
} }
/* Check if we need to check next bank efuse */ /* Check if we need to check next bank efuse */
if (efuse_addr < retU2) { if (efuse_addr < retU2)
break; /* don't need to check next bank. */ break; /* don't need to check next bank. */
} }
}
retU2 = ((bank - 1) * EFUSE_BT_REAL_BANK_CONTENT_LEN) + efuse_addr; retU2 = ((bank - 1) * EFUSE_BT_REAL_BANK_CONTENT_LEN) + efuse_addr;
pHalData->BTEfuseUsedBytes = retU2; pHalData->BTEfuseUsedBytes = retU2;
...@@ -1140,9 +1136,8 @@ static int _LLTWrite(struct rtw_adapter *padapter, u32 address, u32 data) ...@@ -1140,9 +1136,8 @@ static int _LLTWrite(struct rtw_adapter *padapter, u32 address, u32 data)
/* polling */ /* polling */
do { do {
value = rtl8723au_read32(padapter, LLTReg); value = rtl8723au_read32(padapter, LLTReg);
if (_LLT_NO_ACTIVE == _LLT_OP_VALUE(value)) { if (_LLT_NO_ACTIVE == _LLT_OP_VALUE(value))
break; break;
}
if (count > POLLING_LLT_THRESHOLD) { if (count > POLLING_LLT_THRESHOLD) {
RT_TRACE(_module_hal_init_c_, _drv_err_, RT_TRACE(_module_hal_init_c_, _drv_err_,
...@@ -1165,16 +1160,14 @@ int InitLLTTable23a(struct rtw_adapter *padapter, u32 boundary) ...@@ -1165,16 +1160,14 @@ int InitLLTTable23a(struct rtw_adapter *padapter, u32 boundary)
for (i = 0; i < (txpktbuf_bndy - 1); i++) { for (i = 0; i < (txpktbuf_bndy - 1); i++) {
status = _LLTWrite(padapter, i, i + 1); status = _LLTWrite(padapter, i, i + 1);
if (status != _SUCCESS) { if (status != _SUCCESS)
return status; return status;
} }
}
/* end of list */ /* end of list */
status = _LLTWrite(padapter, (txpktbuf_bndy - 1), 0xFF); status = _LLTWrite(padapter, (txpktbuf_bndy - 1), 0xFF);
if (status != _SUCCESS) { if (status != _SUCCESS)
return status; return status;
}
/* Make the other pages as ring buffer */ /* Make the other pages as ring buffer */
/* This ring buffer is used as beacon buffer if we config this /* This ring buffer is used as beacon buffer if we config this
...@@ -1182,16 +1175,14 @@ int InitLLTTable23a(struct rtw_adapter *padapter, u32 boundary) ...@@ -1182,16 +1175,14 @@ int InitLLTTable23a(struct rtw_adapter *padapter, u32 boundary)
/* Otherwise used as local loopback buffer. */ /* Otherwise used as local loopback buffer. */
for (i = txpktbuf_bndy; i < Last_Entry_Of_TxPktBuf; i++) { for (i = txpktbuf_bndy; i < Last_Entry_Of_TxPktBuf; i++) {
status = _LLTWrite(padapter, i, (i + 1)); status = _LLTWrite(padapter, i, (i + 1));
if (_SUCCESS != status) { if (_SUCCESS != status)
return status; return status;
} }
}
/* Let last entry point to the start entry of ring buffer */ /* Let last entry point to the start entry of ring buffer */
status = _LLTWrite(padapter, Last_Entry_Of_TxPktBuf, txpktbuf_bndy); status = _LLTWrite(padapter, Last_Entry_Of_TxPktBuf, txpktbuf_bndy);
if (status != _SUCCESS) { if (status != _SUCCESS)
return status; return status;
}
return status; return status;
} }
...@@ -1426,9 +1417,9 @@ static void _DisableAnalog(struct rtw_adapter *padapter, bool bWithoutHWSM) ...@@ -1426,9 +1417,9 @@ static void _DisableAnalog(struct rtw_adapter *padapter, bool bWithoutHWSM)
/* HW Auto state machine */ /* HW Auto state machine */
int CardDisableHWSM(struct rtw_adapter *padapter, u8 resetMCU) int CardDisableHWSM(struct rtw_adapter *padapter, u8 resetMCU)
{ {
if (padapter->bSurpriseRemoved) { if (padapter->bSurpriseRemoved)
return _SUCCESS; return _SUCCESS;
}
/* RF Off Sequence ==== */ /* RF Off Sequence ==== */
_DisableRFAFEAndResetBB8192C(padapter); _DisableRFAFEAndResetBB8192C(padapter);
...@@ -1450,9 +1441,8 @@ int CardDisableHWSM(struct rtw_adapter *padapter, u8 resetMCU) ...@@ -1450,9 +1441,8 @@ int CardDisableHWSM(struct rtw_adapter *padapter, u8 resetMCU)
/* without HW Auto state machine */ /* without HW Auto state machine */
int CardDisableWithoutHWSM(struct rtw_adapter *padapter) int CardDisableWithoutHWSM(struct rtw_adapter *padapter)
{ {
if (padapter->bSurpriseRemoved) { if (padapter->bSurpriseRemoved)
return _SUCCESS; return _SUCCESS;
}
/* RF Off Sequence ==== */ /* RF Off Sequence ==== */
_DisableRFAFEAndResetBB8192C(padapter); _DisableRFAFEAndResetBB8192C(padapter);
...@@ -1866,9 +1856,8 @@ static void rtl8723a_cal_txdesc_chksum(struct tx_desc *ptxdesc) ...@@ -1866,9 +1856,8 @@ static void rtl8723a_cal_txdesc_chksum(struct tx_desc *ptxdesc)
/* Clear first */ /* Clear first */
ptxdesc->txdw7 &= cpu_to_le32(0xffff0000); ptxdesc->txdw7 &= cpu_to_le32(0xffff0000);
for (index = 0; index < count; index++) { for (index = 0; index < count; index++)
checksum ^= le16_to_cpu(*(usPtr + index)); checksum ^= le16_to_cpu(*(usPtr + index));
}
ptxdesc->txdw7 |= cpu_to_le32(checksum & 0x0000ffff); ptxdesc->txdw7 |= cpu_to_le32(checksum & 0x0000ffff);
} }
...@@ -1916,9 +1905,8 @@ void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc, ...@@ -1916,9 +1905,8 @@ void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc,
ptxdesc->txdw3 |= cpu_to_le32((8 << 28)); ptxdesc->txdw3 |= cpu_to_le32((8 << 28));
} }
if (true == IsBTQosNull) { if (true == IsBTQosNull)
ptxdesc->txdw2 |= cpu_to_le32(BIT(23)); /* BT NULL */ ptxdesc->txdw2 |= cpu_to_le32(BIT(23)); /* BT NULL */
}
/* offset 16 */ /* offset 16 */
ptxdesc->txdw4 |= cpu_to_le32(BIT(8)); /* driver uses rate */ ptxdesc->txdw4 |= cpu_to_le32(BIT(8)); /* driver uses rate */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment