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: <d4ee4591-0642-002b-ddd8-41693c0f1ccb@gmail.com>
Date:   Thu, 28 Oct 2021 14:26:44 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Saurav Girepunje <saurav.girepunje@...il.com>,
        Larry.Finger@...inger.net, florian.c.schilhabel@...glemail.com,
        gregkh@...uxfoundation.org, alec@...celle.de,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc:     saurav.girepunje@...mail.com
Subject: Re: [PATCH] staging: rtl8712: remove the condition with no effect

On 10/28/21 07:31, Saurav Girepunje wrote:
> Remove the if condition check and else code section in
> query_rx_phy_status(). As variable cck_highpwr is assign a value of '0'
> after this assignment, if condition check !cck_highpwr is always
> going to be true. So remove the if condition check as well as else
> section which will be never true.
> 
> After removing the if condition there is no use of local variable
> cck_highpwr. Remove the local variable cck_highpwr.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
> ---

[code snip]

> +		report = pcck_buf->cck_agc_rpt & 0xc0;
> +		report >>= 6;
> +		switch (report) {
> +		/* Modify the RF RNA gain value to -40, -20,
> +		 * -2, 14 by Jenyu's suggestion
> +		 * Note: different RF with the different
> +		 * RNA gain.
> +		 */
> +		case 0x3:
> +			rx_pwr_all = -40 - (pcck_buf->cck_agc_rpt &
> +				     0x3e);

You can move "0x3e);" part on previous line, since it will fit even 80 
characters boundary. It will improve readability, IMO

Same below.

> +			break;
> +		case 0x2:
> +			rx_pwr_all = -20 - (pcck_buf->cck_agc_rpt &
> +				     0x3e);
> +			break;
> +		case 0x1:
> +			rx_pwr_all = -2 - (pcck_buf->cck_agc_rpt &
> +				     0x3e);
> +			break;
> +		case 0x0:
> +			rx_pwr_all = 14 - (pcck_buf->cck_agc_rpt &
> +				     0x3e);
> +			break;
>   		}
> +



With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ