staging: rtl8723bs: remove unneeded variables
PATCH 1/1 staging: rtl8723bs: remove unneeded variables
Remove unneeded temporary local variables and their declarations.
Signed-off-by Payal Kshirsagar <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_io.c | 9 ++------- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +------ drivers/staging/rtl8723bs/hal/hal_com.c | 5 +---- 3 files changed, 4 insertions(+), 17 deletions(-)
drivers/staging/rtl8723bs/core/rtw_io.c +2 -7
@@ -37,7 +37,6 @@ [email protected]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))
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +1 -6
@@ -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; }
drivers/staging/rtl8723bs/hal/hal_com.c +1 -4
@@ -961,10 +961,7 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf)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)
Signature · 1 line
2.17.1
Quoted 3 lines · On Sat, 21 Mar 2020 13:17:57 +0530 Payal Kshirsagar…
Remove unneeded temporary local variables and their declarations.
Signed-off-by Payal Kshirsagar <[email protected]>
Reviewed-by Stefano Brivio <[email protected]>
Signature · 1 line
Stefano