staging: rtl8723bs: clean up two *_cmd_callback() functions in rtw_cmd.c
cover staging: rtl8723bs: clean up two *_cmd_callback() functions in rtw_cmd.c
These patches perform cleanup in functions rtw_survey_cmd_callback() and rtw_joinbss_cmd_callback().
Rebecca Mckeever (2):
staging: rtl8723bs: remove handlerOS independent comment
staging: rtl8723bs: combine both sides of conditional statement
drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
Signature · 1 line
2.32.0
PATCH 1/2 staging: rtl8723bs: remove handlerOS independent comment
The "need to make timeout handlerOS independent" comment is incorrect. Remove the comment to avoid misleading developers. Additional instances found with git grep.
Suggested-by Dan Carpenter <[email protected]>
Signed-off-by Rebecca Mckeever <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -2
@@ -1887,7 +1887,6 @@ void rtw_survey_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)if (pcmd->res ==H2C_DROPPED ) {/* TODO: cancel timer and do timeout handler directly... */ -/* need to make timeout handlerOS independent */ _set_timer (&pmlmepriv->scan_to_timer,1 ); }else if (pcmd->res !=H2C_SUCCESS ) {_set_timer (&pmlmepriv->scan_to_timer,1 );
@@ -1918,7 +1917,6 @@ void rtw_joinbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)if (pcmd->res ==H2C_DROPPED ) {/* TODO: cancel timer and do timeout handler directly... */ -/* need to make timeout handlerOS independent */ _set_timer (&pmlmepriv->assoc_timer,1 ); }else if (pcmd->res !=H2C_SUCCESS ) {_set_timer (&pmlmepriv->assoc_timer,1 );
Signature · 1 line
2.32.0
PATCH 2/2 staging: rtl8723bs: combine both sides of conditional statement
In reply to Rebecca MckeeverBoth sides of conditional statement are the same except for the comment. Additional instances found with git grep.
Suggested-by Dan Carpenter <[email protected]>
Signed-off-by Rebecca Mckeever <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_cmd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +2 -6
@@ -1885,11 +1885,9 @@ void rtw_survey_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) {struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -if (pcmd->res ==H2C_DROPPED ) { +if (pcmd->res !=H2C_SUCCESS ) {/* TODO: cancel timer and do timeout handler directly... */ _set_timer (&pmlmepriv->scan_to_timer,1 ); - }else if (pcmd->res !=H2C_SUCCESS ) { -_set_timer (&pmlmepriv->scan_to_timer,1 ); }/* free cmd */
@@ -1915,11 +1913,9 @@ void rtw_joinbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) {struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -if (pcmd->res ==H2C_DROPPED ) { +if (pcmd->res !=H2C_SUCCESS ) {/* TODO: cancel timer and do timeout handler directly... */ _set_timer (&pmlmepriv->assoc_timer,1 ); - }else if (pcmd->res !=H2C_SUCCESS ) { -_set_timer (&pmlmepriv->assoc_timer,1 ); }rtw_free_cmd_obj (pcmd);
Signature · 1 line
2.32.0