All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Larry.Finger@lwfinger.net, Jaehee Park <jhpark1013@gmail.com>
Cc: phil@philpotter.co.uk, gregkh@linuxfoundation.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	outreachy@lists.linux.dev, jhpark1013@gmail.com
Subject: Re: [PATCH v2 4/6] staging: r8188eu: place constants on the right side of tests
Date: Fri, 15 Apr 2022 06:57:52 +0200	[thread overview]
Message-ID: <2300552.NG923GbCHz@leap> (raw)
In-Reply-To: <baa4d5259e2eb48da1dd71e1863b62a086312a7e.1649990500.git.jhpark1013@gmail.com>

On venerdì 15 aprile 2022 04:48:35 CEST Jaehee Park wrote:
> To comply with the linux coding style, place constants on the right
> side of the test in comparisons. Issue found with checkpatch.
> WARNING: Comparisons should place the constant on the right side of
> the test.
> 
> Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
> ---
>  drivers/staging/r8188eu/core/rtw_mlme.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/
r8188eu/core/rtw_mlme.c
> index bb9d595a90b9..d57f2ffa069e 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme.c
> @@ -715,7 +715,7 @@ void rtw_surveydone_event_callback(struct adapter	
*adapter, u8 *pbuf)
>  			set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
>  			pmlmepriv->to_join = false;
>  			s_ret = 
rtw_select_and_join_from_scanned_queue(pmlmepriv);
> -			if (_SUCCESS == s_ret) {
> +			if (s_ret == _SUCCESS) {
>  			     _set_timer(&pmlmepriv->assoc_timer, 
MAX_JOIN_TIMEOUT);
>  			} else if (s_ret == 2) { /* there is no need 
to wait for join */
>  				_clr_fwstate_(pmlmepriv, 
_FW_UNDER_LINKING);

As Pavel pointed out, "s_ret" can not ever be equal to '2'; this could have 
been an opportunity to remove a couple of lines of dead code and add one 
more patch to your series.

Thanks,

Fabio





  reply	other threads:[~2022-04-15  4:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-15  2:48 [PATCH v2 0/6] staging: r8188eu: fix warnings reported by checkpatch Jaehee Park
2022-04-15  2:48 ` [PATCH v2 1/6] staging: r8188eu: remove unused member free_bss_buf Jaehee Park
2022-04-15  4:29   ` Fabio M. De Francesco
2022-04-17 20:14     ` Jaehee Park
2022-04-17 20:16       ` Pavel Skripkin
2022-04-17 20:42         ` Jaehee Park
2022-04-17 21:13           ` Fabio M. De Francesco
2022-04-17 22:01             ` Fabio M. De Francesco
2022-04-18  4:49             ` Jaehee Park
2022-04-15  2:48 ` [PATCH v2 2/6] staging: r8188eu: remove spaces before tabs Jaehee Park
2022-04-15  2:48 ` [PATCH v2 3/6] staging: r8188eu: remove 'added by' author comments Jaehee Park
2022-04-17 20:23   ` Pavel Skripkin
2022-04-17 20:49     ` Jaehee Park
2022-04-15  2:48 ` [PATCH v2 4/6] staging: r8188eu: place constants on the right side of tests Jaehee Park
2022-04-15  4:57   ` Fabio M. De Francesco [this message]
2022-04-15  2:48 ` [PATCH v2 5/6] staging: r8188eu: replace spaces with tabs Jaehee Park
2022-04-15  2:48 ` [PATCH v2 6/6] staging: r8188eu: correct typo in comments Jaehee Park

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=2300552.NG923GbCHz@leap \
    --to=fmdefrancesco@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhpark1013@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.