From 25e1543b9f68b7fb240d9e28ef3c59d1788a138f Mon Sep 17 00:00:00 2001 From: Payal Kshirsagar Date: Sat, 21 Mar 2020 13:17:57 +0530 Subject: [PATCH] staging: rtl8723bs: remove unneeded variables Remove unneeded temporary local variables and their declarations. Signed-off-by: Payal Kshirsagar Link: https://lore.kernel.org/r/20200321074757.8321-1-payalskshirsagar1234@gmail.com Signed-off-by: Greg Kroah-Hartman --- 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(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c index 5716857..c3f63f9 100644 --- a/drivers/staging/rtl8723bs/core/rtw_io.c +++ b/drivers/staging/rtl8723bs/core/rtw_io.c @@ -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)) diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c index 30137f0..9ff35a2 100644 --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c @@ -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; } diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c index 109bd85..02676da 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com.c +++ b/drivers/staging/rtl8723bs/hal/hal_com.c @@ -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) -- 2.7.4