Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1351914

Re: [PATCH 2/3] net: macb: Fix more coding style issues

From Moritz Fischer <moritz.fischer@ettus.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] net: macb: Fix more coding style issues
Date 2016-03-07 20:50 +0100
Message-ID <ra9ke-7bJ-17@gated-at.bofh.it> (permalink)
References <ra630-57L-3@gated-at.bofh.it> <ra62Z-57L-1@gated-at.bofh.it> <ra8oa-6zK-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Joe, David,

On Mon, Mar 7, 2016 at 10:49 AM, David Miller <davem@davemloft.net> wrote:
> From: Moritz Fischer <moritz.fischer@ettus.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.

Alright, I can back these changes out. Didn't mean to sneak anything in.

Cheers,

Moritz

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] net: macb: Fix more coding style issues Moritz Fischer <moritz.fischer@ettus.com> - 2016-03-07 17:20 +0100
  Re: [PATCH 2/3] net: macb: Fix more coding style issues Joe Perches <joe@perches.com> - 2016-03-07 18:30 +0100
  Re: [PATCH 2/3] net: macb: Fix more coding style issues David Miller <davem@davemloft.net> - 2016-03-07 19:50 +0100
    Re: [PATCH 2/3] net: macb: Fix more coding style issues Moritz Fischer <moritz.fischer@ettus.com> - 2016-03-07 20:50 +0100

csiph-web