Modify functions return type to void
cover Modify functions return type to void
This patchset modifies two function return types to void.
The return values of the function are never checked and they always return success. This resolves coccicheck Unneeded variable warnings
PATCH[1/2] : This patch modifies return type of function loadparam() to void.
PATCH[2/2] : This patch modifies return type of rtw_reset_drv_sw() to void.
Shobhit Kukreti (2):
staging: rtl8723bs: os_dep: Modify return type of function
loadparam(..) to void
staging: rtl8723bs: os_dep: Modify return type of function
rtw_reset_drv_sw() to void.
drivers/staging/rtl8723bs/include/osdep_intf.h | 2 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 staging: rtl8723bs: os_dep: Modify return type of function loadparam(..) to void
The function static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev) return type is modified to void.
The initial return value was always returning _SUCCESS and the return value is never checked when the function is called.
This resolves coccicheck warnings of unneeded variables.
--- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -3
@@ -223,9 +223,8 @@ int _netdev_open(struct net_device *pnetdev);int netdev_open (struct net_device *pnetdev);static int netdev_close (struct net_device *pnetdev); -static uint loadparam (struct adapter *padapter,_nic_hdl pnetdev) +static void loadparam (struct adapter *padapter,_nic_hdl pnetdev) { -uint status = _SUCCESS;struct registry_priv *registry_par = &padapter->registrypriv; registry_par->chip_version = (u8 )rtw_chip_version;
@@ -330,7 +329,6 @@ static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev) registry_par->qos_opt_enable = (u8 )rtw_qos_opt_enable; registry_par->hiq_filter = (u8 )rtw_hiq_filter; -return status; }static int rtw_net_set_mac_address (struct net_device *pnetdev,void *p)
Signature · 1 line
2.7.4
PATCH 2/2 staging: rtl8723bs: os_dep: Modify return type of function rtw_reset_drv_sw() to void.
In reply to Shobhit KukretiThe function rtw_reset_drv_sw() return value is set to _SUCCESS. The return value is never checked when the function is called. Modified the return value to void to remove "Unneeded Variable warning of coccicheck.
--- drivers/staging/rtl8723bs/include/osdep_intf.h | 2 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/include/osdep_intf.h +1 -1
@@ -46,7 +46,7 @@ void devobj_deinit(struct dvobj_priv *pdvobj);u8 rtw_init_drv_sw (struct adapter *padapter);u8 rtw_free_drv_sw (struct adapter *padapter); -u8 rtw_reset_drv_sw (struct adapter *padapter); +void rtw_reset_drv_sw (struct adapter *padapter);void rtw_dev_unload (struct adapter *padapter);u32 rtw_start_drv_threads (struct adapter *padapter);
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -3
@@ -705,9 +705,8 @@ void devobj_deinit(struct dvobj_priv *pdvobj)kfree (pdvobj); } -u8 rtw_reset_drv_sw (struct adapter *padapter) +void rtw_reset_drv_sw (struct adapter *padapter) { -u8 ret8 = _SUCCESS;struct mlme_priv *pmlmepriv = &padapter->mlmepriv;struct pwrctrl_priv *pwrctrlpriv =adapter_to_pwrctl (padapter);
@@ -737,7 +736,6 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)rtw_set_signal_stat_timer (&padapter->recvpriv); -return ret8; }
Signature · 1 line
2.7.4