1 From e1395a321eab1a7833d82e952eb8255e0a1f03cb Mon Sep 17 00:00:00 2001
2 From: David Malcolm <dmalcolm@redhat.com>
3 Date: Tue, 2 Jun 2015 15:31:17 -0400
4 Subject: drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 From: David Malcolm <dmalcolm@redhat.com>
11 commit e1395a321eab1a7833d82e952eb8255e0a1f03cb upstream.
13 This code in drivers/net/ethernet/dec/tulip/uli526x.c
14 function "uli526x_timer":
17 1087 if ((tmp_cr12 & 0x3) && db->link_failed) {
20 1110 else if(!(tmp_cr12 & 0x3) && db->link_failed)
26 is misleadingly indented: the
28 is indented as if part of the else clause at line 1086, but it is
29 independent of it (no braces before the "if" at line 1087).
31 This patch fixes the indentation to reflect the actual meaning of the code,
32 though is it actually meant to be part of the "else" clause? (I'm a
33 compiler developer, not a kernel person). It also adds spaces around
34 the assignment, to placate checkpatch.pl.
36 Seen via an experimental new gcc warning I'm working on for gcc 6,
37 -Wmisleading-indentation, using gcc r223098 adding
38 -Werror=misleading-indentation to KBUILD_CFLAGS in Makefile.
39 The experimental GCC emits this warning (as an error), rightly IMHO:
41 drivers/net/ethernet/dec/tulip/uli526x.c: In function ‘uli526x_timer’:
42 drivers/net/ethernet/dec/tulip/uli526x.c:1118:3: error: statement is
43 indented as if it were guarded by... [-Werror=misleading-indentation]
46 drivers/net/ethernet/dec/tulip/uli526x.c:1086:4: note: ...this ‘else’
54 Signed-off-by: David Malcolm <dmalcolm@redhat.com>
55 Signed-off-by: David S. Miller <davem@davemloft.net>
56 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
59 drivers/net/ethernet/dec/tulip/uli526x.c | 2 +-
60 1 file changed, 1 insertion(+), 1 deletion(-)
62 --- a/drivers/net/ethernet/dec/tulip/uli526x.c
63 +++ b/drivers/net/ethernet/dec/tulip/uli526x.c
64 @@ -1115,7 +1115,7 @@ static void uli526x_timer(unsigned long
65 netif_carrier_off(dev);
71 /* Timer active again */
72 db->timer.expires = ULI526X_TIMER_WUT;