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] [day] [month] [year] [list]
Message-ID: <1513633139.1234.8.camel@perches.com>
Date:   Mon, 18 Dec 2017 13:38:59 -0800
From:   Joe Perches <joe@...ches.com>
To:     Martin Homuth <martin@...tinhomuth.de>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] staging: rtl8712: style fix multiple line
 dereferences

On Mon, 2017-12-18 at 21:36 +0100, Martin Homuth wrote:
> This patch fixes various coding style issues in the rtl8712 module as
> noted by checkpatch.pl related to dereferencing over multiple lines.
> 
> It fixes the following checkpatch.pl warning:
> 
> WARNING: Avoid multiple line dereference - prefer %s
> 
> Signed-off-by: Martin Homuth <martin@...tinhomuth.de>
> ---
>  drivers/staging/rtl8712/rtl8712_recv.c        |  8 ++--
>  drivers/staging/rtl8712/rtl871x_cmd.c         | 36 ++++++++---------
>  drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 58
> ++++++++++++++-------------
>  drivers/staging/rtl8712/rtl871x_mlme.c        |  6 +--
>  drivers/staging/rtl8712/rtl871x_security.c    | 25 ++++++------
>  5 files changed, 69 insertions(+), 64 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_recv.c
> b/drivers/staging/rtl8712/rtl8712_recv.c
> index 8f555e6e1b3f..8395b90d60b6 100644
> --- a/drivers/staging/rtl8712/rtl8712_recv.c
> +++ b/drivers/staging/rtl8712/rtl8712_recv.c
> @@ -918,8 +918,8 @@ static void process_link_qual(struct _adapter *padapter,
>  		}
>  		padapter->recvpriv.signal_qual_data.total_val +=
>  			  pattrib->signal_qual;
> -		padapter->recvpriv.signal_qual_data.elements[padapter->
> -			  recvpriv.signal_qual_data.index++] =

probably better to use a temporary pointer for
	padapter->recvpriv.signal_qual_data
and replace the occurrences with the temporary.

s/padapter->recvpriv.signal_qual_data./sqd->/

> +		padapter->recvpriv.signal_qual_data.elements
> +			[padapter->recvpriv.signal_qual_data.index++] =
>  			  pattrib->signal_qual;
>  		if (padapter->recvpriv.signal_qual_data.index >=
>  		    PHY_LINKQUALITY_SLID_WIN_MAX)
> @@ -947,8 +947,8 @@ static void process_rssi(struct _adapter *padapter,
> union recv_frame *prframe)
>  	}
>  	padapter->recvpriv.signal_strength_data.total_val +=
>  			pattrib->signal_strength;
> -	padapter->recvpriv.signal_strength_data.elements[padapter->recvpriv.
> -			signal_strength_data.index++] =
> +	padapter->recvpriv.signal_strength_data.elements
> +		[padapter->recvpriv.signal_strength_data.index++] =
>  			pattrib->signal_strength;
>  	if (padapter->recvpriv.signal_strength_data.index >=
>  	    PHY_RSSI_SLID_WIN_MAX)

and here use ssd

etc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ