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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 30 May 2019 14:12:44 -0700
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Nishka Dasgupta <nishkadg.linux@...il.com>
Cc:     larry.finger@...inger.net, florian.c.schilhabel@...glemail.com,
        himadri18.07@...il.com, daniela.mormocea@...il.com,
        straube.linux@...il.com, vatsalanarang@...il.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8712: Remove unnecessary variable in
 rtl8712_recv.c

On Wed, May 29, 2019 at 06:50:31PM +0530, Nishka Dasgupta wrote:
> Remove unnecessary variable last_evm in rtl8712_recv.c and use its value
> directly.
> Issue found with Coccinelle.
> 
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@...il.com>
> ---
>  drivers/staging/rtl8712/rtl8712_recv.c | 5 ++---
>  drivers/staging/rtl8712/rtl871x_cmd.c  | 2 +-
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
> index 82ddc0c3ecd4..f6f7cd5fd0f2 100644
> --- a/drivers/staging/rtl8712/rtl8712_recv.c
> +++ b/drivers/staging/rtl8712/rtl8712_recv.c
> @@ -885,7 +885,7 @@ static void query_rx_phy_status(struct _adapter *padapter,
>  static void process_link_qual(struct _adapter *padapter,
>  			      union recv_frame *prframe)
>  {
> -	u32	last_evm = 0, tmpVal;
> +	u32	tmpVal;
>  	struct rx_pkt_attrib *pattrib;
>  	struct smooth_rssi_data *sqd = &padapter->recvpriv.signal_qual_data;
>  
> @@ -898,8 +898,7 @@ static void process_link_qual(struct _adapter *padapter,
>  		 */
>  		if (sqd->total_num++ >= PHY_LINKQUALITY_SLID_WIN_MAX) {
>  			sqd->total_num = PHY_LINKQUALITY_SLID_WIN_MAX;
> -			last_evm = sqd->elements[sqd->index];
> -			sqd->total_val -= last_evm;
> +			sqd->total_val -= sqd->elements[sqd->index];

Nope, original code is easier to understand :(

>  		}
>  		sqd->total_val += pattrib->signal_qual;
>  		sqd->elements[sqd->index++] = pattrib->signal_qual;
> diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
> index 05a78ac24987..7c437ee9e022 100644
> --- a/drivers/staging/rtl8712/rtl871x_cmd.c
> +++ b/drivers/staging/rtl8712/rtl871x_cmd.c
> @@ -880,7 +880,7 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter,
>  		}
>  		r8712_indicate_connect(padapter);
>  	} else {
> -		pwlan = _r8712_alloc_network(pmlmepriv);
> +		pwlan = r8712_alloc_network(pmlmepriv);

what does this change have to do with your changelog?

confused,

greg k-h

Powered by blists - more mailing lists