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: <20220629071241.GW16517@kadam>
Date:   Wed, 29 Jun 2022 19:13:06 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Felix Schlepper <f3sch.git@...look.com>
Cc:     gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org, wjsota@...il.com
Subject: Re: [PATCH 3/7] Staging: rtl8192e: Avoid multiple assignments

On Tue, Jun 28, 2022 at 10:30:52AM +0200, Felix Schlepper wrote:
> This addresses an issue raised by checkpatch.pl:
> 
>      $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
>      CHECK: multiple assignments should be avoided
> 
> This patch does not change the logical of the assignments.
> 
> Signed-off-by: Felix Schlepper <f3sch.git@...look.com>
> ---
>  drivers/staging/rtl8192e/rtllib_wx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
> index 7bd1e829ff7e..c8fc66113b41 100644
> --- a/drivers/staging/rtl8192e/rtllib_wx.c
> +++ b/drivers/staging/rtl8192e/rtllib_wx.c
> @@ -160,7 +160,8 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee,
>  			max_rate = rate;
>  	}
>  	iwe.cmd = SIOCGIWRATE;
> -	iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
> +	iwe.u.bitrate.disabled = 0;
> +	iwe.u.bitrate.fixed = iwe.u.bitrate.disabled;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This assignment makes no sense.  Why are we setting fixed = disabled?
If you're going to split it apart do:

	iwe.u.bitrate.disabled = 0;
	iwe.u.bitrate.fixed = 0;

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ