Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752989AbcCGTr4 (ORCPT ); Mon, 7 Mar 2016 14:47:56 -0500 Received: from mail-vk0-f54.google.com ([209.85.213.54]:35538 "EHLO mail-vk0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753661AbcCGTrW (ORCPT ); Mon, 7 Mar 2016 14:47:22 -0500 MIME-Version: 1.0 In-Reply-To: <20160307.134924.1763924827140423427.davem@davemloft.net> References: <1457367460-9123-1-git-send-email-moritz.fischer@ettus.com> <1457367460-9123-3-git-send-email-moritz.fischer@ettus.com> <20160307.134924.1763924827140423427.davem@davemloft.net> Date: Mon, 7 Mar 2016 11:47:20 -0800 Message-ID: Subject: Re: [PATCH 2/3] net: macb: Fix more coding style issues From: Moritz Fischer To: David Miller Cc: Nicolas Ferre , netdev@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 988 Lines: 33 Hi Joe, David, On Mon, Mar 7, 2016 at 10:49 AM, David Miller wrote: > From: Moritz Fischer > 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. Alright, I can back these changes out. Didn't mean to sneak anything in. Cheers, Moritz