diff options
author | Fabio Aiuto <fabioaiuto83@gmail.com> | 2021-04-10 17:20:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-11 09:45:03 +0300 |
commit | d6b08255f8fb0084ea78f8358b529d6d27e9c103 (patch) | |
tree | 02fd96206c780483ce34567eda1be63395c2c751 | |
parent | 1e95e1e49aee7305e110e999d5314bc7116c02c2 (diff) | |
download | linux-d6b08255f8fb0084ea78f8358b529d6d27e9c103.tar.xz |
staging: rtl8723bs: remove more unnecessary parentheses
remove more unnecessary parentheses after
DBG_8192C deletion.
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c730d2719cb2ed385dd55811d6e205c6c31f2355.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 21 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 4 |
2 files changed, 11 insertions, 14 deletions
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 6bf0cbb17b99..8d6ea8850556 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -754,9 +754,8 @@ static void hal_ReadEFuse_WiFi( while (AVAILABLE_EFUSE_ADDR(eFuse_Addr)) { efuse_OneByteRead(padapter, eFuse_Addr++, &efuseHeader, bPseudoTest); - if (efuseHeader == 0xFF) { + if (efuseHeader == 0xFF) break; - } /* Check PG header for section num. */ if (EXT_HEADER(efuseHeader)) { /* extended header */ @@ -1319,9 +1318,9 @@ static u8 hal_EfusePgCheckAvailableAddr( EFUSE_GetEfuseDefinition(padapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, &max_available, bPseudoTest); current_size = Efuse_GetCurrentSize(padapter, efuseType, bPseudoTest); - if (current_size >= max_available) { + if (current_size >= max_available) return false; - } + return true; } @@ -1469,14 +1468,13 @@ static u8 hal_EfusePgPacketWrite1ByteHeader( efuse_OneByteRead(padapter, efuse_addr, &tmp_header, bPseudoTest); if (tmp_header != 0xFF) break; - if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { + if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) return false; - } + } while (1); - if (tmp_header != pg_header) { + if (tmp_header != pg_header) return false; - } *pAddr = efuse_addr; @@ -1498,9 +1496,8 @@ static u8 hal_EfusePgPacketWrite2ByteHeader( EFUSE_GetEfuseDefinition(padapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, &efuse_max_available_len, bPseudoTest); efuse_addr = *pAddr; - if (efuse_addr >= efuse_max_available_len) { + if (efuse_addr >= efuse_max_available_len) return false; - } pg_header = ((pTargetPkt->offset & 0x07) << 5) | 0x0F; @@ -3734,9 +3731,9 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val) case HW_VAR_MACID_SLEEP: /* Input is MACID */ val32 = *(u32 *)val; - if (val32 > 31) { + if (val32 > 31) break; - } + val8 = (u8)val32; /* macid is between 0~31 */ val32 = rtw_read32(padapter, REG_MACID_SLEEP); diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c index a69cc24c81c7..7c2680b6508c 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c @@ -123,9 +123,9 @@ static void update_recvframe_phyinfo(union recv_frame *precvframe, pstapriv = &padapter->stapriv; psta = rtw_get_stainfo(pstapriv, sa); - if (psta) { + if (psta) pkt_info.station_id = psta->mac_id; - } + pkt_info.data_rate = pattrib->data_rate; /* rtl8723b_query_rx_phy_status(precvframe, pphy_status); */ |