mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
staging: rtl8192e: Remove unnecessary u8 argument cast
Remove the unnecessary explicit u8 casts for u8 arguments in function calls. These functions have declared their parameters to be of type u8, so the arguments given to those parameters will be automatically coerced to u8. Therefore, an explicit cast is unnecessary. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220423130150.161903-3-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
20400df1e4
commit
46176f28c0
@@ -1175,7 +1175,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
|
||||
pTxFwInfo = (struct tx_fwinfo_8190pci *)skb->data;
|
||||
memset(pTxFwInfo, 0, sizeof(struct tx_fwinfo_8190pci));
|
||||
pTxFwInfo->TxHT = (cb_desc->data_rate & 0x80) ? 1 : 0;
|
||||
pTxFwInfo->TxRate = _rtl92e_rate_mgn_to_hw((u8)cb_desc->data_rate);
|
||||
pTxFwInfo->TxRate = _rtl92e_rate_mgn_to_hw(cb_desc->data_rate);
|
||||
pTxFwInfo->EnableCPUDur = cb_desc->bTxEnableFwCalcDur;
|
||||
pTxFwInfo->Short = _rtl92e_query_is_short(pTxFwInfo->TxHT,
|
||||
pTxFwInfo->TxRate, cb_desc);
|
||||
@@ -1194,7 +1194,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
|
||||
pTxFwInfo->CtsEnable = (cb_desc->bCTSEnable) ? 1 : 0;
|
||||
pTxFwInfo->RtsSTBC = (cb_desc->bRTSSTBC) ? 1 : 0;
|
||||
pTxFwInfo->RtsHT = (cb_desc->rts_rate&0x80) ? 1 : 0;
|
||||
pTxFwInfo->RtsRate = _rtl92e_rate_mgn_to_hw((u8)cb_desc->rts_rate);
|
||||
pTxFwInfo->RtsRate = _rtl92e_rate_mgn_to_hw(cb_desc->rts_rate);
|
||||
pTxFwInfo->RtsBandwidth = 0;
|
||||
pTxFwInfo->RtsSubcarrier = cb_desc->RTSSC;
|
||||
pTxFwInfo->RtsShort = (pTxFwInfo->RtsHT == 0) ?
|
||||
@@ -1707,8 +1707,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
|
||||
slide_rssi_index = 0;
|
||||
|
||||
tmp_val = priv->stats.slide_rssi_total/slide_rssi_statistics;
|
||||
priv->stats.signal_strength = rtl92e_translate_to_dbm(priv,
|
||||
(u8)tmp_val);
|
||||
priv->stats.signal_strength = rtl92e_translate_to_dbm(priv, tmp_val);
|
||||
curr_st->rssi = priv->stats.signal_strength;
|
||||
if (!prev_st->bPacketMatchBSSID) {
|
||||
if (!prev_st->bToSelfBA)
|
||||
@@ -2034,7 +2033,7 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
|
||||
pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift);
|
||||
|
||||
stats->rate = _rtl92e_rate_hw_to_mgn((bool)pDrvInfo->RxHT,
|
||||
(u8)pDrvInfo->RxRate);
|
||||
pDrvInfo->RxRate);
|
||||
stats->bShortPreamble = pDrvInfo->SPLCP;
|
||||
|
||||
_rtl92e_update_received_rate_histogram_stats(dev, stats);
|
||||
|
||||
@@ -34,8 +34,7 @@ static bool _rtl92e_fw_boot_cpu(struct net_device *dev)
|
||||
netdev_dbg(dev, "Download Firmware: Put code ok!\n");
|
||||
|
||||
CPU_status = rtl92e_readl(dev, CPU_GEN);
|
||||
rtl92e_writeb(dev, CPU_GEN,
|
||||
(u8)((CPU_status|CPU_GEN_PWR_STB_CPU)&0xff));
|
||||
rtl92e_writeb(dev, CPU_GEN, (CPU_status | CPU_GEN_PWR_STB_CPU) & 0xff);
|
||||
mdelay(1);
|
||||
|
||||
if (!_rtl92e_wait_for_fw(dev, CPU_GEN_BOOT_RDY, 200)) {
|
||||
|
||||
@@ -933,7 +933,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
|
||||
break;
|
||||
case CmdID_WritePortUchar:
|
||||
rtl92e_writeb(dev, CurrentCmd->Para1,
|
||||
(u8)CurrentCmd->Para2);
|
||||
CurrentCmd->Para2);
|
||||
break;
|
||||
case CmdID_RF_WriteReg:
|
||||
for (eRFPath = 0; eRFPath <
|
||||
|
||||
@@ -2513,5 +2513,5 @@ static void _rtl92e_dm_send_rssi_to_fw(struct net_device *dev)
|
||||
{
|
||||
struct r8192_priv *priv = rtllib_priv(dev);
|
||||
|
||||
rtl92e_writeb(dev, DRIVER_RSSI, (u8)priv->undecorated_smoothed_pwdb);
|
||||
rtl92e_writeb(dev, DRIVER_RSSI, priv->undecorated_smoothed_pwdb);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user