lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2300552.NG923GbCHz@leap>
Date:   Fri, 15 Apr 2022 06:57:52 +0200
From:   "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To:     Larry.Finger@...inger.net, Jaehee Park <jhpark1013@...il.com>
Cc:     phil@...lpotter.co.uk, gregkh@...uxfoundation.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        outreachy@...ts.linux.dev, jhpark1013@...il.com
Subject: Re: [PATCH v2 4/6] staging: r8188eu: place constants on the right side of tests

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@...il.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




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ