linux/drivers/net/ethernet/dec/tulip
David Malcolm e1395a321e drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer
This code in drivers/net/ethernet/dec/tulip/uli526x.c
function "uli526x_timer":

  1086          } else
  1087                  if ((tmp_cr12 & 0x3) && db->link_failed) {
  [...snip...]
  1109                  }
  1110                  else if(!(tmp_cr12 & 0x3) && db->link_failed)
  1111                  {
  [...snip...]
  1117                  }
  1118                  db->init=0;

is misleadingly indented: the
  db->init=0
is indented as if part of the else clause at line 1086, but it is
independent of it (no braces before the "if" at line 1087).

This patch fixes the indentation to reflect the actual meaning of the code,
though is it actually meant to be part of the "else" clause?  (I'm a
compiler developer, not a kernel person).  It also adds spaces around
the assignment, to placate checkpatch.pl.

Seen via an experimental new gcc warning I'm working on for gcc 6,
-Wmisleading-indentation, using gcc r223098 adding
-Werror=misleading-indentation to KBUILD_CFLAGS in Makefile.
The experimental GCC emits this warning (as an error), rightly IMHO:

drivers/net/ethernet/dec/tulip/uli526x.c: In function ‘uli526x_timer’:
drivers/net/ethernet/dec/tulip/uli526x.c:1118:3: error: statement is
indented as if it were guarded by... [-Werror=misleading-indentation]
   db->init=0;
    ^
drivers/net/ethernet/dec/tulip/uli526x.c:1086:4: note: ...this ‘else’
clause, but it is not
  } else
     ^

Hope this is helpful
Dave

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-03 19:43:49 -07:00
..
21142.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
de4x5.c net: tulip: Remove private "strncmp" 2014-12-09 13:45:29 -05:00
de4x5.h
de2104x.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
dmfe.c ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
eeprom.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
interrupt.c tulip: Properly check dma mapping result 2013-06-13 17:09:40 -07:00
Kconfig net: Move MII out from under NET_CORE and hide it 2013-06-19 22:22:56 -07:00
Makefile
media.c tulip: cleanup by using ARRAY_SIZE() 2014-01-23 13:28:29 -08:00
pnic2.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
pnic.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
timer.c tulip: Poll link status more frequently for Comet chips 2014-06-22 17:12:36 -07:00
tulip_core.c tulip_core.c : out-of-bounds check. 2015-03-13 12:43:25 -04:00
tulip.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
uli526x.c drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer 2015-06-03 19:43:49 -07:00
winbond-840.c net/tulip: don't warn about unknown ARM architecture 2015-02-02 18:53:34 -08:00
xircom_cb.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00