lkml.org 
[lkml]   [2022]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 4/6] staging: r8188eu: place constants on the right side of tests
Date
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




\
 
 \ /
  Last update: 2022-04-15 07:10    [W:0.111 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site