staging: rtl8723bs: remove unneeded variables
authorPayal Kshirsagar <payalskshirsagar1234@gmail.com>
Sat, 21 Mar 2020 07:47:57 +0000 (13:17 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Mar 2020 09:34:48 +0000 (10:34 +0100)
Remove unneeded temporary local variables and their declarations.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Link: https://lore.kernel.org/r/20200321074757.8321-1-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_io.c
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
drivers/staging/rtl8723bs/hal/hal_com.c

index 57168578663a443e447f1c56ac0dfc7ffe073086..c3f63f90354718ca8b8874dbd7eb2c4a0b27d7da 100644 (file)
@@ -37,7 +37,6 @@ jackson@realtek.com.tw
 
 u8 _rtw_read8(struct adapter *adapter, u32 addr)
 {
-       u8 r_val;
        /* struct       io_queue        *pio_queue = (struct io_queue *)adapter->pio_queue; */
        struct io_priv *pio_priv = &adapter->iopriv;
        struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
@@ -45,8 +44,7 @@ u8 _rtw_read8(struct adapter *adapter, u32 addr)
 
        _read8 = pintfhdl->io_ops._read8;
 
-       r_val = _read8(pintfhdl, addr);
-       return r_val;
+       return _read8(pintfhdl, addr);
 }
 
 u16 _rtw_read16(struct adapter *adapter, u32 addr)
@@ -142,13 +140,10 @@ u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
        u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
        struct io_priv *pio_priv = &adapter->iopriv;
        struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       u32 ret;
 
        _write_port = pintfhdl->io_ops._write_port;
 
-       ret = _write_port(pintfhdl, addr, cnt, pmem);
-
-       return ret;
+       return _write_port(pintfhdl, addr, cnt, pmem);
 }
 
 int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapter *padapter, struct _io_ops *pops))
index 30137f0bd984c8380c94f6c17e2caa898f42161f..9ff35a2da024bacf2da0784ff7e98472d9931c13 100644 (file)
@@ -1390,10 +1390,5 @@ void rtw_ps_deny_cancel(struct adapter *padapter, enum PS_DENY_REASON reason)
  */
 u32 rtw_ps_deny_get(struct adapter *padapter)
 {
-       u32 deny;
-
-
-       deny = adapter_to_pwrctl(padapter)->ps_deny;
-
-       return deny;
+       return adapter_to_pwrctl(padapter)->ps_deny;
 }
index 109bd85b0cd853614083aaad9c2f4afdf4da5448..02676da5c166a5b74ce9911bdefccefe042ede53 100644 (file)
@@ -961,10 +961,7 @@ exit:
 
 u8 rtw_get_mgntframe_raid(struct adapter *adapter, unsigned char network_type)
 {
-
-       u8 raid;
-       raid = (network_type & WIRELESS_11B) ? RATEID_IDX_B : RATEID_IDX_G;
-       return raid;
+       return (network_type & WIRELESS_11B) ? RATEID_IDX_B : RATEID_IDX_G;
 }
 
 void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *psta)