From: Ira Weiny <ira.weiny@intel.com>
To: Rebecca Mckeever <remckee0@gmail.com>
Cc: outreachy@lists.linux.dev,
Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH 2/3] staging: r8188eu: combine both sides of conditional statement
Date: Tue, 12 Apr 2022 16:36:24 -0700 [thread overview]
Message-ID: <YlYM+LjgZWALaa1R@iweiny-desk3> (raw)
In-Reply-To: <d33c51bc3a20fa25e4737b258f3b1c42cc8124e3.1649011311.git.remckee0@gmail.com>
On Sun, Apr 03, 2022 at 02:17:05PM -0500, Rebecca Mckeever wrote:
> Both sides of conditional statement are the same except for the comment.
> Additional instance found with git grep.
>
> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> ---
> drivers/staging/r8188eu/core/rtw_cmd.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> index da455eb4d8cb..2d316a6c8294 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -1411,11 +1411,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 */
> @@ -1445,11 +1443,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);
> --
> 2.32.0
>
next prev parent reply other threads:[~2022-04-12 23:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-03 19:17 [PATCH 0/3] staging: r8188eu: clean up two *_cmd_callback() functions in rtw_cmd.c Rebecca Mckeever
2022-04-03 19:17 ` [PATCH 1/3] staging: r8188eu: remove handlerOS independent comment Rebecca Mckeever
2022-04-03 19:17 ` [PATCH 2/3] staging: r8188eu: combine both sides of conditional statement Rebecca Mckeever
2022-04-12 23:36 ` Ira Weiny [this message]
2022-04-03 19:17 ` [PATCH 3/3] staging: r8188eu: add blank line between functions Rebecca Mckeever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YlYM+LjgZWALaa1R@iweiny-desk3 \
--to=ira.weiny@intel.com \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=phil@philpotter.co.uk \
--cc=remckee0@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox