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: <20160307.134924.1763924827140423427.davem@davemloft.net>
Date:	Mon, 07 Mar 2016 13:49:24 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	moritz.fischer@...us.com
Cc:	nicolas.ferre@...el.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] net: macb: Fix more coding style issues

From: Moritz Fischer <moritz.fischer@...us.com>
Date: Mon,  7 Mar 2016 08:17:38 -0800

> @@ -945,6 +943,7 @@ static int macb_rx_frame(struct macb *bp, unsigned int first_frag,
>  static int macb_rx(struct macb *bp, int budget)
>  {
>  	int received = 0;
> +	int dropped;
>  	unsigned int tail;
>  	int first_frag = -1;
>  
> @@ -968,7 +967,6 @@ static int macb_rx(struct macb *bp, int budget)
>  		}
>  
>  		if (ctrl & MACB_BIT(RX_EOF)) {
> -			int dropped;
>  			BUG_ON(first_frag == -1);
>  
>  			dropped = macb_rx_frame(bp, first_frag, tail);

I totally disagree with moving local variable declarations up to the
top-most scope.

It is always best to keep them in the inner-most scope.

This is also not even mentioned in your commit message at all.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ