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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZBtXYxrrGtyCyBzK@kroah.com>
Date:   Wed, 22 Mar 2023 20:30:43 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Khadija Kamran <kamrankhadijadj@...il.com>
Cc:     outreachy@...ts.linux.dev, Manish Chopra <manishc@...vell.com>,
        GR-Linux-NIC-Dev@...vell.com, Coiby Xu <coiby.xu@...il.com>,
        netdev@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: qlge: avoid multiple assignments

On Thu, Mar 23, 2023 at 12:21:22AM +0500, Khadija Kamran wrote:
> Linux kernel coding style does not allow multiple assignments on a
> single line.
> Avoid multiple assignments by assigning value to each variable in a
> separate line.
> 
> Signed-off-by: Khadija Kamran <kamrankhadijadj@...il.com>
> ---
>  drivers/staging/qlge/qlge_main.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
> index 1ead7793062a..b35fb7db2a77 100644
> --- a/drivers/staging/qlge/qlge_main.c
> +++ b/drivers/staging/qlge/qlge_main.c
> @@ -4085,7 +4085,11 @@ static struct net_device_stats *qlge_get_stats(struct net_device
>  	int i;
>  
>  	/* Get RX stats. */
> -	pkts = mcast = dropped = errors = bytes = 0;
> +	pkts = 0;
> +	mcast = 0;
> +	dropped = 0;
> +	errors = 0;
> +	bytes = 0;

Nah, the original is fine, it makes it more obvious what is happening.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ